Want to obtain a list of Cisco ASA model revs

If you need to get a list of your ASA devices that might be impacted by: http://www.cisco.com/c/en/us/support/web/clock-signal.html

Then you can use this script to get a list of all ASA5505, 5508 and 5516 models:


<?php

$init_modules = [];
include '/opt/librenms/includes/init.php';

$data = [];
//$debug=true;
//$vdebug=true;
$output = [];
foreach(dbFetchRows("SELECT * FROM devices WHERE os='asa' AND hardware REGEXP 'ASA5506.*|ASA5508.*|ASA5516.*'; ") as $device) {
    $data = snmpwalk_cache_oid($device, 'entPhysicalHardwareRev', $data, 'ENTITY-MIB');
    foreach ($data as $rev) {
        if (!empty($rev['entPhysicalHardwareRev'])) {
            $output[$device['hostname']] = ['rev' => $rev['entPhysicalHardwareRev'], 'model' => $device['hardware']];
        }
    }
}

foreach($output as $host => $data) {
    echo "$host, {$data['rev']}, {$data['model']}\n";
}