Page 1 of 1

How to monitor a perticular nagios server with other nagios

Posted: Tue Mar 21, 2017 8:32 pm
by shivakumar
How to monitor a perticular nagios server with other nagios server?

I need to get alert if one nagios server goes down. Is there any cfg file that could help me to configure it?

Re: How to monitor a perticular nagios server with other nag

Posted: Wed Mar 22, 2017 9:54 am
by cdienger
Greetings you could use the Nagios XI Server wizard found under Configure > Configuration Wizards to make sure the remote Nagios server is up and has the proper services running.

Re: How to monitor a perticular nagios server with other nag

Posted: Wed Mar 22, 2017 12:38 pm
by shivakumar
Thanks for the reply. Am looking for a cfg file to monitor nagios.

Re: How to monitor a perticular nagios server with other nag

Posted: Wed Mar 22, 2017 3:10 pm
by cdienger
Here is the host definition created by the wizard:

define host {
host_name 192.168.3.120
use xiwizard_nagiosxiserver_host
address 192.168.3.120
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
contacts nagiosadmin
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image nagiosxiserver.png
statusmap_image nagiosxiserver.png
_xiwizard nagiosxiserver
register 1
}

And here are the services:

define service {
host_name 192.168.3.120
service_description HTTP
use xiwizard_nagiosxiserver_http_service
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

define service {
host_name 192.168.3.120
service_description I/O Wait
use xiwizard_nagiosxiserver_service
check_command check_xi_nagiosxiserver!--address=192.168.3.120 --url=http://192.168.3.120/nagiosxi/ --username=nagiosadmin --ticket="Km35RGJE" --mode=iowait --warn="5" --crit="15"
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

define service {
host_name 192.168.3.120
service_description Load
use xiwizard_nagiosxiserver_service
check_command check_xi_nagiosxiserver!--address=192.168.3.120 --url=http://192.168.3.120/nagiosxi/ --username=nagiosadmin --ticket="Km35RGJE" --mode=load --warn="5,4,4" --crit="10,10,7"
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

define service {
host_name 192.168.3.120
service_description Nagios XI Daemons
use xiwizard_nagiosxiserver_service
check_command check_xi_nagiosxiserver!--address=192.168.3.120 --url=http://192.168.3.120/nagiosxi/ --username=nagiosadmin --ticket="Km35RGJE" --mode=daemons
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

define service {
host_name 192.168.3.120
service_description Nagios XI Jobs
use xiwizard_nagiosxiserver_service
check_command check_xi_nagiosxiserver!--address=192.168.3.120 --url=http://192.168.3.120/nagiosxi/ --username=nagiosadmin --ticket="Km35RGJE" --mode=jobs
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

define service {
host_name 192.168.3.120
service_description Ping
use xiwizard_nagiosxiserver_ping_service
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nagiosxiserver
register 1
}

Obviously change the IP address and ticket to your unique values. The ticket can be gathered from the backend api by going to http://ipofremotenagiosserver/nagiosxi/ ... agiosadmin password=40be4e59b9a2a2b5dffb918c0e86b3d7 where 40be4e59.... is the md5 hash of the nagiosadmin password.