Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some labels on index are wrong #505

Closed
adelbot opened this issue Apr 21, 2020 · 11 comments
Closed

Some labels on index are wrong #505

adelbot opened this issue Apr 21, 2020 · 11 comments

Comments

@adelbot
Copy link

adelbot commented Apr 21, 2020

Host operating system: output of uname -a

Linux weya0059.net.intra.laposte.fr 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

0.17.0

What device/snmpwalk OID are you using?

f5_bigip_ltm:
  walk:
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.6
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.8
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.10
  - 1.3.6.1.4.1.3375.2.2.5.2.3.1.3
  - 1.3.6.1.4.1.3375.2.2.5.2.3.1.30
  - 1.3.6.1.4.1.3375.2.2.5.2.3.1.31
  - 1.3.6.1.4.1.3375.2.2.5.2.3.1.5
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.11
  - 1.3.6.1.4.1.3375.2.2.5.2.3.1.8
  metrics:
  - name: ltmPoolStatServerBytesIn
    oid: 1.3.6.1.4.1.3375.2.2.5.2.3.1.3
    type: counter
    help: The number of bytes received by the specified pool from server-side. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.3
    indexes:
    - labelname: ltmPoolStatName
      type: DisplayString
  - name: ltmPoolStatTotRequests
    oid: 1.3.6.1.4.1.3375.2.2.5.2.3.1.30
    type: counter
    help: The total number of requests to the specified pool. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.30
    indexes:
    - labelname: ltmPoolStatName
      type: DisplayString
  - name: ltmPoolStatCurSessions
    oid: 1.3.6.1.4.1.3375.2.2.5.2.3.1.31
    type: gauge
    help: The current number of sessions to the specified pool. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.31
    indexes:
    - labelname: ltmPoolStatName
      type: DisplayString
  - name: ltmPoolStatServerBytesOut
    oid: 1.3.6.1.4.1.3375.2.2.5.2.3.1.5
    type: counter
    help: The number of packets sent to server-side from the specified pool. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.4
    indexes:
    - labelname: ltmPoolStatName
      type: DisplayString
  - name: ltmPoolMemberStatServerBytesIn
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.6
    type: counter
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
  - name: ltmPoolMemberStatServerBytesOut
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.8
    type: counter
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
  - name: ltmPoolMemberStatTotRequests
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    type: counter
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
  - name: ltmPoolMemberStatServerTotConns
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.10
    type: counter
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
  - name: ltmPoolMemberStatServerCurConns
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.11
    type: counter
    help: The number of bytes received by the specified pool from server-side. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.3
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
  - name: ltmPoolStatServerCurConns
    oid: 1.3.6.1.4.1.3375.2.2.5.2.3.1.8
    type: counter
    help: The number of bytes received by the specified pool from server-side. - 1.3.6.1.4.1.3375.2.2.5.2.3.1.3
    indexes:
    - labelname: ltmPoolStatName
      type: DisplayString

If this is a new device, please link to the MIB(s).

BIGIP

What did you do that produced an error?

The name of ltmPoolMemberStatPoolName is wrong in some case

What did you expect to see?

ltmPoolMemberStatTotRequests{ltmPoolMemberStatNodeName="/PART_UO0/node-wal-weya0797-10.154.20.165",ltmPoolMemberStatPoolName="/PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-to-11211"}

What did you see instead?

ltmPoolMemberStatTotRequests{ltmPoolMemberStatNodeName="/PART_UO0/node-wal-weya0797-10.154.20.165",ltmPoolMemberStatPoolName="/PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-dfd8a5e7"}

@brian-brazil
Copy link
Contributor

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@adelbot
Copy link
Author

adelbot commented Apr 21, 2020

I'm surprised of your response.
It seems to be a bug.
In fact, snmpwalk display the good label

@brian-brazil
Copy link
Contributor

There's insufficient information presented to indicate a bug, in particular no snmpwalk to indicate that the data had got mangled somehow.

@SuperQ
Copy link
Member

SuperQ commented Apr 21, 2020

According to the generator, the snmp.yml is wrong.

generator.yml:

modules:
  bigip:
    walk:
      - ltmPoolMemberStatTotRequests

snmp.yml:

bigip:
  walk:
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
  metrics:
  - name: ltmPoolMemberStatTotRequests
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    type: counter
    help: The total number of requests going through the specified pool member. -
      1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
    - labelname: ltmPoolMemberStatPort
      type: gauge

@adelbot
Copy link
Author

adelbot commented Apr 21, 2020 via email

@adelbot
Copy link
Author

adelbot commented Apr 21, 2020

snmp_exporter
bigip:
walk:

  • 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    metrics:
  • name: ltmPoolMemberStatTotRequests
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    type: counter
    help: The total number of requests going through the specified pool member. -
    1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    indexes:
    • labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    • labelname: ltmPoolMemberStatNodeName
      type: DisplayString
    • labelname: ltmPoolMemberStatPort
      type: gauge

Results
...
ltmPoolMemberStatTotRequests{ltmPoolMemberStatNodeName="/PART_UO0/node-wal-weya0573-10.154.20.149",ltmPoolMemberStatPoolName="/PART_UO0/pool-prd-wal-10.154.120.77-http-80-to-5601",ltmPoolMemberStatPort="5601"} 25177
ltmPoolMemberStatTotRequests{ltmPoolMemberStatNodeName="/PART_UO0/node-wal-weya0797-10.154.20.165",ltmPoolMemberStatPoolName="/PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-dfd8a5e7",ltmPoolMemberStatPort="11211"} 0
ltmPoolMemberStatTotRequests{ltmPoolMemberStatNodeName="/PART_UO0/node-wal-weya0800-10.154.20.175",ltmPoolMemberStatPoolName="/PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-ea139fd3",ltmPoolMemberStatPort="11211"} 0

snmpwalk -c public -v 2c -On xxxxxxx F5-BIGIP-LOCAL-MIB::ltmPoolMemberStatPoolName | grep wal | grep 11211

.1.3.6.1.4.1.3375.2.2.5.4.3.1.1.56.47.80.65.82.84.95.85.79.48.47.112.111.111.108.45.112.114.100.45.119.97.108.45.49.48.46.49.53.52.46.49.50.48.46.49.50.57.45.116.99.112.45.49.49.50.49.49.45.100.102.100.56.97.53.101.55.41.47.80.65.82.84.95.85.79.48.47.110.111.100.101.45.119.97.108.45.119.101.121.97.48.55.57.55.45.49.48.46.49.53.52.46.50.48.46.49.54.53.11211 = STRING: /PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-to-11211
.1.3.6.1.4.1.3375.2.2.5.4.3.1.1.56.47.80.65.82.84.95.85.79.48.47.112.111.111.108.45.112.114.100.45.119.97.108.45.49.48.46.49.53.52.46.49.50.48.46.49.50.57.45.116.99.112.45.49.49.50.49.49.45.101.97.49.51.57.102.100.51.41.47.80.65.82.84.95.85.79.48.47.110.111.100.101.45.119.97.108.45.119.101.121.97.48.56.48.48.45.49.48.46.49.53.52.46.50.48.46.49.55.53.11211 = STRING: /PART_UO0/pool-prd-wal-10.154.120.129-tcp-11211-to-11211

@SuperQ
Copy link
Member

SuperQ commented Apr 21, 2020

Your snmpwalk and your snmp_exporter walk do not match. One is walking 1.3.6.1.4.1.3375.2.2.5.4.3.1.19, the other is walking 1.3.6.1.4.1.3375.2.2.5.4.3.1.1.

What do you get for this:

snmpwalk -c public -v 2c -On xxxxxxx 1.3.6.1.4.1.3375.2.2.5.4.3.1.19

@adelbot
Copy link
Author

adelbot commented Apr 21, 2020

Yes
ltmPoolMemberStatTotRequests is 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
in snmp_exporter congfig
indexes:
labelname: ltmPoolMemberStatPoolName
type: DisplayString
labelname: ltmPoolMemberStatNodeName
type: DisplayString

I want to have 2 index (ltmPoolMemberStatPoolName and tmPoolMemberStatNodeName).

The snmpwalk is an exemple to display that ltmPoolMemberStatPoolName is correct in snmpwalk and wrong in snmp_exporter

@SuperQ
Copy link
Member

SuperQ commented Apr 21, 2020

Ok, I think I've figured out what's going wrong here. It's due to the fact that the device has an index named the same as an OID. This is a bit confusing.

It also looks like a device bug. It has different data in the index ltmPoolMemberStatPoolName vs the OID ltmPoolMemberStatPoolName.

In order to work around this device bug, we need to do a lookup.

generator.yml

modules:
  bigip:
    walk:
    - ltmPoolMemberStatPoolName
    - ltmPoolMemberStatTotRequests
    lookups:
    - source_indexes:
      - ltmPoolMemberStatPoolName
      - ltmPoolMemberStatNodeName
      - ltmPoolMemberStatPort
      lookup: 1.3.6.1.4.1.3375.2.2.5.4.3.1.1

snmp.yml

# WARNING: This file was auto-generated using snmp_exporter generator, manual changes will be lost.
bigip:
  walk:
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.1
  - 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
  metrics:
  - name: ltmPoolMemberStatPoolName
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.1
    type: DisplayString
    help: The name of a pool. - 1.3.6.1.4.1.3375.2.2.5.4.3.1.1
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
    - labelname: ltmPoolMemberStatPort
      type: gauge
    lookups:
    - labels:
      - ltmPoolMemberStatPoolName
      - ltmPoolMemberStatNodeName
      - ltmPoolMemberStatPort
      labelname: ltmPoolMemberStatPoolName
      oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.1
      type: DisplayString
  - name: ltmPoolMemberStatTotRequests
    oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    type: counter
    help: The total number of requests going through the specified pool member. -
      1.3.6.1.4.1.3375.2.2.5.4.3.1.19
    indexes:
    - labelname: ltmPoolMemberStatPoolName
      type: DisplayString
    - labelname: ltmPoolMemberStatNodeName
      type: DisplayString
    - labelname: ltmPoolMemberStatPort
      type: gauge
    lookups:
    - labels:
      - ltmPoolMemberStatPoolName
      - ltmPoolMemberStatNodeName
      - ltmPoolMemberStatPort
      labelname: ltmPoolMemberStatPoolName
      oid: 1.3.6.1.4.1.3375.2.2.5.4.3.1.1
      type: DisplayString

@brian-brazil
Copy link
Contributor

It's due to the fact that the device has an index named the same as an OID.

That's normal. ifIndex for example.

@adelbot
Copy link
Author

adelbot commented Apr 24, 2020

tks to all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants