Skip to content

Commit

Permalink
newdevice: Added support for Cisco's AsyncOS (#6545)
Browse files Browse the repository at this point in the history
* Create asyncos.yaml

Added device definition for AsyncOS devices.

* Create asyncos.inc.php

Add poller definition for Async devices.

* Update asyncos.yaml

Added discovery modules.

* Update asyncos.inc.php

Refactored version, hardware, and serial parsers.

* Add AsyncOS MIBs

Add MIBs for AsyncOS WSA and ESA appliances.

* Added OS test

* AsyncOS Refactoring/OS Support

* Change serial number in unit OS test
  • Loading branch information
network-guy authored and laf committed May 2, 2017
1 parent 4c0412b commit 371c0ff
Show file tree
Hide file tree
Showing 7 changed files with 2,790 additions and 0 deletions.
25 changes: 25 additions & 0 deletions includes/definitions/asyncos.yaml
@@ -0,0 +1,25 @@
os: asyncos
text: 'Cisco AsyncOS'
type: proxy
icon: cisco
over:
- { graph: device_bits, text: Traffic }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
discovery:
- sysObjectId:
- .1.3.6.1.4.1.15497.1
mib_dir:
- cisco
poller_modules:
ipmi: 0
bgp-peers: 0
ospf: 0
stp: 0
ntp: 0
discovery_modules:
ports-stack: 0
cisco-vrf-lite: 0
bgp-peers: 0
stp: 0
ntp: 0
22 changes: 22 additions & 0 deletions includes/polling/os/asyncos.inc.php
@@ -0,0 +1,22 @@
<?php
/*
* LibreNMS Cisco AsyncOS information module
*
* Copyright (c) 2017 Mike Williams <mike@mgww.net>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/

list($hardware,$version,,$serial) = explode(',', $device['sysDescr']);

preg_match('/\w[\d]+\w?/', $hardware, $regexp_results);
$hardware = $regexp_results[0];

preg_match('/[\d\.-]+/', $version, $regexp_results);
$version = $regexp_results[0];

preg_match('/[[\w]+-[\w]+/', $serial, $regexp_results);
$serial = $regexp_results[0];

0 comments on commit 371c0ff

Please sign in to comment.