Created
February 11, 2013 15:10
-
-
Save HeikoBornholdt/4754989 to your computer and use it in GitHub Desktop.
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
= Icinga auf einem Uberspace betreiben | |
== Installation | |
Zuerst laden wir den Quelltext auf unseren Uberspace herunterladen und entpacken diesen anschließend: | |
mkdir ~/src | |
cd ~/src/ | |
wget http://sourceforge.net/projects/icinga/files/icinga/1.8.4/icinga-1.8.4.tar.gz | |
tar xzf icinga-1.8.4.tar.gz | |
cd icinga-1.8.4/ | |
./configure --prefix=/home/$USER/opt/icinga \ | |
--with-icinga-user=$USER \ | |
--with-icinga-group=$USER \ | |
--with-command-user=$USER \ | |
--with-command-group=$USER \ | |
--with-web-user=$USER \ | |
--with-web-group=$USER \ | |
--with-httpd-conf=/home/$USER/opt/icinga/etc/apache2 \ | |
--with-init-dir=/home/$USER/opt/icinga/etc/init.d \ | |
--with-cgiurl=/cgi-bin/icinga | |
Trotz der oben angegeben Benutzer/Gruppen müssen wir noch händisch akiv werden: | |
Datei "Makefile" anpassen ("root" gegen den eigenen Uberspacenamen austauschen): | |
INSTALL_OPTS=-o test9 -g test9 | |
Nun müssen die benötigten Verzeichnisse erstellt werden: | |
mkdir -p ~/opt/icinga | |
mkdir -p ~/opt/icinga/var/rw | |
mkdir -p ~/opt/icinga/var/lock | |
mkdir -p ~/opt/icinga/etc/apache2 | |
mkdir -p ~/opt/icinga/etc/init.d | |
mkdir /var/www/virtual/$USER/html/icinga | |
mkdir /var/www/virtual/$USER/cgi-bin/icinga | |
ln -s /var/www/virtual/$USER/cgi-bin/icinga ~/opt/icinga/sbin | |
ln -s /var/www/virtual/$USER/html/icinga ~/opt/icinga/share | |
Jetzt können wir Icina kompilieren: | |
make all | |
make install | |
make install-init | |
make install-config | |
make install-webconf | |
Damit suEXEC die Ausführung der .cgi-Dateien nicht verweigert, müssen deren Zugriffsrecht angepasst werden: | |
chmod 755 /var/www/virtual/$USER/cgi-bin/icinga/ | |
chmod 755 /var/www/virtual/$USER/cgi-bin/icinga/*.cgi | |
/home/$USER/opt/icinga/etc/icinga.cfg anpasse: | |
use_syslog=0 | |
/home/$USER/opt/icinga/etc/init.d/icinga anpassen: | |
IcingaLockDir=${prefix}/var/lock/subsys | |
HTTP-Benutzerkonto erstellen: | |
htpasswd -s -c /var/www/virtual/$USER/html/icinga/.htpasswd icingaadmin | |
Folgendes in die Datei /var/www/virtual/$USER/html/icinga/.htaccess packen: | |
AuthName "Icing Access" | |
AuthType Basic | |
AuthUserFile /var/www/virtual/test9/html/icinga/.htpasswd | |
Require valid-user | |
cp /var/www/virtual/$USER/html/icinga/.htaccess /var/www/virtual/$USER/cgi-bin/icinga/ | |
chmod +x ~/opt/icinga/etc/init.d/icinga | |
Icinga-Konfiguration prüfen: | |
~/opt/icinga/etc/init.d/icinga checkconfig | |
Icinga starten: | |
~/opt/icinga/etc/init.d/icinga start | |
Das ganze sollte man dann natürlich in ein daemontools-Job packen. | |
=== Nagios Plugins | |
Hierdurch werden die ganzen "check_xxx"-Befehle bereitgestellt. | |
cd ~/src/ | |
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz | |
tar xzf nagios-plugins-1.4.16.tar.gz | |
cd nagios-plugins-1.4.16/ | |
./configure --prefix=/home/$USER/opt/icinga \ | |
--with-nagios-user=$USER \ | |
--with-nagios-group=$USER | |
make | |
make install | |
=== NRPE | |
Hiermit kann man entfernte Nagios-Tests ausführen | |
cd ~/src/ | |
wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz/download -O nrpe-2.13.tar.gz | |
tar xzf nrpe-2.13.tar.gz | |
cd nrpe-2.13/ | |
./configure --prefix=/home/$USER/opt/icinga \ | |
--with-nagios-user=$USER \ | |
--with-nagios-group=$USER \ | |
--with-nrpe-user=$USER \ | |
--with-nrpe-group=$USER | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment