Page 1 of 1

State of service should be flipped

Posted: Wed Apr 14, 2021 12:38 pm
by brad8381
Hey team,

i am new to this and trying to set up Nagios NMS for site use. we have 500 devices on the field and this includes about 200 SNMP devices, Routers/Switchs then 300+ devices with just ICMP monitoring.

i have successfully added all my devices to my Nagios. i used the Switch / router configuration wizard to set these up. i have a lot of warnings/criticals for interfaces that are down. the thing is these are meant to be down and this should be thier normal state and if something gets connected to these interfaces i would like to know.

Re: State of service should be flipped

Posted: Thu Apr 15, 2021 9:51 am
by ssax
You can use the negate plugin for this.

Go to Configure > Core Config Manager > Commands:
- Search for you command that the services are using
- Copy it, rename it, and add this onto the beginning of the existing Command Line value:

Code: Select all

$USER1$/negate -o CRITICAL -c OK -s
Then go edit the services you want to have this functionality and set their check command to the new one you just created.

That will flip them for you, see here for more info:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: State of service should be flipped

Posted: Thu Apr 15, 2021 12:01 pm
by brad8381
Thank you this is exactly what i needed.
is there a way to apply this to all the interfaces which are critical. - i have 500 critical warnings on the Nagios. will take a lot of time to look at each individually then select in CCM.

Re: State of service should be flipped

Posted: Fri Apr 16, 2021 10:53 am
by benjaminsmith
Hello,
is there a way to apply this to all the interfaces which are critical? - i have 500 critical warnings on the Nagios. will take a lot of time to look at each individually then select in CCM.
I would recommend adding all the services/hosts to a group then use the Bulk Mods Tool (Configure > Tools > Bulk Modification Tool) to make the changes across the group.

However, you cannot select objects in the CCM based on state type, but you could script this out using the Status and Config Endpoints in the API. The API is fully documented at Help > API Docs.

Let us know if you have further questions.