Page 1 of 1
disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 6:40 am
by DOkuwa
I have a group of devices with various checks using Nagios core on Linux(Ubuntu)
I just want to disable fan and PSU for specific devices which are part of that group
Re: disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 11:30 am
by npolovenko
Hello,
@DOkuwa. If you open these service checks in Core Configurations manager you can uncheck the "Active" box to disable them.
Re: disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 11:40 am
by DOkuwa
Thanks
no
I use Nagios core
it is from the command line I am talking about
Re: disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 11:56 am
by npolovenko
@DOkuwa, In this case, you can manually delete the fan and the PSU service check definitions from the config files. Have you tried that?
Re: disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 12:00 pm
by DOkuwa
if you do that you delete the whole check_psu and check_fans it affects the whole devices which are relying/using this service check
Re: disable checks for PSU and fan for specific devices
Posted: Wed Mar 14, 2018 12:40 pm
by npolovenko
@DOkuwa, I need to see how you have these services defined. Can you upload the commands and service definitions?
Re: disable checks for PSU and fan for specific devices
Posted: Thu Mar 15, 2018 8:39 am
by DOkuwa
service definition
define service{
name alcatel-fans
service_description Alcatel_Fans
use generic-service
check_command check_alcatel_fans
contact_groups Core_Team
register 0
host definition
efine host{
host_name ukldn-vhdc-rr01
use core-host
alias ukldn-vhdc-rr01
address xxxxxxx
hostgroups Core_Equipment
Re: disable checks for PSU and fan for specific devices
Posted: Thu Mar 15, 2018 8:42 am
by DOkuwa
efine command{
command_name check_alcatel_fans
command_line $USER1$/check_alcatel_fans.pl -C $_HOSTSNMPCOMMUNITY$ -H $HOSTADDRESS$
Re: disable checks for PSU and fan for specific devices
Posted: Thu Mar 15, 2018 1:31 pm
by lmiltchev
I just want to disable fan and PSU for specific devices which are part of that group
I don't see a host_name or a hostgroup_name directive in your service definition... I would assume that the "Alcatel_Fans" service is added to a hostgroup (via a template?), so basically you would like to exclude *some* hosts, members of this hostgroup. Please correct me if I am wrong.
If you have a service, that is added to multiple hosts or a hostgroup, and you would like to exclude some hosts/hostgroups, you could use something like this:
Code: Select all
define service {
host_name HOST1,HOST2,!HOST3,!HOST4,...,HOSTN
hostgroup_name HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN
service_description SOMESERVICE
other service directives ...
}
For more information on "time-saving tricks for object definitions", see our official Nagios Core documentation here:
https://assets.nagios.com/downloads/nag ... ricks.html