Created
August 14, 2015 09:25
-
-
Save hroi/53b4651741bd3979c550 to your computer and use it in GitHub Desktop.
Add support for monitoring Cisco ASA failover cluster member status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: includes/definitions/status.inc.php | |
| =================================================================== | |
| --- includes/definitions/status.inc.php (revision 6856) | |
| +++ includes/definitions/status.inc.php (working copy) | |
| @@ -53,6 +53,22 @@ | |
| $config['status_states']['cisco-stackwise-redundant-state'][1] = array('name' => 'true', 'event' => 'ok'); | |
| $config['status_states']['cisco-stackwise-redundant-state'][2] = array('name' => 'false', 'event' => 'warning'); | |
| +// CISCO-FIREWALL-MIB | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][1] = array('name' => 'other', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][2] = array('name' => 'up', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][3] = array('name' => 'down', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][4] = array('name' => 'error', 'event' => 'alert'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][5] = array('name' => 'overTemp', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][6] = array('name' => 'busy', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][7] = array('name' => 'noMedia', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][8] = array('name' => 'backup', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][9] = array('name' => 'active', 'event' => 'ok'); | |
| +$config['status_states']['cisco-firewall-hardware-primary-state'][10] = array('name' => 'standby', 'event' => 'warn'); | |
| + | |
| +$config['status_states']['cisco-firewall-hardware-secondary-state'] = $config['status_states']['cisco-firewall-hardware-primary-state']; | |
| +$config['status_states']['cisco-firewall-hardware-secondary-state'][9] = array('name' => 'active', 'event' => 'warn'); | |
| +$config['status_states']['cisco-firewall-hardware-secondary-state'][10] = array('name' => 'standby', 'event' => 'ok'); | |
| + | |
| // FASTPATH-BOXSERVICES-PRIVATE-MIB | |
| // Note: this is for the old version of the Broadcom FastPath Box Services MIB. | |
| // Later versions of this have slightly different values. | |
| Index: includes/discovery/sensors/cisco-firewall-mib.inc.php | |
| =================================================================== | |
| --- includes/discovery/sensors/cisco-firewall-mib.inc.php (revision 0) | |
| +++ includes/discovery/sensors/cisco-firewall-mib.inc.php (working copy) | |
| @@ -0,0 +1,25 @@ | |
| +<?php | |
| + | |
| +echo(' CISCO-FIREWALL-MIB'); | |
| + | |
| +if ($device['os'] == 'asa') | |
| +{ | |
| + $status_array = snmpwalk_cache_oid($device, 'cfwHardwareStatusTable', array(), 'CISCO-FIREWALL-MIB'); | |
| + | |
| + if ($status_array['netInterface']['cfwHardwareStatusValue'] != 'down') | |
| + { | |
| + // device is configured for failover | |
| + | |
| + $descr = 'Failover ' . strtolower($status_array['primaryUnit']['cfwHardwareInformation']); | |
| + $oid = '.1.3.6.1.4.1.9.9.147.1.2.1.1.1.3.6'; | |
| + $value = $status_array['primaryUnit']['cfwHardwareStatusValue']; | |
| + discover_status($device, $oid, 'cfwHardwareStatusValue.primaryUnit', 'cisco-firewall-hardware-primary-state', $descr, $value, array('entPhysicalClass' => 'other')); | |
| + | |
| + $descr = 'Failover ' . strtolower($status_array['secondaryUnit']['cfwHardwareInformation']); | |
| + $oid = '.1.3.6.1.4.1.9.9.147.1.2.1.1.1.3.7'; | |
| + $value = $status_array['secondaryUnit']['cfwHardwareStatusValue']; | |
| + discover_status($device, $oid, 'cfwHardwareStatusValue.secondaryUnit', 'cisco-firewall-hardware-secondary-state', $descr, $value, array('entPhysicalClass' => 'other')); | |
| + } | |
| +} | |
| + | |
| +// EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment