disable checks for PSU and fan for specific devices

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

disable checks for PSU and fan for specific devices

Postby DOkuwa » Wed Mar 14, 2018 6:40 am

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

Re: disable checks for PSU and fan for specific devices

Postby npolovenko » Wed Mar 14, 2018 11:30 am

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.
User avatar
npolovenko
Support Tech
 
Posts: 2035
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Postby DOkuwa » Wed Mar 14, 2018 11:40 am

Thanks
no
I use Nagios core
it is from the command line I am talking about
DOkuwa
 
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Postby npolovenko » Wed Mar 14, 2018 11:56 am

@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.
User avatar
npolovenko
Support Tech
 
Posts: 2035
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Postby DOkuwa » Wed Mar 14, 2018 12:00 pm

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

Re: disable checks for PSU and fan for specific devices

Postby npolovenko » Wed Mar 14, 2018 12:40 pm

@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.
User avatar
npolovenko
Support Tech
 
Posts: 2035
Joined: Mon May 15, 2017 5:00 pm

Re: disable checks for PSU and fan for specific devices

Postby DOkuwa » Thu Mar 15, 2018 8:39 am

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

Postby DOkuwa » Thu Mar 15, 2018 8:42 am

efine command{
command_name check_alcatel_fans
command_line $USER1$/check_alcatel_fans.pl -C $_HOSTSNMPCOMMUNITY$ -H $HOSTADDRESS$
DOkuwa
 
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: disable checks for PSU and fan for specific devices

Postby lmiltchev » Thu Mar 15, 2018 1:31 pm

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/nagioscore/docs/nagioscore/4/en/objecttricks.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 10751
Joined: Mon May 23, 2011 12:15 pm


Return to Nagios Core

Who is online

Users browsing this forum: Phill123, scottwilkerson and 32 guests