disable checks for PSU and fan for specific devices

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
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

disable checks for PSU and fan for specific devices

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Post by npolovenko »

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.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Post by DOkuwa »

Thanks
no
I use Nagios core
it is from the command line I am talking about
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Post by npolovenko »

@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.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Post 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
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Post by DOkuwa »

efine command{
command_name check_alcatel_fans
command_line $USER1$/check_alcatel_fans.pl -C $_HOSTSNMPCOMMUNITY$ -H $HOSTADDRESS$
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: disable checks for PSU and fan for specific devices

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked