Graphite and Grafana: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Thomas (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „=Instal= *apt-get install graphite-web graphite-carbon libapache2-mod-wsgi =Enable= *icinga2 feature enable graphite *systemctl restart icinga2.service =Look…“
 
Janning (Diskussion | Beiträge)
 
(14 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
=Instal=
=Install=
*apt-get install graphite-web graphite-carbon libapache2-mod-wsgi
*apt-get install graphite-web graphite-carbon libapache2-mod-wsgi
=Enable=   
=Enable=   
*icinga2 feature enable graphite
*icinga2 feature enable graphite
*systemctl restart icinga2.service
*systemctl restart icinga2.service
=Look=
=Look=
*ls -l /var/lib/graphite/whisper/icinga2/
*ls -l /var/lib/graphite/whisper/carbon/agents
 
=User Auth for Graphite=
=User Auth for Graphite=
*graphite-manage syncdb
*graphite-manage syncdb
Zeile 12: 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 "/VirtuelHost/s/:80/:8000" /etc/apache2/sites-available/graphite.conf
*sed -i.org -e "/VirtualHost/s/:80/:8000/" /etc/apache2/sites-available/graphite.conf
  668 a2ensite graphite
*a2ensite graphite
  669 cat <<EOF >/etc/apt/sources.list.d/grafana.list
 
deb https://packagecloud.io/grafana/stable/debian/ wheezy main
=Integration in Icingaweb2=
EOF
*cd /usr/share/icingaweb2/modules/ 
*git clone https://github.com/findmypast/icingaweb2-module-graphite.git  graphite
*mkdir /etc/icingaweb2/modules/graphite/
*vi /etc/icingaweb2/modules/graphite/config.ini
  [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
 
 
=Aktivieren in Icingaweb2=
[[Datei:graphite-aktive-1.png]]
 
[[Datei:graphite-aktive-2.png]]
 
=Install Grafana=
*cat <<EOF >/etc/apt/sources.list.d/grafana.list
*deb https://packagecloud.io/grafana/stable/debian/ wheezy main
*EOF
 
*curl -s https://packagecloud.io/gpg.key | sudo apt-key add -
*apt-get update
*apt-get install grafana
*systemctl start grafana-server


  670  curl -s https://packagecloud.io/gpg.key | sudo apt-key add -
=Access=
  671  apt-get update
==Graphite==
  672  apt-get install grafana
*http://<HOST>:8000
  673  systemctl start grafana-server.
==Grafana==
  674  systemctl start grafana-server
*http://<HOST>:3000


=Anleitungen=
*[[Grafana Dashboards erstellen]]


=Links=
=Links=
*http://www.credativ.de/blog/howto-icinga2-mit-graphite-und-grafana-unter-debian
*http://www.credativ.de/blog/howto-icinga2-mit-graphite-und-grafana-unter-debian
*https://dokuwiki.nausch.org/doku.php/centos:web_c7:icinga:graphite
*https://www.schoenberg-solutions.de/roller/arndtsBlog/category/Icinga2
==Ubuntu==
*https://www.linuxfrickeln.de/visualisierung-von-performancedaten-in-der-icingaweb2-gui/
==Centos==
*https://dokuwiki.nausch.org/doku.php/centos:web_c7:icinga:graphite

Aktuelle Version vom 4. Dezember 2017, 14:37 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


Aktivieren in Icingaweb2

Install Grafana

Access

Graphite

  • http://<HOST>:8000

Grafana

  • http://<HOST>:3000

Anleitungen

Links

Ubuntu

Centos