Prometheus - Monitoring system & time series database
Prometheus is an open-source monitoring and alerting toolkit.
Installation
Prometheus as two components, Server and Exporter.
Server : scrapes (pull) metrics from targets. It as its own database under /var/lib/prometheus/metrics2
- Exporter : exposes metrics to client, like grafana, etc...
Since prometheus is in Debian repository, just install with:
sudo apt-get install prometheus prometheus-node-exporter
Configuration
Add targets into configuration /etc/prometheus/prometheus.yml.
scrape_configs: - job_name: 'server_label' static_configs: - targets: ['server_hostname:9100']
You can install config file sample with.
sudo cp /usr/share/doc/prometheus/examples/consoles/* /etc/prometheus/consoles sudo mv /etc/prometheus/consoles/index.html.example /etc/prometheus/consoles/index.html sudo cp /usr/share/doc/prometheus/examples/console_libraries/* /etc/prometheus/console_libraries sudo gunzip /etc/prometheus/console_libraries/*.gz
Adapt the files
References
Tincho's talk: https://summit.debconf.org/debconf15/meeting/312/rethinking-monitoring-with-prometheus/