[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.
no way to compare when less than two revisions
Diferencias
Muestra las diferencias entre dos versiones de la página.
— | es:howtos:software:nagios [2019/02/28 01:49 (UTC)] (actual) – creado slackwarespanol | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
+ | ====== Nagios ====== | ||
+ | ====== Installation ====== | ||
+ | |||
+ | - Create the nagios group and user: < | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | - Add the ' | ||
+ | | ||
+ | </ | ||
+ | - Install the Nagios:: | ||
+ | cpan -i Monitoring:: | ||
+ | </ | ||
+ | - Use [[http:// | ||
+ | * RRDTool | ||
+ | * nagios (currently, the package which can be built using a [[http:// | ||
+ | * nagios-plugin package | ||
+ | * nagios-graphing | ||
+ | - Edit ''/ | ||
+ | CHANGE: | ||
+ | | ||
+ | TO: | ||
+ | | ||
+ | CHANGE: | ||
+ | | ||
+ | TO: | ||
+ | | ||
+ | </ | ||
+ | - Edit ''/ | ||
+ | CHANGE: | ||
+ | | ||
+ | TO: | ||
+ | | ||
+ | </ | ||
+ | - Edit ''/ | ||
+ | COMMENT: | ||
+ | LoadModule mpm_event_module lib64/ | ||
+ | UNCOMMENT: | ||
+ | # | ||
+ | UNCOMMENT: | ||
+ | # | ||
+ | |||
+ | (or #LoadModule cgi_module lib/ | ||
+ | |||
+ | CHANGE: | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | TO: | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | CHANGE: | ||
+ | # Uncomment the following line to enable PHP: | ||
+ | # | ||
+ | # Include / | ||
+ | TO: | ||
+ | # Uncomment the following line to enable PHP: | ||
+ | # | ||
+ | | ||
+ | |||
+ | RIGHT AFTER: | ||
+ | | ||
+ | ADD: | ||
+ | | ||
+ | </ | ||
+ | - Make sure apache starts at boot and start/ | ||
+ | chmod 755 / | ||
+ | / | ||
+ | </ | ||
+ | - Set the password for // | ||
+ | | ||
+ | </ | ||
+ | - (Not sure if this is necessary but, leaving it in until I can test) \\ Make sure nagios starts at boot and start/ | ||
+ | - Edit ''/ | ||
+ | # Start nagios: | ||
+ | if [ -x / | ||
+ | echo " | ||
+ | / | ||
+ | fi | ||
+ | </ | ||
+ | - Edit ''/ | ||
+ | # Stop nagios: | ||
+ | if [ -x / | ||
+ | echo " | ||
+ | / | ||
+ | fi | ||
+ | </ | ||
+ | - Make rc.nagios executable: < | ||
+ | # chmod 755 / | ||
+ | </ | ||
+ | - Start nagios: < | ||
+ | # / | ||
+ | </ | ||
+ | |||
+ | ====== Check That Nagios Is Running ====== | ||
+ | |||
+ | Goto **http:// | ||
+ | |||
+ | ====== Add Users ====== | ||
+ | |||
+ | - Run the '' | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | - Edit ''/ | ||
+ | authorized_for_all_services=nagiosadmin, | ||
+ | authorized_for_all_hosts=nagiosadmin, | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== TROUBLESHOOTING ====== | ||
+ | ERROR: When browsing to the nagios webpage (as nagiosadmin) you get "You do not have permission" | ||
+ | |||
+ | HINT: Check / | ||
+ | |||
+ | FIX1: Make sure that / | ||
+ | |||
+ | FIX2: In / | ||
+ | UNCOMMENT: Include / | ||
+ | Do the "< | ||
+ | | ||
+ | ----- | ||
+ | |||
+ | ERROR: When clicking on Nagios cgi pages, they are downloaded and not executed. | ||
+ | |||
+ | FIX: Make sure the " | ||
+ | |||
+ | ----- | ||
+ | |||
+ | ERROR: " | ||
+ | |||
+ | FIX: vi / | ||
+ | | ||
+ | TO: $USER1$=/ | ||
+ | |||
+ | ----- | ||
+ | |||
+ | ERROR: I've done the FIXes above and it's still not working... | ||
+ | |||
+ | FIX: Didya restart httpd and/or nagios? | ||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== 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 | ||
+ | / | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== Sources ====== | ||
+ | |||
+ | <!-- If you are copying information from another source, then specify that source --> | ||
+ | <!-- * Original source: [[http:// | ||
+ | <!-- Authors are allowed to give credit to themselves! --> | ||
+ | * Originally written by [[wiki: | ||
+ | <!-- * Contributions by [[wiki: | ||
+ | |||
+ | <!-- Please do not modify anything below, except adding new tags.--> | ||
+ | <!-- You must remove the tag-word " | ||
+ | {{tag> |