prometheus / snmp_exporter

SNMP Exporter for Prometheus
Apache License 2.0
1.65k stars 614 forks source link

collected metric was collected before with the same name and label values #1107

Open Saromany opened 7 months ago

Saromany commented 7 months ago

Hello guys,

sorry for the long post, I am quite a novice to prometheus, so any help would be appreciated,

Host operating system: output of uname -a

Linux 5.15.0-91-generic #101-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

snmp_exporter, version 0.25.0 (branch: HEAD, revision: 9c42d6c874d479314e612bca69558c81f8e26287) 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?

teraCPU

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

TERACPU-MIB DEFINITIONS ::= BEGIN

IMPORTS
        enterprises FROM RFC1155-SMI
        OBJECT-TYPE, Integer32 FROM SNMPv2-SMI;

ihse            OBJECT IDENTIFIER ::= {enterprises 38034}
teracpu         OBJECT IDENTIFIER ::= {ihse 1}
teraoem         OBJECT IDENTIFIER ::= {teracpu 1}
teraconf        OBJECT IDENTIFIER ::= {teracpu 2}
teratab         OBJECT IDENTIFIER ::= {teracpu 3}
teravar         OBJECT IDENTIFIER ::= {teracpu 4}
teratrap        OBJECT IDENTIFIER ::= {teracpu 5}

DisplayString ::= OCTET STRING

teraCPU MODULE-IDENTITY
    LAST-UPDATED    "201602100000Z"
    ORGANIZATION    "IHSE GmbH"
    CONTACT-INFO    "support@ihse.de"
    DESCRIPTION     "The MIB module for managing the Draco tera devices"

    REVISION        "201602100000Z"
    DESCRIPTION     "Implementation of firmware version 3.02"

    REVISION        "201312020000Z"
    DESCRIPTION     "Implementation of firmware version 3.00"

    REVISION        "201305030000Z"
    DESCRIPTION     "Range of object teraSlotIndex changed from (0..65) to (0..64)"

    REVISION        "201301100000Z"
    DESCRIPTION     "Implementation of objects teraFan*, teraTrapFan*, teraPower* and teraTrapPower*"

    REVISION        "201211260000Z"
    DESCRIPTION     "Implementation of objects teraSwitch* and teraTrapSwitch"

    REVISION        "201211160000Z"
    DESCRIPTION     "Object teraTaskStatus extended"

    REVISION        "201211150000Z"
    DESCRIPTION     "Added support for Extender, CPU and CON data tables"

    REVISION        "201211140000Z"
    DESCRIPTION     "The initial relase"
    ::= {teracpu 10}

--
-- teraoem group
--

teraManufacturer OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Company name"
    ::= {teraoem 1}

teraFamily OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Product family"
    ::= {teraoem 2}

teraType OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Product type"
    ::= {teraoem 3}

--
-- teraconf group
--

teraName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Name of the configuration"
    ::= {teraconf 1}

teraInfo OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Description of the configuration"
    ::= {teraconf 2}

teraDevice OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Device name"
    ::= {teraconf 3}

--
-- teratab group
--

-- task data table

teraTaskTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraTaskEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "Task data table"
    ::= {teratab 1}

teraTaskEntry OBJECT-TYPE
    SYNTAX      teraTaskEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the task data table"
    INDEX { teraTaskIndex }
    ::= {teraTaskTable 1}

teraTaskEntry ::=
    SEQUENCE {
        teraTaskIndex       Integer32,
        teraTaskName        DisplayString,
        teraTaskStatus      INTEGER,
        teraTaskCounter     Integer32,
        teraTaskCycle       Integer32}

teraTaskIndex OBJECT-TYPE
    SYNTAX      Integer32(0..6)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Task index (0..6)"
    ::= {teraTaskEntry 1}

teraTaskName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Task name"
    ::= {teraTaskEntry 2}

teraTaskStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    starting(1),
                    active(2),
                    busy(3),
                    waiting(4),
                    stopped(5),
                    error(6)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status information"
    ::= {teraTaskEntry 3}

teraTaskCounter OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Performance counter"
    ::= {teraTaskEntry 4}

teraTaskCycle OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Cycle time in microseconds"
    ::= {teraTaskEntry 5}

-- slot data table

teraSlotTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraSlotEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "Slot data table"
    ::= {teratab 2}

teraSlotEntry OBJECT-TYPE
    SYNTAX      teraSlotEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the slot data table"
    INDEX { teraSlotIndex }
    ::= {teraSlotTable 1}

teraSlotEntry ::=
    SEQUENCE {
        teraSlotIndex       Integer32,
        teraSlotStatus      Unsigned32,
        teraSlotVersion     DisplayString}

teraSlotIndex OBJECT-TYPE
    SYNTAX      Integer32(0..64)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Slot index, 0 = CPU-Card, 1..64 = IO-Card"
    ::= {teraSlotEntry 1}

teraSlotStatus OBJECT-TYPE
    SYNTAX      Unsigned32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Slot status
                Bit 1 - 3 set: ready
                Bit 4 set: active
                Bit 27 set: error
                Bit 31 set: module is on hold
                Bit 32 set: module is invalid"
    ::= {teraSlotEntry 2}

teraSlotVersion OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Type and firmware information"
    ::= {teraSlotEntry 3}

-- port data table

teraPortTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraPortEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "Port data table"
    ::= {teratab 3}

teraPortEntry OBJECT-TYPE
    SYNTAX      teraPortEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the port data table"
    INDEX { teraPortIndex }
    ::= {teraPortTable 1}

teraPortEntry ::=
    SEQUENCE {
        teraPortIndex           Integer32,
        teraPortStatus          Unsigned32,
        teraPortOutput          Integer32,
        teraPortExtenderIndex   Integer32,
        teraPortExtenderID      Integer32}

teraPortIndex OBJECT-TYPE
    SYNTAX      Integer32(1..2032)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Port index (1..2032)"
    ::= {teraPortEntry 1}

teraPortStatus OBJECT-TYPE
    SYNTAX      Unsigned32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Port status
                Bit 1-3 set: available but not in use
                Bit 1-7 set: port connected
                Bit 16 set: error"
    ::= {teraPortEntry 2}

teraPortOutput OBJECT-TYPE
    SYNTAX      Integer32(1..2032)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Index of the port connected (0=not connected)"
    ::= {teraPortEntry 3}

teraPortExtenderIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Index of the extender connected"
    ::= {teraPortEntry 4}

teraPortExtenderID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "ID of the extender connected"
    ::= {teraPortEntry 5}

-- extender data table

teraExtenderTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraExtenderEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "Extender data table"
    ::= {teratab 4}

teraExtenderEntry OBJECT-TYPE
    SYNTAX      teraExtenderEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the extender data table"
    INDEX { teraExtenderIndex }
    ::= {teraExtenderTable 1}

teraExtenderEntry ::=
    SEQUENCE {
        teraExtenderIndex           Integer32,
        teraExtenderStatus          OCTET STRING,
        teraExtenderID              Integer32,
        teraExtenderType            Unsigned32,
        teraExtenderPort            Integer32,
        teraExtenderSPort           Integer32,
        teraExtenderCpuConIndex     Integer32,
        teraExtenderCpuConID        Integer32,
        teraExtenderCpuConType      INTEGER}

teraExtenderIndex OBJECT-TYPE
    SYNTAX      Integer32(1..2048)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender index (1..2048)"
    ::= {teraExtenderEntry 1}

teraExtenderStatus OBJECT-TYPE
    SYNTAX      OCTET STRING
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender status
                 Bit0=KVM1
                 Bit1=KVM2
                 Bit2=HID active
                 Bit3=HID1 device
                 Bit4=HID2 device
                 Bit5=HID sync
                 Bit6=Video1
                 Bit7=Video2"
    ::= {teraExtenderEntry 2}

teraExtenderID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender ID"
    ::= {teraExtenderEntry 3}

teraExtenderType OBJECT-TYPE
    SYNTAX      Unsigned32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender type"
    ::= {teraExtenderEntry 4}

teraExtenderPort OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Primary port index (0=not connected)"
    ::= {teraExtenderEntry 5}

teraExtenderSPort OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Secondary port index (0=not connected)"
    ::= {teraExtenderEntry 6}

teraExtenderCpuConIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Index of the CPU/CON device assigned (0=not assigned)"
    ::= {teraExtenderEntry 7}

teraExtenderCpuConID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "ID of the CPU/CON device assigned (0=not assigned)"
    ::= {teraExtenderEntry 8}

teraExtenderCpuConType OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    CPU(1),
                    CON(2)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Device type information 1=CPU 2=CON"
    ::= {teraExtenderEntry 9}

-- cpu data table

teraCpuTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraCpuEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "CPU data table"
    ::= {teratab 5}

teraCpuEntry OBJECT-TYPE
    SYNTAX      teraCpuEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the CPU data table"
    INDEX { teraCpuIndex }
    ::= {teraCpuTable 1}

teraCpuEntry ::=
    SEQUENCE {
        teraCpuIndex            Integer32,
        teraCpuStatus           Unsigned32,
        teraCpuID               Integer32,
        teraCpuRealCpuIndex     Integer32,
        teraCpuRealCpuID        Integer32,
        teraCpuConIndex         Integer32,
        teraCpuConID            Integer32}

teraCpuIndex OBJECT-TYPE
    SYNTAX      Integer32(1..512)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CPU index (1..512)"
    ::= {teraCpuEntry 1}

teraCpuStatus OBJECT-TYPE
    SYNTAX      Unsigned32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CPU status
                Bit 2 set: private mode connection
                Bit 32 set: device has been defined"
    ::= {teraCpuEntry 2}

teraCpuID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CPU ID"
    ::= {teraCpuEntry 3}

teraCpuRealCpuIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "For a virtual/real CPU device the index of the real/virtual CPU assigned"
    ::= {teraCpuEntry 4}

teraCpuRealCpuID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "For a virtual/real CPU device the ID of the real/virtual CPU assigned"
    ::= {teraCpuEntry 5}

teraCpuConIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Index of the CON device connected (0=not connected)"
    ::= {teraCpuEntry 6}

teraCpuConID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "ID of the CON device connected (0=not connected)"
    ::= {teraCpuEntry 7}

-- con data table

teraConTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF teraConEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "CON data table"
    ::= {teratab 6}

teraConEntry OBJECT-TYPE
    SYNTAX      teraConEntry
    ACCESS      not-accessible
    STATUS      mandatory
    DESCRIPTION "An entry of the CON data table"
    INDEX { teraConIndex }
    ::= {teraConTable 1}

teraConEntry ::=
    SEQUENCE {
        teraConIndex            Integer32,
        teraConStatus           Unsigned32,
        teraConID               Integer32,
        teraConVirtualConIndex  Integer32,
        teraConVirtualConID     Integer32,
        teraConCpuIndex         Integer32,
        teraConCpuID            Integer32}

teraConIndex OBJECT-TYPE
    SYNTAX      Integer32(1..512)
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CON index (1..512)"
    ::= {teraConEntry 1}

teraConStatus OBJECT-TYPE
    SYNTAX      Unsigned32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CON status
                Bit 2 set: private mode connection
                Bit 3 set: video only connection
                Bit 32 set: device has been defined"
    ::= {teraConEntry 2}

teraConID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CON ID"
    ::= {teraConEntry 3}

teraConVirtualConIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "For a real CON device the index of the virtual CON assigned"
    ::= {teraConEntry 4}

teraConVirtualConID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "For a real CON device the ID of the virtual CON assigned"
    ::= {teraConEntry 5}

teraConCpuIndex OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Index of the CPU device connected (0=not connected)"
    ::= {teraConEntry 6}

teraConCpuID OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "ID of the CPU device connected (0=not connected)"
    ::= {teraConEntry 7}

--
-- teravar group
--

teraStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    active(1),
                    disabled(2)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of the matrix chip"
    ::= {teravar 1}

teraTemperature OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Temperature of the matrix chip
                recommended temperature: < 110°C
                maximum temperature:  130°C"
    ::= {teravar 2}

teraInsertSlot OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Last slot inserted"
    ::= {teravar 10}

teraRemoveSlot OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Last slot removed"
    ::= {teravar 11}

teraInvalidSlot OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Last slot marked as invalid"
    ::= {teravar 12}

teraInsertExtender OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Last extender inserted"
    ::= {teravar 20}

teraRemoveExtender OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Last extender removed"
    ::= {teravar 21}

teraSwitchFromUser OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "User ID"
    ::= {teravar 30}

teraSwitchFromCon OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CON ID"
    ::= {teravar 31}

teraSwitchCpu OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CPU ID to connect"
    ::= {teravar 32}

teraSwitchCon OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "CON ID to connect"
    ::= {teravar 33}

teraSwitchMode OBJECT-TYPE
    SYNTAX      INTEGER {
                    Standard(0),
                    VideoOnly(1),
                    Private(2),
                    ControlOnly(3)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Mode how to connect"
    ::= {teravar 34}

teraFan1Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    okay(1),
                    faulty(2)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of fan tray #1"
    ::= {teravar 40}

teraFan1Speed OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Speed of fan tray #1 in steps
    min: 0, max: 15"
    ::= {teravar 41}

teraFan2Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    okay(1),
                    faulty(2)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of fan tray #2"
    ::= {teravar 42}

teraFan2Speed OBJECT-TYPE
    SYNTAX      Integer32
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Speed of fan tray #2 in steps
    min: 0, max: 15"
    ::= {teravar 43}

teraPower1Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    available(1),
                    power(3),
                    faulty(4)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of power supply #1"
    ::= {teravar 50}

teraPower2Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    available(1),
                    power(3),
                    faulty(4)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of power supply #2"
    ::= {teravar 51}

teraPower3Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    available(1),
                    power(3),
                    faulty(4)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of power supply #3"
    ::= {teravar 52}

teraPower4Status OBJECT-TYPE
    SYNTAX      INTEGER {
                    unknown(0),
                    available(1),
                    power(3),
                    faulty(4)
                }
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Status of power supply #4"
    ::= {teravar 53}

teraExtenderPort OBJECT-TYPE
    SYNTAX      INTEGER
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender port"
    ::= {teravar 60}

teraExtenderID OBJECT-TYPE
    SYNTAX      INTEGER
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender ID"
    ::= {teravar 61}
--
teraExtenderStatus OBJECT-TYPE
    SYNTAX      OCTET STRING
    ACCESS      read-only
    STATUS      mandatory
    DESCRIPTION "Extender status"
    ::= {teravar 62}

-- teratrap group
--

teraTrapList OBJECT-IDENTITY
    STATUS      current
    DESCRIPTION "Notification objects"
    ::= {teratrap 0}

teraTrapStatus NOTIFICATION-TYPE
    OBJECTS     { teraStatus }
    STATUS      current
    DESCRIPTION "Status of the matrix"
    ::= {teraTrapList 1}

teraTrapTemperature NOTIFICATION-TYPE
    OBJECTS     { teraTemperature }
    STATUS      current
    DESCRIPTION "Temperature of the matrix chip
                recommended temperature: <110°C
                maximum temperature: 130°C"
    ::= {teraTrapList 2}

teraTrapInsertSlot NOTIFICATION-TYPE
    OBJECTS     { teraInsertSlot }
    STATUS      current
    DESCRIPTION "Last slot inserted"
    ::= {teraTrapList 10}

teraTrapRemoveSlot NOTIFICATION-TYPE
    OBJECTS     { teraRemoveSlot }
    STATUS      current
    DESCRIPTION "Last slot removed"
    ::= {teraTrapList 11}

teraTrapInvalidSlot NOTIFICATION-TYPE
    OBJECTS     { teraInvalidSlot }
    STATUS      current
    DESCRIPTION "Last slot marked as invalid"
    ::= {teraTrapList 12}

teraTrapInsertExtender NOTIFICATION-TYPE
    OBJECTS     { teraInsertExtender }
    STATUS      current
    DESCRIPTION "Last extender inserted"
    ::= {teraTrapList 20}

teraTrapRemoveExtender NOTIFICATION-TYPE
    OBJECTS     { teraRemoveExtender }
    STATUS      current
    DESCRIPTION "Last extender removed"
    ::= {teraTrapList 21}

teraTrapSwitch NOTIFICATION-TYPE
    OBJECTS     { teraSwitchFromUser,
                  teraSwitchFromCon,
                  teraSwitchCpu,
                  teraSwitchCon,
                  teraSwitchMode }
    STATUS      current
    DESCRIPTION "Switch command"
    ::= {teraTrapList 30}

teraTrapFan1 NOTIFICATION-TYPE
    OBJECTS     { teraFan1Status,
                  teraFan1Speed }
    STATUS      current
    DESCRIPTION "Status and speed of fan tray #1"
    ::= {teraTrapList 40}

teraTrapFan2 NOTIFICATION-TYPE
    OBJECTS     { teraFan2Status,
                  teraFan2Speed }
    STATUS      current
    DESCRIPTION "Status and speed of fan tray #2"
    ::= {teraTrapList 41}

teraTrapPower1 NOTIFICATION-TYPE
    OBJECTS     { teraPower1Status }
    STATUS      current
    DESCRIPTION "Status of power supply #1"
    ::= {teraTrapList 50}

teraTrapPower2 NOTIFICATION-TYPE
    OBJECTS     { teraPower2Status }
    STATUS      current
    DESCRIPTION "Status of power supply #2"
    ::= {teraTrapList 51}

teraTrapPower3 NOTIFICATION-TYPE
    OBJECTS     { teraPower3Status }
    STATUS      current
    DESCRIPTION "Status of power supply #3"
    ::= {teraTrapList 52}

teraTrapPower4 NOTIFICATION-TYPE
    OBJECTS     { teraPower4Status }
    STATUS      current
    DESCRIPTION "Status of power supply #4"
    ::= {teraTrapList 53}

teraTrapExtenderStatus NOTIFICATION-TYPE
    OBJECTS     { teraExtenderPort,
                  teraExtenderID,
                  teraExtenderStatus }
    STATUS      current
    DESCRIPTION "Extender status
                 Bit0=KVM1
                 Bit1=KVM2
                 Bit2=HID active
                 Bit3=HID1 device
                 Bit4=HID2 device
                 Bit5=HID sync
                 Bit6=Video1
                 Bit7=Video2"
    ::= {teraTrapList 60}
END

What did you do that produced an error?

I generated the snmp.yml config using the generator and specifying to walk teraoem, teraconf, teratab, tearavar

What did you expect to see?

metrics from the label

What did you see instead?

An error has occurred while serving metrics:

8 error(s) occurred:

if i remove teratab i get the metrics correct, so i guess the problem is there...

### generator.yml file:

auths:
  auth_name:
    version: 2  # SNMP version to use. Defaults to 2.
                # 1 will use GETNEXT, 2 and 3 use GETBULK.
    # Community string is used with SNMP v1 and v2. Defaults to "public".
    community: xxxx

modules:
  teraCPU:  # The module name. You can have as many modules as you want.
    walk:       # List of OIDs to walk. Can also be SNMP object names or specific instances.
      - teraoem
      - teraconf
      - teratab
      - teravar
      - teratrap
    max_repetitions: 25  # How many objects to request with GET/GETBULK, defaults to 25.
                         # May need to be reduced for buggy devices.
    retries: 3   # How many times to retry a failed request, defaults to 3.
    timeout: 5s  # Timeout for each individual SNMP request, defaults to 5s.
    lookups:
      - source_indexes: [ifIndex]
        lookup: ifAlias
      - source_indexes: [ifIndex]
        lookup: ifDescr

### snmp.yml file:

# WARNING: This file was auto-generated using snmp_exporter generator, manual changes will be lost.
auths:
  auth_name:
    community: xxxx
    security_level: noAuthNoPriv
    auth_protocol: MD5
    priv_protocol: DES
    version: 2
modules:
  teraCPU:
    walk:
    - 1.3.6.1.4.1.38034.1.1
    - 1.3.6.1.4.1.38034.1.2
    - 1.3.6.1.4.1.38034.1.3
    - 1.3.6.1.4.1.38034.1.4
    - 1.3.6.1.4.1.38034.1.5
    metrics:
    - name: teraManufacturer
      oid: 1.3.6.1.4.1.38034.1.1.1
      type: DisplayString
      help: Company name - 1.3.6.1.4.1.38034.1.1.1
    - name: teraFamily
      oid: 1.3.6.1.4.1.38034.1.1.2
      type: DisplayString
      help: Product family - 1.3.6.1.4.1.38034.1.1.2
    - name: teraType
      oid: 1.3.6.1.4.1.38034.1.1.3
      type: DisplayString
      help: Product type - 1.3.6.1.4.1.38034.1.1.3
    - name: teraName
      oid: 1.3.6.1.4.1.38034.1.2.1
      type: DisplayString
      help: Name of the configuration - 1.3.6.1.4.1.38034.1.2.1
    - name: teraInfo
      oid: 1.3.6.1.4.1.38034.1.2.2
      type: DisplayString
      help: Description of the configuration - 1.3.6.1.4.1.38034.1.2.2
    - name: teraDevice
      oid: 1.3.6.1.4.1.38034.1.2.3
      type: DisplayString
      help: Device name - 1.3.6.1.4.1.38034.1.2.3
    - name: teraTaskIndex
      oid: 1.3.6.1.4.1.38034.1.3.1.1.1
      type: gauge
      help: Task index (0..6) - 1.3.6.1.4.1.38034.1.3.1.1.1
      indexes:
      - labelname: teraTaskIndex
        type: gauge
    - name: teraTaskName
      oid: 1.3.6.1.4.1.38034.1.3.1.1.2
      type: DisplayString
      help: Task name - 1.3.6.1.4.1.38034.1.3.1.1.2
      indexes:
      - labelname: teraTaskIndex
        type: gauge
    - name: teraTaskStatus
      oid: 1.3.6.1.4.1.38034.1.3.1.1.3
      type: gauge
      help: Status information - 1.3.6.1.4.1.38034.1.3.1.1.3
      indexes:
      - labelname: teraTaskIndex
        type: gauge
      enum_values:
        0: unknown
        1: starting
        2: active
        3: busy
        4: waiting
        5: stopped
        6: error
    - name: teraTaskCounter
      oid: 1.3.6.1.4.1.38034.1.3.1.1.4
      type: gauge
      help: Performance counter - 1.3.6.1.4.1.38034.1.3.1.1.4
      indexes:
      - labelname: teraTaskIndex
        type: gauge
    - name: teraTaskCycle
      oid: 1.3.6.1.4.1.38034.1.3.1.1.5
      type: gauge
      help: Cycle time in microseconds - 1.3.6.1.4.1.38034.1.3.1.1.5
      indexes:
      - labelname: teraTaskIndex
        type: gauge
    - name: teraSlotIndex
      oid: 1.3.6.1.4.1.38034.1.3.2.1.1
      type: gauge
      help: Slot index, 0 = CPU-Card, 1..64 = IO-Card - 1.3.6.1.4.1.38034.1.3.2.1.1
      indexes:
      - labelname: teraSlotIndex
        type: gauge
    - name: teraSlotStatus
      oid: 1.3.6.1.4.1.38034.1.3.2.1.2
      type: gauge
      help: 'Slot status Bit 1 - 3 set: ready Bit 4 set: active Bit 27 set: error
        Bit 31 set: module is on hold Bit 32 set: module is invalid - 1.3.6.1.4.1.38034.1.3.2.1.2'
      indexes:
      - labelname: teraSlotIndex
        type: gauge
    - name: teraSlotVersion
      oid: 1.3.6.1.4.1.38034.1.3.2.1.3
      type: DisplayString
      help: Type and firmware information - 1.3.6.1.4.1.38034.1.3.2.1.3
      indexes:
      - labelname: teraSlotIndex
        type: gauge
    - name: teraPortIndex
      oid: 1.3.6.1.4.1.38034.1.3.3.1.1
      type: gauge
      help: Port index (1..2032) - 1.3.6.1.4.1.38034.1.3.3.1.1
      indexes:
      - labelname: teraPortIndex
        type: gauge
    - name: teraPortStatus
      oid: 1.3.6.1.4.1.38034.1.3.3.1.2
      type: gauge
      help: 'Port status Bit 1-3 set: available but not in use Bit 1-7 set: port connected
        Bit 16 set: error - 1.3.6.1.4.1.38034.1.3.3.1.2'
      indexes:
      - labelname: teraPortIndex
        type: gauge
    - name: teraPortOutput
      oid: 1.3.6.1.4.1.38034.1.3.3.1.3
      type: gauge
      help: Index of the port connected (0=not connected) - 1.3.6.1.4.1.38034.1.3.3.1.3
      indexes:
      - labelname: teraPortIndex
        type: gauge
    - name: teraPortExtenderIndex
      oid: 1.3.6.1.4.1.38034.1.3.3.1.4
      type: gauge
      help: Index of the extender connected - 1.3.6.1.4.1.38034.1.3.3.1.4
      indexes:
      - labelname: teraPortIndex
        type: gauge
    - name: teraPortExtenderID
      oid: 1.3.6.1.4.1.38034.1.3.3.1.5
      type: gauge
      help: ID of the extender connected - 1.3.6.1.4.1.38034.1.3.3.1.5
      indexes:
      - labelname: teraPortIndex
        type: gauge
    - name: teraExtenderIndex
      oid: 1.3.6.1.4.1.38034.1.3.4.1.1
      type: gauge
      help: Extender index (1..2048) - 1.3.6.1.4.1.38034.1.3.4.1.1
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderStatus
      oid: 1.3.6.1.4.1.38034.1.3.4.1.2
      type: OctetString
      help: Extender status Bit0=KVM1 Bit1=KVM2 Bit2=HID active Bit3=HID1 device Bit4=HID2
        device Bit5=HID sync Bit6=Video1 Bit7=Video2 - 1.3.6.1.4.1.38034.1.3.4.1.2
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderID
      oid: 1.3.6.1.4.1.38034.1.3.4.1.3
      type: gauge
      help: Extender ID - 1.3.6.1.4.1.38034.1.3.4.1.3
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderType
      oid: 1.3.6.1.4.1.38034.1.3.4.1.4
      type: gauge
      help: Extender type - 1.3.6.1.4.1.38034.1.3.4.1.4
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderPort
      oid: 1.3.6.1.4.1.38034.1.3.4.1.5
      type: gauge
      help: Primary port index (0=not connected) - 1.3.6.1.4.1.38034.1.3.4.1.5
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderSPort
      oid: 1.3.6.1.4.1.38034.1.3.4.1.6
      type: gauge
      help: Secondary port index (0=not connected) - 1.3.6.1.4.1.38034.1.3.4.1.6
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderCpuConIndex
      oid: 1.3.6.1.4.1.38034.1.3.4.1.7
      type: gauge
      help: Index of the CPU/CON device assigned (0=not assigned) - 1.3.6.1.4.1.38034.1.3.4.1.7
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderCpuConID
      oid: 1.3.6.1.4.1.38034.1.3.4.1.8
      type: gauge
      help: ID of the CPU/CON device assigned (0=not assigned) - 1.3.6.1.4.1.38034.1.3.4.1.8
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
    - name: teraExtenderCpuConType
      oid: 1.3.6.1.4.1.38034.1.3.4.1.9
      type: gauge
      help: Device type information 1=CPU 2=CON - 1.3.6.1.4.1.38034.1.3.4.1.9
      indexes:
      - labelname: teraExtenderIndex
        type: gauge
      enum_values:
        0: unknown
        1: CPU
        2: CON
    - name: teraCpuIndex
      oid: 1.3.6.1.4.1.38034.1.3.5.1.1
      type: gauge
      help: CPU index (1..512) - 1.3.6.1.4.1.38034.1.3.5.1.1
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuStatus
      oid: 1.3.6.1.4.1.38034.1.3.5.1.2
      type: gauge
      help: 'CPU status Bit 2 set: private mode connection Bit 32 set: device has
        been defined - 1.3.6.1.4.1.38034.1.3.5.1.2'
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuID
      oid: 1.3.6.1.4.1.38034.1.3.5.1.3
      type: gauge
      help: CPU ID - 1.3.6.1.4.1.38034.1.3.5.1.3
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuRealCpuIndex
      oid: 1.3.6.1.4.1.38034.1.3.5.1.4
      type: gauge
      help: For a virtual/real CPU device the index of the real/virtual CPU assigned
        - 1.3.6.1.4.1.38034.1.3.5.1.4
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuRealCpuID
      oid: 1.3.6.1.4.1.38034.1.3.5.1.5
      type: gauge
      help: For a virtual/real CPU device the ID of the real/virtual CPU assigned
        - 1.3.6.1.4.1.38034.1.3.5.1.5
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuConIndex
      oid: 1.3.6.1.4.1.38034.1.3.5.1.6
      type: gauge
      help: Index of the CON device connected (0=not connected) - 1.3.6.1.4.1.38034.1.3.5.1.6
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraCpuConID
      oid: 1.3.6.1.4.1.38034.1.3.5.1.7
      type: gauge
      help: ID of the CON device connected (0=not connected) - 1.3.6.1.4.1.38034.1.3.5.1.7
      indexes:
      - labelname: teraCpuIndex
        type: gauge
    - name: teraConIndex
      oid: 1.3.6.1.4.1.38034.1.3.6.1.1
      type: gauge
      help: CON index (1..512) - 1.3.6.1.4.1.38034.1.3.6.1.1
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConStatus
      oid: 1.3.6.1.4.1.38034.1.3.6.1.2
      type: gauge
      help: 'CON status Bit 2 set: private mode connection Bit 3 set: video only connection
        Bit 32 set: device has been defined - 1.3.6.1.4.1.38034.1.3.6.1.2'
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConID
      oid: 1.3.6.1.4.1.38034.1.3.6.1.3
      type: gauge
      help: CON ID - 1.3.6.1.4.1.38034.1.3.6.1.3
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConVirtualConIndex
      oid: 1.3.6.1.4.1.38034.1.3.6.1.4
      type: gauge
      help: For a real CON device the index of the virtual CON assigned - 1.3.6.1.4.1.38034.1.3.6.1.4
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConVirtualConID
      oid: 1.3.6.1.4.1.38034.1.3.6.1.5
      type: gauge
      help: For a real CON device the ID of the virtual CON assigned - 1.3.6.1.4.1.38034.1.3.6.1.5
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConCpuIndex
      oid: 1.3.6.1.4.1.38034.1.3.6.1.6
      type: gauge
      help: Index of the CPU device connected (0=not connected) - 1.3.6.1.4.1.38034.1.3.6.1.6
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraConCpuID
      oid: 1.3.6.1.4.1.38034.1.3.6.1.7
      type: gauge
      help: ID of the CPU device connected (0=not connected) - 1.3.6.1.4.1.38034.1.3.6.1.7
      indexes:
      - labelname: teraConIndex
        type: gauge
    - name: teraStatus
      oid: 1.3.6.1.4.1.38034.1.4.1
      type: gauge
      help: Status of the matrix chip - 1.3.6.1.4.1.38034.1.4.1
      enum_values:
        0: unknown
        1: active
        2: disabled
    - name: teraTemperature
      oid: 1.3.6.1.4.1.38034.1.4.2
      type: gauge
      help: 'Temperature of the matrix chip recommended temperature: < 110°C maximum
        temperature: 130°C - 1.3.6.1.4.1.38034.1.4.2'
    - name: teraInsertSlot
      oid: 1.3.6.1.4.1.38034.1.4.10
      type: gauge
      help: Last slot inserted - 1.3.6.1.4.1.38034.1.4.10
    - name: teraRemoveSlot
      oid: 1.3.6.1.4.1.38034.1.4.11
      type: gauge
      help: Last slot removed - 1.3.6.1.4.1.38034.1.4.11
    - name: teraInvalidSlot
      oid: 1.3.6.1.4.1.38034.1.4.12
      type: gauge
      help: Last slot marked as invalid - 1.3.6.1.4.1.38034.1.4.12
    - name: teraInsertExtender
      oid: 1.3.6.1.4.1.38034.1.4.20
      type: gauge
      help: Last extender inserted - 1.3.6.1.4.1.38034.1.4.20
    - name: teraRemoveExtender
      oid: 1.3.6.1.4.1.38034.1.4.21
      type: gauge
      help: Last extender removed - 1.3.6.1.4.1.38034.1.4.21
    - name: teraSwitchFromUser
      oid: 1.3.6.1.4.1.38034.1.4.30
      type: gauge
      help: User ID - 1.3.6.1.4.1.38034.1.4.30
    - name: teraSwitchFromCon
      oid: 1.3.6.1.4.1.38034.1.4.31
      type: gauge
      help: CON ID - 1.3.6.1.4.1.38034.1.4.31
    - name: teraSwitchCpu
      oid: 1.3.6.1.4.1.38034.1.4.32
      type: gauge
      help: CPU ID to connect - 1.3.6.1.4.1.38034.1.4.32
    - name: teraSwitchCon
      oid: 1.3.6.1.4.1.38034.1.4.33
      type: gauge
      help: CON ID to connect - 1.3.6.1.4.1.38034.1.4.33
    - name: teraSwitchMode
      oid: 1.3.6.1.4.1.38034.1.4.34
      type: gauge
      help: Mode how to connect - 1.3.6.1.4.1.38034.1.4.34
      enum_values:
        0: Standard
        1: VideoOnly
        2: Private
        3: ControlOnly
    - name: teraFan1Status
      oid: 1.3.6.1.4.1.38034.1.4.40
      type: gauge
      help: 'Status of fan tray #1 - 1.3.6.1.4.1.38034.1.4.40'
      enum_values:
        0: unknown
        1: okay
        2: faulty
    - name: teraFan1Speed
      oid: 1.3.6.1.4.1.38034.1.4.41
      type: gauge
      help: 'Speed of fan tray #1 in steps min: 0, max: 15 - 1.3.6.1.4.1.38034.1.4.41'
    - name: teraFan2Status
      oid: 1.3.6.1.4.1.38034.1.4.42
      type: gauge
      help: 'Status of fan tray #2 - 1.3.6.1.4.1.38034.1.4.42'
      enum_values:
        0: unknown
        1: okay
        2: faulty
    - name: teraFan2Speed
      oid: 1.3.6.1.4.1.38034.1.4.43
      type: gauge
      help: 'Speed of fan tray #2 in steps min: 0, max: 15 - 1.3.6.1.4.1.38034.1.4.43'
    - name: teraPower1Status
      oid: 1.3.6.1.4.1.38034.1.4.50
      type: gauge
      help: 'Status of power supply #1 - 1.3.6.1.4.1.38034.1.4.50'
      enum_values:
        0: unknown
        1: available
        3: power
        4: faulty
    - name: teraPower2Status
      oid: 1.3.6.1.4.1.38034.1.4.51
      type: gauge
      help: 'Status of power supply #2 - 1.3.6.1.4.1.38034.1.4.51'
      enum_values:
        0: unknown
        1: available
        3: power
        4: faulty
    - name: teraPower3Status
      oid: 1.3.6.1.4.1.38034.1.4.52
      type: gauge
      help: 'Status of power supply #3 - 1.3.6.1.4.1.38034.1.4.52'
      enum_values:
        0: unknown
        1: available
        3: power
        4: faulty
    - name: teraPower4Status
      oid: 1.3.6.1.4.1.38034.1.4.53
      type: gauge
      help: 'Status of power supply #4 - 1.3.6.1.4.1.38034.1.4.53'
      enum_values:
        0: unknown
        1: available
        3: power
        4: faulty
    - name: teraExtenderPort
      oid: 1.3.6.1.4.1.38034.1.4.60
      type: gauge
      help: Extender port - 1.3.6.1.4.1.38034.1.4.60
    - name: teraExtenderID
      oid: 1.3.6.1.4.1.38034.1.4.61
      type: gauge
      help: Extender ID - 1.3.6.1.4.1.38034.1.4.61
    - name: teraExtenderStatus
      oid: 1.3.6.1.4.1.38034.1.4.62
      type: OctetString
      help: Extender status - 1.3.6.1.4.1.38034.1.4.62
    max_repetitions: 25
    retries: 3
    timeout: 5s
SuperQ commented 7 months ago

Can you provide the output of a net-snmp snmpwalk for the OID teraTaskStatus / 1.3.6.1.4.1.38034.1.3.1.1.3? My first guess is that this is a device bug, the MIB says one thing, but the device is responding with invalid data.

One thing about your generator.yml, what you actually want to use instead of teratab (this is an index) is the OID for the table, teraTaskTable. I don't think this is actually causing a problem, but it's more intuitive if you use the OID for the table, not the index.

Saromany commented 7 months ago

Hi SuperQ, Thanks for your response, here is the snmpwalk for 1.3.6.1.4.1.38034.1.3.1.1.3

SNMPv2-SMI::enterprises.38034.1.3.1.1.3.0 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.1 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.2 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.3 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.4 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.5 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.6 = INTEGER: 5 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.7 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.8 = INTEGER: 2 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.9 = INTEGER: 1 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.10 = INTEGER: 5 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.11 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.12 = INTEGER: 4

regarding the teratab, you probably right, though it didn't solve the errors...

SuperQ commented 7 months ago

What if you have this generator walk list that doesn't include the Task table?

modules:
  teraCPU:  # The module name. You can have as many modules as you want.
    walk:       # List of OIDs to walk. Can also be SNMP object names or specific instances.
      - teraManufacturer
      - teraFamily
      - teraType
      - teraName
      - teraInfo
      - teraDevice
      - teraSlotTable
      - teraPortTable
Saromany commented 7 months ago

ok, so the snmp.yml looks like

    walk:
    - 1.3.6.1.4.1.38034.1.3.2
    - 1.3.6.1.4.1.38034.1.3.3
    get:
    - 1.3.6.1.4.1.38034.1.1.1.0
    - 1.3.6.1.4.1.38034.1.1.2.0
    - 1.3.6.1.4.1.38034.1.1.3.0
    - 1.3.6.1.4.1.38034.1.2.1.0
    - 1.3.6.1.4.1.38034.1.2.2.0
    - 1.3.6.1.4.1.38034.1.2.3.0

and snmp exporter is still not happy:

An error has occurred while serving metrics:

3 error(s) occurred:

  • collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
  • collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values
  • collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values
SuperQ commented 7 months ago

That makes no sense, given the snmpwalk output. What is your Prometheus configuration? Do you get the same result if you curl the exporter?

A tcpdump capture and comparison between snmpwalk and the exporter may be necessary.

Saromany commented 7 months ago

prometheus.yml:

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.
  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: snmp_IHSE
    metrics_path: /snmp
    params:
      auth: [auth_name]
      module: [teraCPU]
    static_configs:
      - targets:
        - 192.168.1.91
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9116 # URL as shown on the UI

same results when i curl the exporter

curl 'localhost:9116/snmp?target=x.x.x.x&module=teraCPU&auth=auth_name'

An error has occurred while serving metrics:

3 error(s) occurred:

  • collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values
  • collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
  • collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values

tcpdump:

tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes 13:18:07.724989 IP 127.0.0.1.9116 > 127.0.0.1.40292: Flags [P.], seq 622047696:622048457, ack 2587925740, win 9206, options [nop,nop,TS val 3601000456 ecr 3600995852], length 761 E..-w4@.@...........#..d%....@....#.."..... ........HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 X-Content-Type-Options: nosniff Date: Mon, 05 Feb 2024 11:18:07 GMT Content-Length: 591

An error has occurred while serving metrics:

3 error(s) occurred:

  • collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
  • collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values
  • collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values