Nagios Installatie op de HN (grafspee)#

Om een beetje gevoel te krijgen van de beschikbaarheid van de diverse services installeren we Nagios op de HN.

  • Download tarball versie 2.9 van http://www.nagios.org
  • uitpakken naar /usr/local
  • ./configure draaien (na eerste met YaST de C/C++ compiler en tools te hebben geinstalleerd) :

*** Configuration summary for nagios 2.9 04-10-2007 ***:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  no
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
           Init directory:  /etc/rc.d
                  Host OS:  linux-gnu

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost/nagios/
                  CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):  /usr/sbin/traceroute
  • make all
  • make install
  • make install-init
  • make install-config (voor de sample config in ./etc)
  • eerste aanzet maken voor de config files (nagios.cfg en services.cfg)
  • controle syntax met /usr/local/nagios/bin/nagios -v ../etc/nagios.cfg
  • starten met /etc/init.d/nagios start
  • chkconfig apache2 on
  • chkconfig nagios on
  • opnemen in httpd.conf:
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin

<Directory "/usr/local/nagios/sbin">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>

Alias /nagios /usr/local/nagios/share

<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>
  • htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
  • cgi.cfg aangepast (authorized_for_xxxx statements, sound, interval van 90 naar 30)
  • download nagios-plugins-1.4.9.tar.gz
  • uitpakken naar /usr/local/nagios=plugins...
  • ./configure
  • make
  • make install
  • de plugins staan daarna in /usr/local/nagios/libexec