[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.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
howtos:software:install_nagios_on_slackware [2015/08/01 12:16 (UTC)] – 3 typos I missed in preview... arfon | howtos:software:install_nagios_on_slackware [2015/11/27 11:35 (UTC)] – [Install Nagios On Slackware] jamesaxl | ||
---|---|---|---|
Line 11: | Line 11: | ||
</ | </ | ||
- Install the Nagios:: | - Install the Nagios:: | ||
- | cpan -i Nagios::Plugin | + | cpan -i Monitoring::Plugin |
</ | </ | ||
- Use [[http:// | - Use [[http:// | ||
Line 35: | Line 35: | ||
</ | </ | ||
- Edit ''/ | - Edit ''/ | ||
+ | COMMENT: | ||
+ | LoadModule mpm_event_module lib64/ | ||
+ | UNCOMMENT: | ||
+ | # | ||
UNCOMMENT: | UNCOMMENT: | ||
# | # | ||
Line 139: | Line 143: | ||
/ | / | ||
/ | / | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== 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 / | ||
+ | / | ||
+ | |||
+ | Test NRPE | ||
+ | / | ||
+ | NRPE v2.15 | ||
+ | | ||
+ | / | ||
+ | USERS OK - 1 users currently logged in |users=1; | ||
+ | |||
+ | Add your Nagios server' | ||
+ | vi / | ||
+ | allowed_hosts=127.0.0.1, | ||
+ | |||
+ | chown nagios: | ||
+ | |||
+ | ----- | ||
+ | **ON THE NAGIOS SERVER MACHINE:** | ||
+ | |||
+ | Add the client machine into one of the .cfg files | ||
+ | |||
+ | I did this: | ||
+ | vi / | ||
+ | ADD: | ||
+ | # Definitions for monitoring a linux machine | ||
+ | cfg_file=/ | ||
+ | |||
+ | chown nagios: | ||
+ | |||
+ | vi / | ||
+ | ######################################################### | ||
+ | # Linux configuration file | ||
+ | ######################################################### | ||
+ | | ||
+ | define host { | ||
+ | use linux-server | ||
+ | host_name | ||
+ | alias | ||
+ | address | ||
+ | register | ||
+ | } | ||
+ | define service{ | ||
+ | host_name MyLinuxBox | ||
+ | service_description PING | ||
+ | check_command check_ping!100.0, | ||
+ | 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: | ||
+ | |||
+ | Restart Nagios | ||
+ | / | ||
+ | |||
+ | |||
+ | |||