[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
howtos:software:install_nagios_on_slackware [2015/08/01 12:16 (UTC)] – 3 typos I missed in preview... arfonhowtos:software:install_nagios_on_slackware [2015/11/27 11:35 (UTC)] – [Install Nagios On Slackware] jamesaxl
Line 11: Line 11:
 </code> </code>
   - Install the Nagios::Plugin Perl module: <code>   - Install the Nagios::Plugin Perl module: <code>
-     cpan -i Nagios::Plugin+     cpan -i Monitoring::Plugin
 </code> </code>
   - Use [[http://sbopkg.org/|sbopkg]] or install the individual packages using scripts from [[http://slackbuilds.org/|SlackBuilds.org]], and install the following in this order:   - Use [[http://sbopkg.org/|sbopkg]] or install the individual packages using scripts from [[http://slackbuilds.org/|SlackBuilds.org]], and install the following in this order:
Line 35: Line 35:
 </code> </code>
   - Edit ''/etc/httpd/http.conf'' <code>   - Edit ''/etc/httpd/http.conf'' <code>
 +COMMENT:
 +      LoadModule mpm_event_module lib64/httpd/modules/mod_mpm_event.so
 +UNCOMMENT:
 +     #LoadModule mpm_prefork_module lib64/httpd/modules/mod_mpm_prefork.so
 UNCOMMENT: UNCOMMENT:
      #LoadModule cgi_module lib64/httpd/modules/mod_cgi.so      #LoadModule cgi_module lib64/httpd/modules/mod_cgi.so
Line 139: Line 143:
      /etc/rc.d/rc.httpd restart      /etc/rc.d/rc.httpd restart
      /etc/rc.d/rc.nagios restart      /etc/rc.d/rc.nagios restart
 +
 +
 +
 +
 +====== Install NRPE On A Target Machine ======
 +
 +**ON THE TARGET MACHINE (as root):**
 +
 +  groupadd -g 213 nagios
 +  useradd -u 213 -d /dev/null -s /bin/false -g nagios nagios
 +
 +Install nagios via SBo (Required by Nagios-plugins)
 +
 +Install nagios-plugins via SBo (Required by NRPE)
 +
 +Install nrpe via SBo
 +
 +Ignore the xinetd stuff, you have to run NRPE as a daemon on Slackware (unless you want to go through the headache of replacing inetd with xinetd)
 +
 +So, start NRPE in Daemon mode:
 +  chmod 755 /etc/rc.d/rc.nrpe
 +  /etc/rc.d/rc.nrpe start
 +
 +Test NRPE
 +  /usr/libexec/nagios/check_nrpe -H localhost
 +  NRPE v2.15
 +  
 +  /usr/libexec/nagios/check_nrpe -H localhost -c check_users
 +  USERS OK - 1 users currently logged in |users=1;5;10;0
 +
 +Add your Nagios server's IP into the allowed_hosts list:
 +  vi /etc/nagios/nrpe.cfg
 +   allowed_hosts=127.0.0.1,192.168.1.77  (WHERE: 192.168.1.77 is the IP of your Nagios server)
 +
 +  chown nagios:nagios /etc/nagios/nrpe.cfg
 +
 +-----
 +**ON THE NAGIOS SERVER MACHINE:**
 +
 +Add the client machine into one of the .cfg files
 +
 +I did this:
 +  vi /etc/nagios/nagios.cfg
 +ADD:
 + # Definitions for monitoring a linux machine
 + cfg_file=/etc/nagios/objects/linux.cfg
 +
 +  chown nagios:nagios /etc/nagios/nagios.cfg
 +
 +  vi /etc/nagios/objects/linux.cfg_file
 +   #########################################################
 +   # Linux  configuration file
 +   #########################################################
 +   
 +   define host {
 +     use     linux-server
 +     host_name   MyLinuxBox
 +     alias     LinuxBox1
 +     address   192.168.1.110
 +     register   1
 +     }
 +   define service{
 +     host_name MyLinuxBox
 +     service_description PING
 +     check_command check_ping!100.0,20%!500.0,60%
 +     max_check_attempts 2
 +     check_interval 2
 +     retry_interval 2
 +     check_period 24x7
 +     check_freshness 1
 +     contact_groups admins
 +     notification_interval 2
 +     notification_period 24x7
 +     notifications_enabled 1
 +     register 1
 +     }
 +   
 +   #########################################################
 +   # END OF FILE
 +   #########################################################
 +
 +  chown nagios:nagios /etc/nagios/objects/linux.cfg_file
 +
 +Restart Nagios
 +   /etc/rc.d/rc.nagios restart
 +
 +
 +
  
  
 howtos:software:install_nagios_on_slackware ()