Page 1 of 1

check_ping allow bind to given interface/interface address?

Posted: Tue Jan 14, 2014 5:33 pm
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

Re: check_ping allow bind to given interface/interface addre

Posted: Wed Jan 15, 2014 10:50 am
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.