Skip to content
Rohit Macherla

Installing Prometheus on Heroku

monitoring2 min read

This is a part of series of blog posts about advanced monitoring techniques for your application so your business can rely on the tech team.

So far, we've covered:

  1. A case for better monitoring
  2. Slack alerts for
  3. Taking it to the next level for monitoring the Enterprise

Before we try to connect and Prometheus, let's install it first.

You could install it on your servers in your own data center by following the steps here. There are also docker images and pre-compiled binaries to make the task easier.

However, for the purposes of this series, we are going to install it on Heroku. Heroku is a popular Platform-as-a-service that was acquired by, and is easy to setup and quick to get your app running.

Steps for installing Prometheus on Heroku

I've put together a small repository that installs Prometheus, as a buildpack. Think of Buildpacks as applications that are bundled on top of Heroku.

I'm using the unofficial buildpack but with a configuration file and command to start the prometheus server.

All you have to do is:

  1. Navigate to this sample GitHub repository:
  2. Click on the Deploy to Heroku button.
  3. Login to Heroku, if you haven't already.
  4. Provide an app name and whether you'd want it on the US or Europe territory.
  5. And choose Deploy app, that's it!

You can then get the git repository of the Heroku app and make any modifications you'd like to the configuration yourself!

Here's how it looked like when I did it in July 2021:

Screenshot of using the Deploy to Heroku button

When you then navigate to the app itself, you can see it running Heroku like this:

A running Prometheus instance on Heroku

We've now installed Prometheus monitoring and alerting toolkit on Heroku.

That's it, folks!