-
If necessary, install and configure Prometheus. Ensure that everything works as you expect when you run "prometheus.exe" from a Windows command prompt:
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Prometheus executable, prometheus.exe.
Since we installed Prometheus in C:\Prometheus, our path is "C:\Prometheus\prometheus.exe".
-
In the Name field, enter the name that you will call the application in AlwaysUp.
We have stuck with the default of Prometheus but you can specify another name if you like.
-
And in the Start the application field, select Automatically, but shortly after the computer boots.
This setting tells AlwaysUp to launch prometheus.exe 1-2 minutes after a reboot — enough time to ensure that all critical services
are primed and ready to go.
-
If you are interested in monitoring Prometheus and detecting when it stops serving pages (at http://localhost:9090),
click over to the Monitor tab. We'll set up a failure detection batch file to detect when the Prometheus web server has failed.
-
Follow these instructions to create the failure detection BAT file.
We have called ours check-web-server.bat and placed it in our Prometheus folder (C:\Prometheus).
-
Click the "..." button in the Whenever it fails a "sanity check" section and specify the full path to the batch file.
Change the Every controls to 5 minutes, or tune to any frequency that you see fit. More time means less frequent checks and less load on the server, but with a reduced sensitivity to failures.
-
Click the OK button.
Here's what the Monitor tab should look like when you're done:
-
Switch to the Startup tab and check the Ensure that the Windows networking components have started box.
This will ensure that the TCP/IP stack — necessary to support the web interface — is fully initialized before
Prometheus starts.
-
When Prometheus is running in the background as a Windows Service, the console window won't come up on your desktop.
We recommend capturing the console output to a text file so that the information will be available for troubleshooting if necessary.
Move to the Extras tab. Check the Capture output to this log file box and enter the full path to a text file that will receive the console output from the prometheus.exe process.
-
We're done configuring Prometheus as a Windows Service so click the Save button to record your settings.
In a couple of seconds, an application called Prometheus (or whatever you called it) will show up in the AlwaysUp window.
It is not yet running though and the state will be "Stopped":
-
To start Prometheus from AlwaysUp, choose Application > Start "Prometheus". In a few seconds, the status will change to "Running":
-
And finally, now that Prometheus is running as a service, please confirm that the server is operating as expected.
Is the web server responding? Browse to http://localhost:9090 to check.
Is the console text being captured to the log file? Does the file contain any errors?
Everything was fine in our setup:
-
That's it! Next time your computer boots, Prometheus will start up immediately in the background, without anyone needing to log on.
Please restart your PC now and test that everything works as expected after Windows comes back to life.
And please feel free to edit Prometheus in AlwaysUp to check out the many other settings that may be appropriate for your environment.
For example, send email alerts if it stops, boost the priority of prometheus.exe to support CPU intensive tasks, and much more.