Closed dev9null closed 6 years ago
Thanks for the bug report or new device request, unfortunately you have not provided the information asked for in point 3 when you created this issue.
Please provide pastebin links to the information we need and we will re-open this issue.
There is no change needed to the OIDs in the panos.yaml file -- just additional states. Palo Alto Networks does not list the HA states in their MIB, but are nine states for the panSysHAState and panSysHAPeerState OIDs.
From a PAN OS box these are enumerated internally as:
ha.app.debug.state-set: enumeration: 0 'unknown' 1 'suspended' 2 'non-functional' 3 'initial' 4 'passive' 5 'active' 10 'tentative' 11 'active-secondary' 12 'active-primary'
The HA state is the string and it is the value retrieved via the panSysHAState and panSysHAPeerState.
If the LibreNMS discovery definition were to match the PAN OS internal enumeration, the panos.yaml file would look like this.
Maybe not but we still need the data so we can produce test data.
Will this work?
Setting the HA states manually to each possible state returns
for panSysHAState:
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "unknown"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "suspended"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "non-functional"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "initial"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "passive"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "active"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "tentative"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "active-secondary"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.11.0
.1.3.6.1.4.1.25461.2.1.2.1.11.0 = STRING: "active-primary"
$
and for panSysHAPeerState:
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "unknown"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "suspended"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "non-functional"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "initial"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "passive"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "active"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "tentative"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "active-secondary"
$
$ snmpget -v2c -c public -On 10.5.8.229 .1.3.6.1.4.1.25461.2.1.2.1.12.0
.1.3.6.1.4.1.25461.2.1.2.1.12.0 = STRING: "active-primary"
Since the OIDs are just returning an internal string, the snmpwalk isn't very helpful.
Verified on my local LibreNMS installation that this panos.yaml will correctly match the HA states returned by panSysHAState and panSysHAPeerState and graph the results.
Feel free to submit that as a pull request but we will need test data for it.
Sorry to be dense, but I'm struggling with what test data is necessary for this issue.
For the PANOS It would be good to include all the possible HA states in the includes/definitions/discovery/panos.yaml file.
The current HA modes (oid: panSysHAMode , num_oid: .1.3.6.1.4.1.25461.2.1.2.1.13. ) are complete with active-passive and active-active.
The panSysHAState and panSysHAPeerState is incomplete. In addition to active, passive, and suspended, the rest of the HA states for active-passive are
And the HA states for an active-active configuration are
This is from
librenms@librenms:~$ ./validate.php
====================================
[OK] Composer Version: 1.6.5 [OK] Dependencies up-to-date. [OK] Database connection successful [OK] Database schema correct