Check Cisco ASA Failover Status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
macranes
Posts: 30
Joined: Fri Nov 05, 2010 7:20 am

Check Cisco ASA Failover Status

Post by macranes »

Hi, I am trying to check the Cisco ASA failover status using the XI SNMP wizard. I would like to monitor the status of one of the ASA's to verify it is active so that traffic is being monitored with bluecoat and fireeye.

what I did:
ran the xi snmp wizard and the check command is: -o xxxxxxxxxxxxx -C ooooooooo -P 2c -r "`Primary Unit (this device)`"
I had to add the tilde ` because it was returning critical message: SNMP CRITICAL - *"Primary unit (this device)"*
I get this after adding the tilde: SNMP OK - "Primary unit (this device)"

It appears to be reading the status from the ASA because is the service alert stays ok/green when I fail over to the other node but the status changes to: "Primary unit" I was expecting this to be a Critical state.

Do I have something incorrect with the syntax, or am I using the incorrect method for what I am trying to do?

Thank you for your assistance.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check Cisco ASA Failover Status

Post by Box293 »

Instead of using the tilde use the single quote instead?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
macranes
Posts: 30
Joined: Fri Nov 05, 2010 7:20 am

Re: Check Cisco ASA Failover Status

Post by macranes »

Yes, I tried using the single quote instead of the tilde: -o xxxxxxxxxxxxx -C ooooooooo -P 2c -r "'Primary Unit (this device)'"
It returns the critical message: SNMP CRITICAL - *"Primary unit (this device)"*
the asterisk is back in the message
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Check Cisco ASA Failover Status

Post by Box293 »

What is the output when you snmpwalk this device at the particular OID?

I want to see exactly what is being returned.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
macranes
Posts: 30
Joined: Fri Nov 05, 2010 7:20 am

Re: Check Cisco ASA Failover Status

Post by macranes »

snmpwalk.png
here are the results for that OID.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Cisco ASA Failover Status

Post by lmiltchev »

Run check_snmp against this OID to see if the output will match "Primary Unit (this device)" (text and case).

Code: Select all

/usr/local/nagios/libexec/check_snmp -H <ip> -C <community> -P 2c -o <OID>
Wrap the output in single quotes only and try your check again:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H <ip> -C <community> -P 2c -o <OID> -r '<exact output>'
Be sure to check out our Knowledgebase for helpful articles and solutions!
macranes
Posts: 30
Joined: Fri Nov 05, 2010 7:20 am

Re: Check Cisco ASA Failover Status

Post by macranes »

i verified the output:
verify output.png
modified check command when the asa is primary: I got the expected results that it is ok
check status primary active.png
I failed over the firewall and then reran the check command but it is still showing ok with it not being primary. I was expecting it to be critical since the string didn't match.
check status primary failed over.png

am i incorrect to expect that I would get a Critical alert when the firewall is failed over and the check string no longer matches?
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Cisco ASA Failover Status

Post by slansing »

Do you know what that OID is checking? Are you running it against the same firewall in both those above cases? It may be that it is checking the counter which tells you if it properly failed over or not, you may be able to find another OID which checks a metric that would always fail when a failover occurred.
macranes
Posts: 30
Joined: Fri Nov 05, 2010 7:20 am

Re: Check Cisco ASA Failover Status

Post by macranes »

It is checking for the active/primary unit status. Yes, the commands are all on the same ASA.
When it is active the OID will read: "'Primary Unit (this device)'" |
When it is not active--failed over to the other ASA--the OID will read: "Primary Unit" |
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check Cisco ASA Failover Status

Post by tmcdonald »

Try searching just for:

Code: Select all

this device
I think the regex might be off.
Former Nagios employee
Locked