Managing Passive Host and Service Checks with Nagios Core

Slide Note
Embed
Share

Learn how to enable passive host and service checks in Nagios Core via the configuration file, allowing for monitoring without actively polling the hosts and services. Understand the setup, configuration, and usage of passive checks in your monitoring system. Explore examples and best practices for implementing passive checks effectively within Nagios Core.


Uploaded on Sep 07, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Passive host and service checks are enabled in Nagios Core via config.cfg Default location: /usr/local/nagios/etc/nagios.cfg accept_passive_host_checks=1 accept_passive_service_checks=1

  2. #!/bin/bash nrdp=/usr/local/nrdp/clients/send_nrdp.sh url=http://10.44.4.69/nrdp token=0vn53mbj3lk4 State Meaning 0 OK (GREEN) 1 WARNING (YELLOW) host=backup-server service="Oracle DB Backup" state=0 output="OK Backup Completed Successfully" 2 CRITICAL (RED) 3 UNKNOWN (GREY) ${nrdp} -u ${url} -t ${token} -H ${host} -s "${service}" -S ${state} -o "${output}"

  3. Time Status Message Logged 09:55 OK Disk C: 79% Full Not Logged 10:00 WARNING Disk C: 80% Full Logged 10:05 WARNING Disk C: 80% Full Not Logged 10:10 OK Disk C: 65% Full Logged 10:15 OK Disk C: 66% Full Not Logged

  4. Time Status Message Non-Volatile Volatile 09:55 OK Disk C: 79% Full Not Logged Logged 10:00 WARNING Disk C: 80% Full Logged Logged 10:05 WARNING Disk C: 80% Full Not Logged Not Logged 10:10 OK Disk C: 65% Full Logged Logged 10:15 OK Disk C: 66% Full Not Logged Logged

  5. *Note: Only during the check period above will a service be checked for freshness (within /usr/local/nagios/etc/commands.cfg) define command { command_name stale_critical command_line $USER1$/check_dummy 2 "Passive service has not checked in!" }

  6. define service{ host_name service_description is_volatile active_checks_enabled passive_checks_enabled other options airplane1.carrier.com Call Button 1A 1 0 1 }

  7. #!/bin/bash nrdp=/usr/local/nrdp/clients/send_nrdp.sh url=http://10.44.4.69/nrdp token=0vn53mbj3lk4 State Meaning 0 OK (GREEN) 1 WARNING (YELLOW) host=airplane1.carrier.com service="Call Button 1A" state=1 output= WARNING Call Button Pressed" 2 CRITICAL (RED) 3 UNKNOWN (GREY) ${nrdp} -u ${url} -t ${token} -H ${host} -s "${service}" -S ${state} -o "${output}

  8. #!/bin/bash nrdp=/usr/local/nrdp/clients/send_nrdp.sh url=http://10.44.4.69/nrdp token=0vn53mbj3lk4 State Meaning 0 OK (GREEN) 1 WARNING (YELLOW) host=airplane1.carrier.com service="Call Button 1A" state=0 output= OK Call Answered" 2 CRITICAL (RED) 3 UNKNOWN (GREY) ${nrdp} -u ${url} -t ${token} -H ${host} -s "${service}" -S ${state} -o "${output}"

  9. define service{ host_name service_description active_checks_enabled passive_checks_enabled check_freshness freshness_threshold check_command other options backup-server Oracle DB Backup 0 1 1 93600 no-backup-report }

  10. State Meaning File: /usr/local/nagios/etc/commands.cfg 0 OK (GREEN) 1 WARNING (YELLOW) 2 CRITICAL (RED) define command{ 3 UNKNOWN (GREY) command_name command_line no-backup-report /usr/local/nagios/libexec/check_dummy 2 "Results of backup job were not reported!" } Note: check_dummy does nothing but exit 2 (critical) and display the message in quotes

  11. #!/bin/bash nrdp=/usr/local/nrdp/clients/send_nrdp.sh url=http://10.44.4.69/nrdp token=0vn53mbj3lk4 State Meaning 0 OK (GREEN) 1 WARNING (YELLOW) 2 CRITICAL (RED) host=backup-server service="Oracle DB Backup" state=0 output="OK Backup Completed Successfully" 3 UNKNOWN (GREY) ${nrdp} -u ${url} -t ${token} -H ${host} -s "${service}" -S ${state} -o "${output}"

  12. Function Volatile State Stalking Freshness Freshness Threshold Lost Magic number entry Disabled Disabled Enabled 108 Minutes Team Member Status Reports Enabled Disabled Enabled 1 Month Security Event Enabled Enabled Disabled N/A Backup Success Disabled Disabled Enabled 26 Hours

More Related Content