Last active
January 17, 2017 09:00
-
-
Save etobi/7590aee22f9b84b69d73 to your computer and use it in GitHub Desktop.
Monitoring mit Icinga (Nagios) auf Raspberry PI installieren
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aktuelles rasbian installieren | |
# hostname, password etc setzen | |
sudo raspi-config | |
# alles auf aktuellen Stand bringen | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Feste IP konfigurieren | |
sudo vi /etc/network/interfaces | |
# Icinga und Abhängigkeiten installieren | |
sudo apt-get install php5 php5-cli php-pear php5-xmlrpc php5-xsl php5-pdo php5-ldap php5-soap php5-gd php5-mysql apache2 build-essential libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12 libpng12-dev snmp libsnmp5-dev icinga netcat nagios-nrpe-plugin | |
sudo reboot | |
# Web-Interface-User hinzufügen | |
htpasswd -nb admin password >> /etc/icinga/htpasswd.users | |
# Check-Ausführung aus dem Web Interface aktivieren | |
sudo touch /var/lib/icinga/rw/icinga.cmd | |
sudo chown nagios:nagios /var/lib/icinga/rw/icinga.cmd | |
sudo chmod -R 770 /var/lib/icinga/rw | |
sudo vi /etc/icinga/icinga.cfg | |
# check_external_commands=1 | |
# Berechtigungen für www-data setzen | |
sudo /usr/sbin/usermod -a -G nagios www-data | |
sudo apache2ctl restart | |
# Apache VHost configuration (normalerweise keine Anpassung nötig) | |
ls -l /etc/apache2/conf.d/icinga.conf | |
# Icinga Document Root (normalerweise keine Anpassung nötig) | |
ls -l /usr/share/icinga/htdocs | |
# Hier liegen die verfügbaren Nagios checks (keine Änderung erforderlich) | |
ls -l /usr/lib/nagios/plugins | |
# Grundsätzliche icinga Konfiguration (hosts, services, ...) | |
# https://github.com/etobi/mon-pi_etc_icinga | |
ls -l /etc/icinga/ | |
# Konfiguration für check_nrpe (checks remote ausführen) | |
# https://github.com/etobi/mon-pi_etc_nagios-plugins | |
ls -l /etc/nagios-plugins/config/check_nrpe.cfg | |
# Remote System konfigurieren: https://www.howtoforge.com/server-monitoring-with-icinga-on-debian-squeeze-p3 | |
# Icinga neu starten (nach jeder config änderung notwendig) | |
sudo service icinga restart | |
# Webinterface | |
# http://192.168.2.232/icinga | |
# Optional: Alternatives Web interface Icinga 2 (kompatibel mit dem hier verwendeten Icinga 1 Backend) | |
# http://www.thomas-krenn.com/de/wiki/Icinga_Web_2 | |
# Optional: check für Graphite | |
git clone https://github.com/pyr/check-graphite.git | |
cd check-graphite | |
gem install rest-client | |
cp check_graphite /usr/lib/nagios/plugins/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment