alerting. Seems like a passive check would be perfect, but not functioning as I
expect. Once setup, a simple command line would be enough to trigger an alert,
but getting inconsistent results. I would like to be able to set the service as
up/down at any time.
Code: Select all
version
Nagios XI 5.4.10
Linux cvglpnagios01.xx.xxx 3.10.0-693.11.1.el7.x86_64 #1 SMP Fri Oct 27 05:39:05 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
/app/nagios/etc/hosts/em-test-host.cfg
define host {
host_name em-test-host
use xiwizard_passive_host
alias A host for testing alerts
display_name em-test-host
address em-test-host
max_check_attempts 1
check_interval 5
retry_interval 0
active_checks_enabled 0
passive_checks_enabled 1
check_period xi_timeperiod_24x7
contacts servicenow-soap
notification_interval 60
notification_period xi_timeperiod_24x7
_xiwizard passivecheck
register 1
}
/app/nagios/etc/services/em-test-host.cfg
define service {
host_name em-test-host
service_description em-test-service
use xiwizard_passive_service
display_name em-test-service
max_check_attempts 1
check_interval 5
retry_interval 1
active_checks_enabled 0
passive_checks_enabled 1
check_period xi_timeperiod_24x7
notification_interval 5
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts servicenow-website-soap
_xiwizard passivecheck
register 1
}
command line
echo "[$DATE] PROCESS_SERVICE_CHECK_RESULT;em-test-host;em-test-service;2;Service Down" >> "/usr/local/nagios/var/rw/nagios.cmd"