change the default check from ping to something else

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
aristosv
Posts: 12
Joined: Wed Apr 11, 2018 12:48 am

change the default check from ping to something else

Post by aristosv »

This is the host definition for one of the servers I want to monitor.

Code: Select all

define host {
	use linux-server
	host_name srv001
	address 192.168.15.53
	hostgroups hostgroup1
	}

define service {
	use generic-service
	host_name srv001
	service_description process
	check_command check_remote_process
	}
Under Current Status > Services, I can see that the "check_remote_process" check for this host working just fine.
But under Current Status > Hosts, the default check is ping, and this server is configured NOT to reply to pings.

How/where do I change the default check for this server to something else, besides ping? Is there an option to change this for all the servers using a universal setting, so I don't have to make a change on all the hosts definitions?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: change the default check from ping to something else

Post by scottwilkerson »

being there isn't a check_command specified it must be specified in the template
this is a template

Code: Select all

use linux-server
And that definition could contain other templates.
BUt to override it you can add the command right to the host

Code: Select all

check_command     your_other_check
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aristosv
Posts: 12
Joined: Wed Apr 11, 2018 12:48 am

Re: change the default check from ping to something else

Post by aristosv »

thanks, that did it.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: change the default check from ping to something else

Post by scottwilkerson »

Great. Locking thread.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked