Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Parsing string label value as a numeric value for time series graphs. #1300

Closed
lZzozZl opened this issue Nov 22, 2024 · 0 comments
Closed

Parsing string label value as a numeric value for time series graphs. #1300

lZzozZl opened this issue Nov 22, 2024 · 0 comments

Comments

@lZzozZl
Copy link

lZzozZl commented Nov 22, 2024

Host operating system: output of uname -a

Linux o-monitoring 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

./snmp_exporter --version
snmp_exporter, version 0.25.0 (branch: HEAD, revision: 9c42d6c)
build user: root@880115266f70
build date: 20231210-10:05:18
go version: go1.21.5
platform: linux/amd64
tags: netgo

What device/snmpwalk OID are you using?

Its a Supermicro IPMI board

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

What did you do that produced an error?

What did you expect to see?

What did you see instead?

Hi all
i am not sure if this is for here or not but i will try to ask:

I'm using Prometheus and Grafana.
ipmi-snmp_exporter-0.25.0.linux-amd64

I am getting information from SuperMicro ipmi board
Currently i am using this query in Grafana which is great to show things in table form but not in time series graph.

sensorNumber{instance="$instance"} * on(sensorNumber) group_left(sensorIDString)
  (sensorIDString{instance="$instance", sensorIDString=~"CPU1 Temp|CPU1_VRMIN Temp|CPU1_VRMIO Temp|CPU2 Temp|CPU2_VRMIN Temp|CPU2_VRMIO Temp"}) 
  * on(sensorNumber) group_left (sensorReading) sensorReading{instance="$instance"}

So i try with ( for example )
sensorReading{instance="192.168.xxx.xxx", sensorNumber="1"}

Which returned

Element Value
sensorReading{instance="192.168.xxx.xxx",job="IPMI",sensorNumber="1",sensorReading="58.000"} 1

So basically my question is how can i make it instead of 1 for a value at the end to get 58.000 ( which is the value of sensorReading label ) as a value so i can use it in time series graphs too.

This is my config.yml which is used by the exporter.

auths:
  public_v1:
    community: <secret>
    security_level: noAuthNoPriv
    auth_protocol: MD5
    priv_protocol: DES
    version: 1
  public_v2:
    community: <secret>
    security_level: noAuthNoPriv
    auth_protocol: MD5
    priv_protocol: DES
    version: 2
modules:
  ipmi:
    walk:
    - 1.3.6.1.4.1.21317.1.14.2.1
    - 1.3.6.1.4.1.21317.1.3.1
    - 1.3.6.1.4.1.21317.1.6.2.1
    - 1.3.6.1.4.1.21317.1.6.3.1
    get:
    - 1.3.6.1.4.1.21317.1.4.0
    - 1.3.6.1.4.1.21317.1.5.6.0
    metrics:
    - name: psuIndex
      oid: 1.3.6.1.4.1.21317.1.14.2.1.1
      type: gauge
      help: A unique value, start from one, for each PSU - 1.3.6.1.4.1.21317.1.14.2.1.1
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: psuNumber
      oid: 1.3.6.1.4.1.21317.1.14.2.1.1
      type: gauge
      help: Instance number of this power supply unit. - 1.3.6.1.4.1.21317.1.14.2.1.1
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: psuStatus
      oid: 1.3.6.1.4.1.21317.1.14.2.1.2
      type: gauge
      help: PSU Status. - 1.3.6.1.4.1.21317.1.14.2.1.2
      indexes:
      - labelname: psuIndex
        type: gauge
      enum_values:
        0: fail
        1: good
    - name: psuDesc
      oid: 1.3.6.1.4.1.21317.1.14.2.1.2
      type: DisplayString
      help: The description of this PSU. - 1.3.6.1.4.1.21317.1.14.2.1.2
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: inputVoltage
      oid: 1.3.6.1.4.1.21317.1.14.2.1.3
      type: DisplayString
      help: PSU Input Voltage. - 1.3.6.1.4.1.21317.1.14.2.1.3
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: psuStatus
      oid: 1.3.6.1.4.1.21317.1.14.2.1.3
      type: DisplayString
      help: The current PSU status. - 1.3.6.1.4.1.21317.1.14.2.1.3
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: inputCurrent
      oid: 1.3.6.1.4.1.21317.1.14.2.1.4
      type: DisplayString
      help: PSU Input Current. - 1.3.6.1.4.1.21317.1.14.2.1.4
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: inputPower
      oid: 1.3.6.1.4.1.21317.1.14.2.1.5
      type: gauge
      help: PSU Input Power. - 1.3.6.1.4.1.21317.1.14.2.1.5
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: outputVoltage
      oid: 1.3.6.1.4.1.21317.1.14.2.1.6
      type: DisplayString
      help: PSU Output Voltage. - 1.3.6.1.4.1.21317.1.14.2.1.6
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: outputCurrent
      oid: 1.3.6.1.4.1.21317.1.14.2.1.7
      type: DisplayString
      help: PSU Output Current. - 1.3.6.1.4.1.21317.1.14.2.1.7
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: outputPower
      oid: 1.3.6.1.4.1.21317.1.14.2.1.8
      type: gauge
      help: PSU Output Power. - 1.3.6.1.4.1.21317.1.14.2.1.8
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: temperature1
      oid: 1.3.6.1.4.1.21317.1.14.2.1.9
      type: gauge
      help: PSU Temperature1. - 1.3.6.1.4.1.21317.1.14.2.1.9
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: temperature2
      oid: 1.3.6.1.4.1.21317.1.14.2.1.10
      type: gauge
      help: PSU Temperature2. - 1.3.6.1.4.1.21317.1.14.2.1.10
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: fanRPM1
      oid: 1.3.6.1.4.1.21317.1.14.2.1.11
      type: gauge
      help: PSU Fan RPM1. - 1.3.6.1.4.1.21317.1.14.2.1.11
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: fanRPM2
      oid: 1.3.6.1.4.1.21317.1.14.2.1.12
      type: gauge
      help: PSU Fan RPM2. - 1.3.6.1.4.1.21317.1.14.2.1.12
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: psuSerialNumber
      oid: 1.3.6.1.4.1.21317.1.14.2.1.13
      type: DisplayString
      help: PSU Serial Number. - 1.3.6.1.4.1.21317.1.14.2.1.13
      indexes:
      - labelname: psuIndex
        type: gauge
    - name: sensorNumber
      oid: 1.3.6.1.4.1.21317.1.3.1.1
      type: gauge
      help: A unique value, greater than zero, for each interface - 1.3.6.1.4.1.21317.1.3.1.1
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: sensorReading
      oid: 1.3.6.1.4.1.21317.1.3.1.2
      type: DisplayString
      help: A textual string containing information about the interface - 1.3.6.1.4.1.21317.1.3.1.2
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: sensorPositiveHysteresis
      oid: 1.3.6.1.4.1.21317.1.3.1.3
      type: gauge
      help: The type of interface - 1.3.6.1.4.1.21317.1.3.1.3
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: sensorNegativeHysteresis
      oid: 1.3.6.1.4.1.21317.1.3.1.4
      type: gauge
      help: The size of the largest packet which can be sent/received on the interface,
        specified in octets - 1.3.6.1.4.1.21317.1.3.1.4
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: lncThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.5
      type: DisplayString
      help: An estimate of the interface's current bandwidth in bits per second -
        1.3.6.1.4.1.21317.1.3.1.5
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: lcThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.6
      type: DisplayString
      help: The interface's address at its protocol sub-layer - 1.3.6.1.4.1.21317.1.3.1.6
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: lnrThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.7
      type: DisplayString
      help: The desired state of the interface - 1.3.6.1.4.1.21317.1.3.1.7
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: uncThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.8
      type: DisplayString
      help: The current operational state of the interface - 1.3.6.1.4.1.21317.1.3.1.8
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: ucThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.9
      type: DisplayString
      help: The value of sysUpTime at the time the interface entered its current operational
        state - 1.3.6.1.4.1.21317.1.3.1.9
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: unrThreshold
      oid: 1.3.6.1.4.1.21317.1.3.1.10
      type: DisplayString
      help: The total number of octets received on the interface, including framing
        characters - 1.3.6.1.4.1.21317.1.3.1.10
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: eventAssertionEnable
      oid: 1.3.6.1.4.1.21317.1.3.1.11
      type: gauge
      help: The number of packets, delivered by this sub-layer to a higher (sub-)layer,
        which were not addressed to a multicast or broadcast address at this sub-layer
        - 1.3.6.1.4.1.21317.1.3.1.11
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: eventDeassertionEnable
      oid: 1.3.6.1.4.1.21317.1.3.1.12
      type: gauge
      help: The number of packets, delivered by this sub-layer to a higher (sub-)layer,
        which were addressed to a multicast or broadcast address at this sub-layer
        - 1.3.6.1.4.1.21317.1.3.1.12
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: sensorIDString
      oid: 1.3.6.1.4.1.21317.1.3.1.13
      type: DisplayString
      help: 16-byte length field for displaying each available sensors' ID string.
        - 1.3.6.1.4.1.21317.1.3.1.13
      indexes:
      - labelname: sensorNumber
        type: gauge
    - name: powerStatus
      oid: 1.3.6.1.4.1.21317.1.4
      type: gauge
      help: Get and set the power status of system - 1.3.6.1.4.1.21317.1.4
      enum_values:
        0: poweroff
        1: poweron
        2: powerreset
    - name: hostName
      oid: 1.3.6.1.4.1.21317.1.5.6
      type: DisplayString
      help: BMC Host Name - 1.3.6.1.4.1.21317.1.5.6
    - name: cpuNumber
      oid: 1.3.6.1.4.1.21317.1.6.2.1.1
      type: gauge
      help: A unique value, greater than zero, for each CPU - 1.3.6.1.4.1.21317.1.6.2.1.1
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: processor
      oid: 1.3.6.1.4.1.21317.1.6.2.1.2
      type: DisplayString
      help: Processor name. - 1.3.6.1.4.1.21317.1.6.2.1.2
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: speed
      oid: 1.3.6.1.4.1.21317.1.6.2.1.3
      type: gauge
      help: Processor speed (MHz). - 1.3.6.1.4.1.21317.1.6.2.1.3
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: core
      oid: 1.3.6.1.4.1.21317.1.6.2.1.4
      type: gauge
      help: The number of processor cores. - 1.3.6.1.4.1.21317.1.6.2.1.4
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: coreActive
      oid: 1.3.6.1.4.1.21317.1.6.2.1.5
      type: gauge
      help: The number of active processor cores. - 1.3.6.1.4.1.21317.1.6.2.1.5
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: manufacturer
      oid: 1.3.6.1.4.1.21317.1.6.2.1.6
      type: DisplayString
      help: CPU Manufacturer - 1.3.6.1.4.1.21317.1.6.2.1.6
      indexes:
      - labelname: cpuNumber
        type: gauge
    - name: dimmNumber
      oid: 1.3.6.1.4.1.21317.1.6.3.1.1
      type: gauge
      help: A unique value, greater than zero, for each DIMM - 1.3.6.1.4.1.21317.1.6.3.1.1
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmLocation
      oid: 1.3.6.1.4.1.21317.1.6.3.1.2
      type: DisplayString
      help: The location of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.2
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmMaxCapSpeed
      oid: 1.3.6.1.4.1.21317.1.6.3.1.3
      type: gauge
      help: The max capable speed (MHz) of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.3
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmOpSpeed
      oid: 1.3.6.1.4.1.21317.1.6.3.1.4
      type: gauge
      help: The current operation speed (MHz) of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.4
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmSize
      oid: 1.3.6.1.4.1.21317.1.6.3.1.5
      type: gauge
      help: The size (MBytes) of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.5
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmSerialNo
      oid: 1.3.6.1.4.1.21317.1.6.3.1.6
      type: DisplayString
      help: The serial number of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.6
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmPartNo
      oid: 1.3.6.1.4.1.21317.1.6.3.1.7
      type: DisplayString
      help: The serial number of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.7
      indexes:
      - labelname: dimmNumber
        type: gauge
    - name: dimmManufacturer
      oid: 1.3.6.1.4.1.21317.1.6.3.1.8
      type: DisplayString
      help: The manufacturer of this DIMM. - 1.3.6.1.4.1.21317.1.6.3.1.8
      indexes:
      - labelname: dimmNumber
        type: gauge
    max_repetitions: 25
    retries: 3
    timeout: 5s
@prometheus prometheus locked and limited conversation to collaborators Nov 22, 2024
@SuperQ SuperQ converted this issue into discussion #1301 Nov 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant