check_ping allow bind to given interface/interface address?

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
fhanzlik
Posts: 1
Joined: Tue Jan 14, 2014 5:07 pm

check_ping allow bind to given interface/interface address?

Post by fhanzlik »

I want several ipv4 internet connections monitoring on multihomed Linux (i386 arch) router. I would like to avoid doing it with
some by cron executed shell+ping script due to wastage system resources, thus I'm searching for some better solution.
All I want is is to run some script (and possibly send e-mail) when some internet connection interrupts and when then goes back.
Of course, when there will be some additional benefits as logging probes results etc., it is welcome. Router has a sufficiently
powerful CPU and lots of memory.

Thus my question here - is nagios appropriate solution for this task?
On the one hand, it is maybe too big and complex, on other hand I e.g. in doc page about switch/router monitoring at:

http://nagios.sourceforge.net/docs/nagi ... uters.html

in section 'Monitoring Packet Loss and RTA' (which is perhaps most appropriate for me) I miss the presence of possibility
for binding to specified WAN interface on multihomed router - which is needed for monitoring paths to internet via each internet link.

Or can someone in this forum recommend more suitable solution?

Thanks in advance, Franta Hanzlik
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_ping allow bind to given interface/interface addre

Post by abrist »

There is no way to guarantee the route that a check will take through the router if it is load balanced between the multiple wan ports. You could create a router just for the nagios ip to always travel through 1 of your wan interfaces, but then you will not be able to check the other from the lan side. A custom script (running on the router) that attempts to make a connection to the internet through each of the interfaces may be the best solution.

Alternatively, if your router supports snmp, you may be able to check the wan interfaces - but this would depend on what mibs/oids your router supports.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked