Grafana is an open source monitoring and visualization solution. It gives you the ability to produce dashboards about your application metrics.
This tutorial will show you how to deploy a Grafana instance on Scalingo in under 5 minutes.
We published a repository grafana-scalingo on GitHub to help you deploy Grafana on Scalingo. Deploying a Grafana instance is now at a click range:
Deployment by Cloning the Repository
You first need to create an application on Scalingo. Let’s say its name is
Then, clone our repository and add the Scalingo git remote:
$ git clone https://github.com/Scalingo/grafana-scalingo $ cd grafana-scalingo $ git remote add scalingo email@example.com:my-app.git
We now need to slightly configure the Scalingo application. This application needs to use the multi-buildpacks.
You also need to add a PostgreSQL addon to your application. Last, configure a few Grafana specific environment variables by heading to your application web dashboard:
GF_DATABASE_URL=$SCALINGO_POSTGRESQL_URL GF_PATHS_PLUGINS=/app/plugins GF_SECURITY_ADMIN_PASSWORD=<Fill this field> GF_SECURITY_ADMIN_USER=<Fill this field> GF_SERVER_HTTP_PORT=$PORT GF_SERVER_ROOT_URL=https://my-app.osc-fr1.scalingo.io NPM_CONFIG_PRODUCTION=false PLATFORM_ENV=production
You need to customize the variables
GF_SERVER_ROOT_URL with correct values.
You can now deploy your application with:
$ git push scalingo master
Display Images on External Services
You may want to display images on the alerts generated by Grafana and sent, for example, on Slack. For this you need an S3 bucket configured via the following environment variables:
GF_EXTERNAL_IMAGE_STORAGE_PROVIDER=s3 GF_EXTERNAL_IMAGE_STORAGE_S3_ACCESS_KEY=<Fill this field> GF_EXTERNAL_IMAGE_STORAGE_S3_BUCKET=<Fill this field> GF_EXTERNAL_IMAGE_STORAGE_S3_REGION=<Fill this field> GF_EXTERNAL_IMAGE_STORAGE_S3_SECRET_KEY=<Fill this field>