esl / MongoosePush

MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.
Apache License 2.0
108 stars 24 forks source link

Default grafana dashboards #191

Closed janciesla8818 closed 4 years ago

janciesla8818 commented 4 years ago

This PR provides easy way to view the metrics exposed by MongoosePush at /metrics endpoint in from of Grafana dashboard. The changes include:

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.

Go to http://127.0.0.1:3000/ (admin/admin) to see the dashboards.

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.

Parts of the code and inspiration are taken from: https://github.com/cirocosta/sample-grafana (https://ops.tips/blog/initialize-grafana-with-preconfigured-dashboards/)

aleklisi commented 4 years ago
Screen Shot 2020-07-21 at 10 00 17

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