This PR provides easy way to view the metrics exposed by MongoosePush at /metrics endpoint in from of Grafana dashboard. The changes include:
Adding Makefile that is running docker-compose for Grafana and Prometheus, running update_dashboards.sh script.
Configuring and provisioning two dashboards - MongoosePush Metrics and MongoosePush VM.
Renaming docker-compose.prometheus.yml to docker-compose.dashboards.yml as the Prometheus container is being run together with Grafana.
Documentation update in the guides/metrics section.
To run and configure the containers, please refer to the documentation changes.
To test if the metrics are displayed in the dashboards you can run:
MIX_ENV=integration mix do test.env.up
make dashboards
MIX_ENV=integration mix do test
This will run the integration tests and generate some events inside MongoosePush that can be later seen in the dashboard. Additionally you can trigger few push notifications with curl to generate some traffic.
MongoosePush Metrics.json and MongoosePush VM.json are exported from Grafana. When reviewing the dashboards, no need to go in detail over the files as it's better to run the setup and click though the dashboards in Grafana UI to see if everything is displayed correctly.
Just one thing: MIX_ENV=integration mix do test.env.up -> MIX_ENV=integration mix do certs.dev, test.env.up
besides that:
Works on my computer!!
Good Job
This PR provides easy way to view the metrics exposed by MongoosePush at
/metrics
endpoint in from of Grafana dashboard. The changes include:Makefile
that is running docker-compose for Grafana and Prometheus, running update_dashboards.sh script.MongoosePush Metrics
andMongoosePush VM
.docker-compose.prometheus.yml
todocker-compose.dashboards.yml
as the Prometheus container is being run together with Grafana.guides/metrics
section.To run and configure the containers, please refer to the documentation changes.
To test if the metrics are displayed in the dashboards you can run:
This will run the integration tests and generate some events inside MongoosePush that can be later seen in the dashboard. Additionally you can trigger few push notifications with
curl
to generate some traffic.Go to http://127.0.0.1:3000/ (admin/admin) to see the dashboards.
MongoosePush Metrics.json
andMongoosePush VM.json
are exported from Grafana. When reviewing the dashboards, no need to go in detail over the files as it's better to run the setup and click though the dashboards in Grafana UI to see if everything is displayed correctly.Parts of the code and inspiration are taken from: https://github.com/cirocosta/sample-grafana (https://ops.tips/blog/initialize-grafana-with-preconfigured-dashboards/)