Installing Prometheus on Heroku
— monitoring — 2 min read
This is a part of series of blog posts about advanced monitoring techniques for your Salesforce.com application so your business can rely on the tech team.
So far, we've covered:
- A case for better monitoring
- Slack alerts for Salesforce.com
- Taking it to the next level for monitoring the Salesforce.com Enterprise
Before we try to connect Salesforce.com 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 Salesforce.com, 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:
- Navigate to this sample GitHub repository: https://github.com/markgarg/sample-prometheus-on-heroku
- Click on the
Deploy to Heroku
button. - Login to Heroku, if you haven't already.
- Provide an app name and whether you'd want it on the US or Europe territory.
- 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:
When you then navigate to the app itself, you can see it running Heroku like this:
We've now installed Prometheus monitoring and alerting toolkit on Heroku.
That's it, folks!
Next: