Added support for OS dd-wrt (#10500)

This commit is contained in:
arrmo
2019-08-07 20:01:13 +02:00
committed by PipoCanaja
parent a9cc36bc7f
commit 0c9330dc11
4 changed files with 96 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
os: dd-wrt
text: dd-wrt
type: network
icon: dd-wrt
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
discovery:
-
sysObjectID: .1.3.6.1.4.1.8072.3.2.10
snmpget:
oid: .1.3.6.1.4.1.8072.1.3.2.3.1.1.6.100.105.115.116.114.111
op: starts
value: dd-wrt
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* dd-wrt.inc.php
*
* LibreNMS os polling module for Tomato
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Neil Lathwood
* @author Neil Lathwood <[email protected]>
*/
// dd-wrt, cannot use exec with OID specified. Options are extend (w/OID), or exec (w/o OID)
// -> extend seems to be the recommended approach, so use that (changes OID, which "spells out" name)
list($ignore, $version) = explode(' ', snmp_get($device, '.1.3.6.1.4.1.8072.1.3.2.3.1.1.6.100.105.115.116.114.111', '-Osqnv'));
$hardware = snmp_get($device, '.1.3.6.1.4.1.8072.1.3.2.3.1.1.8.104.97.114.100.119.97.114.101', '-Osqnv');
unset($ignore);
+40
View File
@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.8072.3.2.10",
"sysDescr": "Linux wap-study 3.10.108-d8 #24797 Thu Jun 6 12:07:26 CEST 2019 mips",
"sysContact": null,
"version": null,
"hardware": null,
"features": null,
"os": "dd-wrt",
"type": "network",
"serial": null,
"icon": "dd-wrt.png",
"location": null
}
]
},
"poller": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.8072.3.2.10",
"sysDescr": "Linux wap-study 3.10.108-d8 #24797 Thu Jun 6 12:07:26 CEST 2019 mips",
"sysContact": "<private>",
"version": "3.10.108-d8",
"hardware": "Netgear WNDR4500",
"features": null,
"os": "dd-wrt",
"type": "network",
"serial": null,
"icon": "dd-wrt.png",
"location": "<private>"
}
]
}
}
}
+10
View File
@@ -0,0 +1,10 @@
1.3.6.1.2.1.1.1.0|4|Linux wap-study 3.10.108-d8 #24797 Thu Jun 6 12:07:26 CEST 2019 mips
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
1.3.6.1.2.1.1.3.0|67|12930721
1.3.6.1.2.1.1.4.0|4|<private>
1.3.6.1.2.1.1.5.0|4|<private>
1.3.6.1.2.1.1.6.0|4|<private>
1.3.6.1.2.1.25.1.1.0|67|17244413
1.3.6.1.4.1.8072.1.3.2.3.1.1.6.100.105.115.116.114.111|4|dd-wrt 3.10.108-d8
1.3.6.1.4.1.8072.1.3.2.3.1.1.8.104.97.114.100.119.97.114.101|4|Netgear WNDR4500
1.3.6.1.6.3.10.2.1.3.0|2|129307