Add Cisco Err-Disable interface event trap handler#13855
Add Cisco Err-Disable interface event trap handler#13855laf merged 18 commits intolibrenms:masterfrom bonzo81:CiscoErrDisableInterfaceEvent
Conversation
|
Although the handler and test work, I wasn't sure if my method to extract the ifIndex from the trap using |
| $oidText = $trap->toString(true); | ||
|
|
||
| preg_match('/.cErrDisableIfStatusCause\.(.*?)\./', $oidText, $ifIndex); |
There was a problem hiding this comment.
You should replace toString() with $trap->findOid('CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause')
How you want to get the ifIndex is up to you, one way would be;
>>> explode(".", $trap->findOid('CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause'))
=> [
"CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause",
"858734311",
"0",
]
| $oidText = $trap->toString(true); | ||
|
|
||
| preg_match('/.cErrDisableIfStatusCause\.(.*?)\./', $oidText, $ifIndex); |
There was a problem hiding this comment.
You should replace toString() with $trap->findOid('CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause')
How you want to get the ifIndex is up to you, one way would be;
>>> explode(".", $trap->findOid('CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause'))
=> [
"CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusCause",
"858734311",
"0",
]
…scoErrDisableInterfaceEvent
…nzo81/librenms into CiscoErrDisableInterfaceEvent
|
Great work @bonzo81 👍 |
|
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
Please give a short description what your pull request is for
SNMP Trap hander and test for Cisco Err-Disable Interface Event (Rev1) trap. Requires CISCO-ERR-DISABLE-MIB.
thanks to @Jellyfrog for help with test
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>, i.e./scripts/github-apply 5926After you are done testing, you can remove the changes with
./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.