My current preferred setup for systems monitoring
Systems monitoring is something that as soon as you give it a first try, you'll always feel the need.
This is my current setup for that purpose, that consists on the following elements:
- NGINX
- Mimics a real application with an API Gateway
- Redirects the requests on
/v1
to JSONPlaceholder
- nginx_exporter e nginx_log_exporter
- By default, NGINX OSS provides just a few metrics (using nginx_exporter)
- Therefore, I chose to use nginx_log_exporter to provide a bunch of other metrics, that have a certain level of customization.
- Prometheus
- Monitoring tool that has satisfied me the most so far
- Grafana
- Grafana dashboard creation are amazing
- NGINX Amplify
- Only supports the few metrics that NGINX provides out-of-the-box.
- It is hosted only by NGINX ORG itself. We haven't control
- Elastic Search
- I haven't give a shot to the Elastic family yet. Seems interesting.
- Docker (moby-engine)
- Maybe test with podman too?
- docker-compose
- make
- for running aux scripts
- jq
- for running
make show-metrics
- comes by default in most of linux distros
- for running
- Setup .env file
cp .env.example .env
- Start services
docker-compose up
- Add Prometheus to Grafana data sources
- Start messing around creating graphs
- See all available metrics
make show-metrics
- See all available metrics
- Use NGINX's error.log to generate metrics with nginx_log_exporter