Skip to content

sendsonar/heroku-buildpack-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Prometheus Heroku Buildpack

This Heroku buildpack installs Prometheus in your Heroku dyno to collect app metrics.

Configuration

This buildpack assumes that prometheus config file is located at /prometheus/config.yml in your application.

In addition, you can include a prerun script, /prometheus/prerun.sh, in your application. The prerun script runs after all of the standard configuration actions and immediately before starting Prometheus. This allows you to modify the environment variables (for example: $DISABLE_PROMETHEUS), perform additional configurations, etc.

#!/usr/bin/env bash

# Disable based on dyno type
if [ "$DYNOTYPE" == "run" ]; then
  $DISABLE_PROMETHEUS="true"
fi

# Update configuration placeholder using the Heroku application environment variable
if [ -n "$PROMETHEUS_URL" ]; then
  sed -i "s/<URL>/$PROMETHEUS_URL/" "$APP_PROMETHEUS/config.yml"
fi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages