Skip to content

Commit

Permalink
device: Added detection for Cisco SPA devices (#8446)
Browse files Browse the repository at this point in the history
* device: Added detection for Cisco SPA devices

* Drop sysDescr check
  • Loading branch information
laf authored and murrant committed Mar 29, 2018
1 parent 8ec70a9 commit 250b02f
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/definitions/ciscospa.yaml
@@ -0,0 +1,12 @@
os: ciscospa
text: 'Cisco Voice Gateway'
type: appliance
icon: cisco
group: cisco
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.9.6.1.23.1.1.1
40 changes: 40 additions & 0 deletions tests/data/ciscospa.json
@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "Linux SPA112 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl",
"sysContact": null,
"version": null,
"hardware": "",
"features": null,
"location": null,
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "Linux SPA112 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl",
"sysContact": "<private>",
"version": "0.00.51",
"hardware": "SPA112",
"features": null,
"location": "<private>",
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
}
}
}
40 changes: 40 additions & 0 deletions tests/data/ciscospa_spa112.json
@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "Linux SPA112 - Elevator 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl",
"sysContact": null,
"version": null,
"hardware": "",
"features": null,
"location": null,
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "Linux SPA112 - Elevator 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl",
"sysContact": null,
"version": null,
"hardware": "ciscoSB.23.1.1.1.3",
"features": null,
"location": null,
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
}
}
}
40 changes: 40 additions & 0 deletions tests/data/ciscospa_spa112_1.json
@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "CISCO SPA112 1.4.0(001)",
"sysContact": null,
"version": null,
"hardware": "",
"features": null,
"location": null,
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.9.6.1.23.1.1.1.3",
"sysDescr": "CISCO SPA112 1.4.0(001)",
"sysContact": null,
"version": null,
"hardware": "ciscoSB.23.1.1.1.3",
"features": null,
"location": null,
"os": "ciscospa",
"type": "appliance",
"serial": null,
"icon": "cisco.svg"
}
]
}
}
}
12 changes: 12 additions & 0 deletions tests/snmpsim/ciscospa.snmprec
@@ -0,0 +1,12 @@
1.3.6.1.2.1.1.1.0|4|Linux SPA112 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.9.6.1.23.1.1.1.3
1.3.6.1.2.1.1.3.0|67|35843438
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|35845391
1.3.6.1.2.1.47.1.1.1.1.4.1|2|0
1.3.6.1.2.1.47.1.1.1.1.7.1|4|SPA112
1.3.6.1.2.1.47.1.1.1.1.10.1|4|0.00.51
1.3.6.1.2.1.47.1.1.1.1.11.1|4|
1.3.6.1.2.1.47.1.1.1.1.13.1|4|SPA112
2 changes: 2 additions & 0 deletions tests/snmpsim/ciscospa_spa112.snmprec
@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Linux SPA112 - Elevator 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.9.6.1.23.1.1.1.3
2 changes: 2 additions & 0 deletions tests/snmpsim/ciscospa_spa112_1.snmprec
@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|CISCO SPA112 1.4.0(001)
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.9.6.1.23.1.1.1.3

0 comments on commit 250b02f

Please sign in to comment.