How to disable monitoring of unconnected interfaces?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mohans_15
Posts: 8
Joined: Tue Sep 08, 2015 1:15 am

How to disable monitoring of unconnected interfaces?

Post by mohans_15 »

Dear Experts,
I am using Nagios XI 2014.
I configured few network switches and routers.
When I added the device through wizard, it scanned and listed all the available interfaces and I checked all of them to monitor.
But there are few interfaces which are currently not connected. This triggers CRITICAL alert on those interfaces.
If the interface is made admin down, the severity changes to WARNING.
I need a solution that the unconnected interfaces should be made OK by default. Only if it is connected, it has to be monitored and notified for any alerts.

Note: Network Support will not be able to make all the unconnected ports as admin down.

Please advise to fix this .

Regards
Mohan
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to disable monitoring of unconnected interfaces?

Post by rkennedy »

You should be able to navigate to Configure -> Core Config Manager -> ### Services -> Click the service in question, and then un-check the 'Active' button. -> Save

Once that's done, it will disable the check on the service. Is that what you're looking for?
Former Nagios Employee
mohans_15
Posts: 8
Joined: Tue Sep 08, 2015 1:15 am

Re: How to disable monitoring of unconnected interfaces?

Post by mohans_15 »

No. Disabling the service check will not help. If that port is used/connected in future, I will not be able to monitor unless I enable it back.
I want the unconnected ports to trigger OK rather CRITICAL during the initial discovery. Also, I can amend this using "negate", but I am not sure if it will return the correct value when the port is connected in future.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: How to disable monitoring of unconnected interfaces?

Post by hsmith »

Negate would certainly work for the ones that are currently down, but it is going to say critical once the ports are back up, at which point you would need to take negate off. This might actually be a good approach, since I'd definitely like to know when people are sticking cords into my switches without telling me(I've seen some things when I was a help desk.... )
Former Nagios Employee.
me.
regionalverbandruhr
Posts: 9
Joined: Wed Mar 09, 2016 5:48 am

Re: How to disable monitoring of unconnected interfaces?

Post by regionalverbandruhr »

hey guys,

how did you "negate" the check? how can you apply this for all "critical" checks at once?
at the moment my switches are in a known state, but if you start including all your switches to nagios, you propally have a lot of failing ports which are not connected.

cheers.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to disable monitoring of unconnected interfaces?

Post by lmiltchev »

You will have to modify each check that you want to negate. Here's some examples:

Failing check:

Code: Select all

/usr/local/nagios/libexec/check_ifoperstatus -H x.x.x.x -C public -k 10 -v 2 -p 161  
CRITICAL: Interface Port: 10 Gigabit - Level (index 10) is down.

echo $?
2
Negated check (output is NOT substituted):

Code: Select all

/usr/local/nagios/libexec/negate -w OK -c OK /usr/local/nagios/libexec/check_ifoperstatus -H x.x.x.x -C public -k 10 -v 2 -p 161
CRITICAL: Interface Port: 10 Gigabit - Level (index 10) is down.

echo $?
0
Negated check (output IS substituted):

Code: Select all

/usr/local/nagios/libexec/negate -w OK -c OK -s /usr/local/nagios/libexec/check_ifoperstatus -H x.x.x.x -C public -k 10 -v 2 -p 161
OK: Interface Port: 10 Gigabit - Level (index 10) is down.

echo $?
0
Be sure to check out our Knowledgebase for helpful articles and solutions!
regionalverbandruhr
Posts: 9
Joined: Wed Mar 09, 2016 5:48 am

Re: How to disable monitoring of unconnected interfaces?

Post by regionalverbandruhr »

I have to modify every check by hand? I got 372 free Ports(aka failing checks) at the Moment (and there are still some switches not included jet).
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to disable monitoring of unconnected interfaces?

Post by tmcdonald »

You could either use templates, or the Bulk Modification tool if you have the Enterprise Edition features. It's located under Configure -> Core Config Manager -> Tools. If you do not have these features you can enable a free 60-day trial under Admin -> License Information.
Former Nagios employee
regionalverbandruhr
Posts: 9
Joined: Wed Mar 09, 2016 5:48 am

Re: How to disable monitoring of unconnected interfaces?

Post by regionalverbandruhr »

Maybe I got the Idea wrong of the Bulk Modification Tool or I`m to stupid to for it. But this tool serves a template which I can use to integrate my other Switches. But all Switches are different. Some are 24 Port other 48 and so on. And of cause is at every Switch different Ports up or down.

Is there a Solution where I can pick out all at the moment failing respectively down Switch Ports to save as "good" with the specification to send a mail if this port should get up? Otherwise massive Port monitoring wouldn`t make sence in anyway with Nagios.

Nagios XI is used as Enterprise Edition in my Company.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to disable monitoring of unconnected interfaces?

Post by tmcdonald »

regionalverbandruhr wrote:Is there a Solution where I can pick out all at the moment failing respectively down Switch Ports to save as "good" with the specification to send a mail if this port should get up?
There is currently no way to automatically apply the "negate" plugin to all ports that are down, no. Nagios assumes that if you are using the Switch / Router Wizard and you want to monitor a port, that you would like to be notified when it goes down. Otherwise if it is never used you'd likely just not monitor it.
Former Nagios employee
Locked