Install Prometheus as a Windows Service

How to Install Prometheus as a Windows Service with AlwaysUp

Automatically launch Prometheus in the background when your computer reboots. Make sure that your monitoring & alerting is always running, 24/7

Prometheus is a leading open-source monitoring solution.

To install Prometheus as a Windows Service with AlwaysUp:

  1. If necessary, install and configure Prometheus. Ensure that everything works as you expect when you run "prometheus.exe" from a Windows command prompt:

    Prometheus Started

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. 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.

    Prometheus Windows Service: General Tab

  6. 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.

    1. 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).

    2. 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.

      Configure Sanity Check

    3. Click the OK button.

    Here's what the Monitor tab should look like when you're done:

    Prometheus Windows Service: Monitor Tab

  7. 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.

    Prometheus Windows Service: Startup Tab

  8. 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.

    Prometheus Windows Service: Extras Tab

  9. 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":

    Prometheus Windows Service: Created

  10. To start Prometheus from AlwaysUp, choose Application > Start "Prometheus". In a few seconds, the status will change to "Running":

    Prometheus Windows Service: Running

  11. 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:

    Prometheus Windows Service: Running normally

  12. 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.



Prometheus not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a windows service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and Prometheus. The AlwaysUp Event Log Messages page explains the messages that may appear.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!