User Tools

Site Tools


prometheus_grafana

Grafana Prometheus

A list of available exporters:

https://prometheus.io/docs/instrumenting/exporters/

Gitlab included Exporter

Install using go:

go get github.com/prometheus/mysqld_exporter

Run exporters on boot using supervisord

Apache Exporter - https://github.com/Lusitaniae/apache_exporter

/etc/supervisor/conf.d/apache_exporter.conf
[program:apache_exporter]
command=/root/go/bin/apache_exporter -insecure -scrape_uri "http://localhost/server-status/?auto"
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/apache_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/apache_exporter.log
user=www-data

MySQL Exporter - https://github.com/prometheus/mysqld_exporter

/etc/supervisor/conf.d/mysql_exporter.conf
[program:mysql_exporter]
command=/root/go/bin/mysqld_exporter --config.my-cnf /etc/mysql/debian.cnf
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/mysql_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/mysql_exporter.log
user=root # don't run this process as root

Grafana-rrd-server - https://github.com/doublemarket/grafana-rrd-server

/etc/supervisor/conf.d/grafana-rrd-server.conf
[program:grafana-rrd-server]
command=/root/go/bin/grafana-rrd-server -r /var/lib/munin/KnallimallOrg/
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/grafana-rrd-server.err.log
stdout_logfile=/var/log/prometheus_exporter/grafana-rrd-server.log
user=root # don't run this process as root

Fail2ban Exporter - https://github.com/jangrewe/prometheus-fail2ban-exporter

/etc/supervisor/conf.d/fail2ban_exporter.conf
[program:fail2ban_exporter]
command=/usr/bin/python3 /usr/local/src/fail2ban_exporter/fail2ban_exporter.py
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/fail2ban_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/fail2ban_exporter.log
user=root # don't run this process as root

Nextcloud Exporter - https://github.com/xperimental/nextcloud-exporter

/etc/supervisor/conf.d/nexctloud_exporter.conf
[program:nextcloud_exporter]
command=/root/go/bin/nextcloud-exporter -u NEXTCLOUD_USER -p PASSWORD -l https://cloud.knallimall.org//ocs/v2.php/apps/serverinfo/api/v1/info
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/nextcloud_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/nextcloud_exporter.log
user=root

SSL Check Exporter - https://github.com/chrj/prometheus-ssl-exporter

/etc/supervisor/conf.d/ssl_exporter.conf
[program:ssl_exporter]
command=/root/go/bin/prometheus-ssl-exporter
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/ssl_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/ssl_exporter.log
user=root

ElasticSearch Exporter - https://github.com/justwatchcom/elasticsearch_exporter

/etc/supervisor/conf.d/elasticsearch_exporter.conf
[program:elasticsearch_exporter]
command=/root/go/bin/elasticsearch_exporter --es.uri=http://localhost:9200
autostart=yes
autorestart=yes
startretries=3
stderr_logfile=/var/log/prometheus_exporter/elasticsearch_exporter.err.log
stdout_logfile=/var/log/prometheus_exporter/elasticsearch_exporter.log
user=root

Grafana Dashboards

See Grafana website for available dashboards: https://grafana.com/dashboards

prometheus_grafana.txt · Last modified: 2019/06/22 19:48 by admin