Hi,
We have 2 core routers in our DC going to a single router at a campus. At the moment, I've set up SNMP polling on the core router to check the ospf neighbor table for a IP address to confirm the link is up. Given that some of the campuses come off the other router via a different link, half the hosts appear offline.
Is it possible for a service to check 2 ospf neighbors to confirm one or the other is up?
Sorry for my english.
Thanks
Checking 2 OSPF neighbors to confirm host is up
Re: Checking 2 OSPF neighbors to confirm host is up
I would write a simple script that runs the plugin twice - once for each router - and then applies some logic to determine if Nagios should receive an alert. Basically an exit status of 0 is OK, 1 is Warning, and 2 is Critical. Then just create a single service in Nagios that runs this new script as a command.
Former Nagios employee
Re: Checking 2 OSPF neighbors to confirm host is up
Great, thanks! Good suggestion, didn't think of that.
Time to brush up on my poor scripting (non-existant) skills -- I'm sure I can find something on the net which will help.
Thanks again! Appreciate it.
Time to brush up on my poor scripting (non-existant) skills -- I'm sure I can find something on the net which will help.
Thanks again! Appreciate it.
Re: Checking 2 OSPF neighbors to confirm host is up
If you need any help along the way with your script we'd be more than happy to help. I'll keep this thread open for a week or so in case you need anything.
Former Nagios employee
Re: Checking 2 OSPF neighbors to confirm host is up
That would be awesome. Like I wrote in the original post, I have it checking a single OSPF neighbour via SNMP by sending an IP address.tmcdonald wrote:If you need any help along the way with your script we'd be more than happy to help. I'll keep this thread open for a week or so in case you need anything.
So I start on the right foot, you suggested creating a script which runs that check_ospf!x.x.x.x command twice, one for each different IP.
This means I'd make a script which had check_ospf!x.x.x.x and check_ospf!y.y.y.y in it, run 1 after the other expecting an OK (or 0) to return and if it sees a 0 from either plugin run, it is deemed acceptable? Is that the right track?
Cheers
Edit: to clarify my OP, it doesn't have to connect to another router as the OSPF states are maintained between both routers.
Re: Checking 2 OSPF neighbors to confirm host is up
I'd say you're half-way there already!mgraygray wrote: This means I'd make a script which had check_ospf!x.x.x.x and check_ospf!y.y.y.y in it, run 1 after the other expecting an OK (or 0) to return and if it sees a 0 from either plugin run, it is deemed acceptable? Is that the right track?
Former Nagios employee
Re: Checking 2 OSPF neighbors to confirm host is up
Hrmm having no luck. I tried to adapt the code from check_sla and it's not playing the game. I think I might be over complicating something which could be done with much less code.
Do you have any ideas? It's on a off-net machine away from my desk -- can't SSH to it so I can't paste the code I tried into here but if you look at check_sla, it's essentially the component which does multiple checks then applies the a+b*y algorithm to produce a number which is OK or CRITICAL.
Thanks and sorry!
Do you have any ideas? It's on a off-net machine away from my desk -- can't SSH to it so I can't paste the code I tried into here but if you look at check_sla, it's essentially the component which does multiple checks then applies the a+b*y algorithm to produce a number which is OK or CRITICAL.
Thanks and sorry!
Re: Checking 2 OSPF neighbors to confirm host is up
I'd rather look at what you specifically have coded. Programming is a game of subtleties after all. Post the plugin when you can.
Former Nagios employee