User Tools

Site Tools


prometheus_grafana

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prometheus_grafana [2019/01/11 21:01] – created adminprometheus_grafana [2019/06/22 21:48] (current) – [Run exporters on boot using supervisord] admin
Line 8: Line 8:
 https://prometheus.io/docs/instrumenting/exporters/ https://prometheus.io/docs/instrumenting/exporters/
  
-===== Run exporters on boot (could be improved) =====+Gitlab included Exporter
  
-In ''/etc/rc.local'' add before ''exit 0'':+  * PostgreSQL: https://docs.gitlab.com/ee/administration/monitoring/prometheus/postgres_exporter.html 
 +  * Redishttps://docs.gitlab.com/ee/administration/monitoring/prometheus/redis_exporter.html 
 +  * Runner: https://docs.gitlab.com/runner/monitoring/
  
-<code bash> 
-/root/go/bin/grafana-rrd-server -r /var/lib/munin/KnallimallOrg/ & 
-/root/go/bin/mysqld_exporter --config.my-cnf /etc/mysql/debian.cnf & 
-/root/go/bin/nextcloud-exporter -p PASSWORD -u NEXTCLOUD_USER -l https://cloud.domain.org/ocs/v2.php/apps/serverinfo/api/v1/info & 
-/root/go/bin/apache_exporter -insecure -scrape_uri "http://localhost/server-status/?auto" & 
  
 +Install using go:
 +
 +<code>
 +go get github.com/prometheus/mysqld_exporter
 </code> </code>
 +
 +===== Run exporters on boot using supervisord =====
 +
 +Apache Exporter - https://github.com/Lusitaniae/apache_exporter
 +
 +<code bash /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
 +</code>
 +
 +MySQL Exporter - https://github.com/prometheus/mysqld_exporter
 +
 +<code bash /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
 +</code>
 +
 +Grafana-rrd-server - https://github.com/doublemarket/grafana-rrd-server
 +
 +<code bash /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
 +</code>
 +
 +Fail2ban Exporter - https://github.com/jangrewe/prometheus-fail2ban-exporter
 +
 +<code bash /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
 +</code>
 +
 +
 +Nextcloud Exporter - https://github.com/xperimental/nextcloud-exporter
 +
 +<code bash /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
 +</code>
 +
 +
 +
 +SSL Check Exporter - https://github.com/chrj/prometheus-ssl-exporter
 +
 +<code bash /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
 +</code>
 +
 +ElasticSearch Exporter - https://github.com/justwatchcom/elasticsearch_exporter
 +
 +
 +<code bash /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
 +</code>
 +
 +===== Grafana Dashboards =====
 +
 +See Grafana website for available dashboards: https://grafana.com/dashboards
  
prometheus_grafana.1547236897.txt.gz · Last modified: 2019/01/11 21:01 by admin