Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cisco's AsyncOS #6545

Merged
merged 9 commits into from May 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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];