User Tools

Site Tools


prometheus_grafana

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
prometheus_grafana [2019/01/12 14:56] adminprometheus_grafana [2019/01/12 15:41] admin
Line 21: Line 21:
 </code> </code>
  
-===== Run exporters on boot (could be improved) =====+===== Run exporters on boot using supervisord =====
  
-In ''/etc/rc.local'' add before ''exit 0'':+Apache Exporter
  
-<code bash> +<code bash /etc/supervisor/conf.d/apache_exporter.conf
-/root/go/bin/grafana-rrd-server -/var/lib/munin/KnallimallOrg& +[program:apache_exporter] 
-/root/go/bin/mysqld_exporter --config.my-cnf /etc/mysql/debian.cnf & +command=/root/go/bin/apache_exporter -insecure -scrape_uri "http://localhost/server-status/?auto" 
-/root/go/bin/nextcloud-exporter -p PASSWORD -u NEXTCLOUD_USER -https://cloud.example.org//ocs/v2.php/apps/serverinfo/api/v1/info & +autostart=yes 
-/root/go/bin/apache_exporter -insecure -scrape_uri "http://localhost/server-status/?auto" & +autorestart=yes 
-/usr/bin/python3 /usr/local/src/fail2ban_exporter/fail2ban_exporter.py &+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 
 + 
 +<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> </code>
  
prometheus_grafana.txt · Last modified: 2019/06/22 21:48 by admin