snmp_exporter
snmp_exporter copied to clipboard
Duplicate Entries in snmp.yml for paloalto_fw
Host operating system: output of uname -a
Linux hostname 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
snmp_exporter version: output of snmp_exporter -version
Docker Image quay.io/promehtues/snmp-exporter:v0.20.0 (I realize that this docker image may not be the responsibility of this project, but the issue is in the release v0.20.0).
What device/snmpwalk OID are you using?
paloalto_fw
What did you do that produced an error?
Requested metrics on a host
What did you expect to see?
Metrics
What did you see instead?
An error has occurred while serving metrics:
8 error(s) occurred:
* collected metric ifDescr label:<name:"ifDescr" value:"ethernet1/1" > label:<name:"ifIndex" value:"4" > gauge:<value:1 > has help "Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2" but should have "A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2"
* collected metric ifDescr label:<name:"ifDescr" value:"tunnel" > label:<name:"ifIndex" value:"400000000" > gauge:<value:1 > has help "Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2" but should have "A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2"
* collected metric ifIndex label:<name:"ifIndex" value:"400000000" > gauge:<value:4e+08 > has help "Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1" but should have "A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1"
* collected metric ifIndex label:<name:"ifIndex" value:"5" > gauge:<value:5 > has help "Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1" but should have "A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1"
* collected metric ifIndex label:<name:"ifIndex" value:"400000001" > gauge:<value:4.00000001e+08 > has help "Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1" but should have "A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1"
* collected metric ifDescr label:<name:"ifDescr" value:"ethernet1/2" > label:<name:"ifIndex" value:"5" > gauge:<value:1 > has help "Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2" but should have "A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2"
* collected metric ifIndex label:<name:"ifIndex" value:"4" > gauge:<value:4 > has help "Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1" but should have "A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1"
* collected metric ifDescr label:<name:"ifDescr" value:"tunnel.1" > label:<name:"ifIndex" value:"400000001" > gauge:<value:1 > has help "Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2" but should have "A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2"
Temporary Resolution
Commenting out lines: 20836 - 20843 Removes this error and metrics are fetched appropriately.
Interesting, it looks like PAN-COMMON-MIB
redefines ifIndex
and ifDescr
under their namespace (25461
).
IF-MIB
- name: ifIndex
oid: 1.3.6.1.2.1.2.2.1.1
type: gauge
help: A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1
indexes:
- labelname: ifIndex
type: gauge
- name: ifDescr
oid: 1.3.6.1.2.1.2.2.1.2
type: DisplayString
help: A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2
indexes:
- labelname: ifIndex
type: gauge
PAN-COMMON-MIB
- name: ifIndex
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.1
type: gauge
help: Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1
indexes:
- labelname: ifIndex
type: gauge
- name: ifDescr
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.2
type: DisplayString
help: Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2
indexes:
- labelname: ifIndex
type: gauge
Note the conflict of name to OID.
If I apply this patch to the Paloalto MIB, it generates a conflict-free config:
--- PAN-COMMON-MIB.orig 2021-02-28 18:09:53.744837310 +0100
+++ PAN-COMMON-MIB.new 2021-02-28 18:07:48.736007897 +0100
@@ -2992,18 +2992,18 @@
STATUS current
DESCRIPTION
"Entries are created when panIfCPS are added to the panIfCPSTable."
- INDEX { ifIndex }
+ INDEX { panifIndex }
::= { panIfTable 1 }
PanIfEntry ::= SEQUENCE {
- ifIndex Unsigned32,
- ifDescr DisplayString,
+ panifIndex Unsigned32,
+ panifDescr DisplayString,
panIfActiveTcpCps Unsigned32,
panIfActiveUdpCps Unsigned32,
panIfActiveOtherIpCps Unsigned32
}
- ifIndex OBJECT-TYPE
+ panifIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
@@ -3011,7 +3011,7 @@
"Index of the interface"
::= { panIfEntry 1 }
- ifDescr OBJECT-TYPE
+ panifDescr OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
The resulting diff in the snmp.yml is this:
diff --git a/snmp.yml b/snmp.yml
index a14f94d..8660725 100644
--- a/snmp.yml
+++ b/snmp.yml
@@ -20833,40 +20833,40 @@ paloalto_fw:
type: DisplayString
- labelname: panVsysId
type: gauge
- - name: ifIndex
+ - name: panifIndex
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.1
type: gauge
help: Index of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.1
indexes:
- - labelname: ifIndex
+ - labelname: panifIndex
type: gauge
- - name: ifDescr
+ - name: panifDescr
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.2
type: DisplayString
help: Description (name) of the interface - 1.3.6.1.4.1.25461.2.1.2.3.11.1.2
indexes:
- - labelname: ifIndex
+ - labelname: panifIndex
type: gauge
- name: panIfActiveTcpCps
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.3
type: gauge
help: Number of active TCP connections per second for this interface. - 1.3.6.1.4.1.25461.2.1.2.3.11.1.3
indexes:
- - labelname: ifIndex
+ - labelname: panifIndex
type: gauge
- name: panIfActiveUdpCps
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.4
type: gauge
help: Number of active UDP connections per second for this interface. - 1.3.6.1.4.1.25461.2.1.2.3.11.1.4
indexes:
- - labelname: ifIndex
+ - labelname: panifIndex
type: gauge
- name: panIfActiveOtherIpCps
oid: 1.3.6.1.4.1.25461.2.1.2.3.11.1.5
type: gauge
help: Number of active Other IP connections per second for this interface. - 1.3.6.1.4.1.25461.2.1.2.3.11.1.5
indexes:
- - labelname: ifIndex
+ - labelname: panifIndex
type: gauge
- name: panGPGWUtilizationPct
oid: 1.3.6.1.4.1.25461.2.1.2.5.1.1
Just ran into the same error and the same fix worked for me. Thanks for posting the work around @SuperQ !
Anyone with a PaloAlto service contract want to prod them into fixing their MIB?