This repository contains basic express application with monitoring infrastructure.
I use the following software for the monitoring infrastructure:
- Grafana (Data Visualization)
- Loki (Data Source for Logs)
- Prometheus (Data Source for about Anything)
It's simple, just run the script on the deploy
folder.
./deploy/deploy.sh --start
To stop it:
./deploy/deploy.sh --stop
When you run it, it's not done yet, you have to setup the Dashboard on Grafana.
Since, I'm using express.js, I added Express Prometheus Middleware on my express routes.
Then, it will automatically adds Histogram and endpoints to retrieve that metrics.
When you're set, go to Grafana, and add Prometheus as data source.
Then, after that, you can import dashboard, and copy the JSON definition from here.
You're done.
I use loki for logging. So, set Loki as the datasource, and get done with it.
It basicly provides telemetry information from the application.