Graphite and Grafana: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
Zeile 14: Zeile 14:
 
*a2enmod wsgi
 
*a2enmod wsgi
 
=Set Port 8000=
 
=Set Port 8000=
*echo Listen 8000  >> /etc/apache2/ports.conf"
+
*echo Listen 8000  >> /etc/apache2/ports.conf
 
*cp /usr/share/graphite-web/apache2-graphite.conf /etc/apache2/sites-available/graphite.conf
 
*cp /usr/share/graphite-web/apache2-graphite.conf /etc/apache2/sites-available/graphite.conf
 
*sed -i.org -e "/VirtualHost/s/:80/:8000/" /etc/apache2/sites-available/graphite.conf
 
*sed -i.org -e "/VirtualHost/s/:80/:8000/" /etc/apache2/sites-available/graphite.conf
 
*a2ensite graphite
 
*a2ensite graphite
 +
 
=Integration in Icingaweb2=
 
=Integration in Icingaweb2=
 
*cd /usr/share/icingaweb2/modules/   
 
*cd /usr/share/icingaweb2/modules/   

Version vom 23. Juni 2017, 11:00 Uhr

Install

  • apt-get install graphite-web graphite-carbon libapache2-mod-wsgi

Enable

  • icinga2 feature enable graphite
  • systemctl restart icinga2.service

Look

  • ls -l /var/lib/graphite/whisper/carbon/agents

User Auth for Graphite

  • graphite-manage syncdb
  • chown _graphite:_graphite /var/lib/graphite/graphite.db

Module for Apache2

  • a2enmod wsgi

Set Port 8000

  • echo Listen 8000 >> /etc/apache2/ports.conf
  • cp /usr/share/graphite-web/apache2-graphite.conf /etc/apache2/sites-available/graphite.conf
  • sed -i.org -e "/VirtualHost/s/:80/:8000/" /etc/apache2/sites-available/graphite.conf
  • a2ensite graphite

Integration in Icingaweb2

[graphite]
metric_prefix = icinga  
base_url = http://www.your-url.com:port/render?  
  • vim /etc/carbon/storage-schemas.conf
[icinga_internals]
pattern = ^icinga\..*\.(max_check_attempts|reachable|current_attempt|execution_time|latency|state|state_type)  
retentions = 5m:7d

[icinga_default]
pattern = ^icinga\.  
retentions = 1m:2d,5m:10d,30m:90d,360m:4y

Install Grafana

Access

Graphite

  • http://<HOST>:8000

Grafana

  • http://<HOST>:3000

Anleitungen

Links

Ubuntu

Centos