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
disable checks for PSU and fan for specific devices
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: disable checks for PSU and fan for specific devices
Hello, @DOkuwa. If you open these service checks in Core Configurations manager you can uncheck the "Active" box to disable them.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: disable checks for PSU and fan for specific devices
Thanks
no
I use Nagios core
it is from the command line I am talking about
no
I use Nagios core
it is from the command line I am talking about
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: disable checks for PSU and fan for specific devices
@DOkuwa, In this case, you can manually delete the fan and the PSU service check definitions from the config files. Have you tried that?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: disable checks for PSU and fan for specific devices
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
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: disable checks for PSU and fan for specific devices
@DOkuwa, I need to see how you have these services defined. Can you upload the commands and service definitions?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: disable checks for PSU and fan for specific devices
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
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
efine command{
command_name check_alcatel_fans
command_line $USER1$/check_alcatel_fans.pl -C $_HOSTSNMPCOMMUNITY$ -H $HOSTADDRESS$
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
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.I just want to disable fan and PSU for specific devices which are part of that group
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 ...
}
https://assets.nagios.com/downloads/nag ... ricks.html
Be sure to check out our Knowledgebase for helpful articles and solutions!