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

Only first module is working in SNMP-exporter job #4345

Closed
highkay opened this Issue Jul 4, 2018 · 14 comments

Comments

Projects
None yet
3 participants
@highkay
Copy link

highkay commented Jul 4, 2018

Bug Report

What did you do?
config 2 modules(sslvpn and common) in snmp.yml of snmp-exporter and scrape them from prometheus.

What did you expect to see?
all 2 modules are correctly scraped.

What did you see instead? Under which circumstances?
only the 1st module is scraped. I figured it out in snmp-exporter log.

Environment

  • System information:

    Linux 3.10.0-693.2.2.el7.x86_64 x86_64

  • Prometheus version:

    (version=2.3.1, branch=HEAD, revision=188ca45bd85ce843071e768d855722a9d9dabe03)

  • Alertmanager version:

  • Prometheus configuration file:

  - job_name: 'snmp'

    static_configs:
      - targets:
        - 10.95.135.203  # SNMP device.
    
    metrics_path: /snmp

    params:
      module: [sslvpn, common]
# i also have tried blew, not work either
#    module:
#        - sslvpn
#        - common


    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: snmp-exporter:9116
  • Alertmanager configuration file:
  • SNMP-exporter configs
common:
  walk:
  - 1.3.6.1.2.1.2
  - 1.3.6.1.2.1.31.1.1
  - 1.3.6.1.4.1.2021.4
  - 1.3.6.1.4.1.2021.9
  - 1.3.6.1.4.1.2021.11
  get:
  - 1.3.6.1.2.1.1.3.0
  metrics:
  - name: ssIndex
    oid: 1.3.6.1.4.1.2021.11.1
    type: gauge
    help: Bogus Index - 1.3.6.1.4.1.2021.11.1
  - name: ssErrorName
    oid: 1.3.6.1.4.1.2021.11.2
    type: DisplayString
    help: Bogus Name - 1.3.6.1.4.1.2021.11.2
  - name: ssSwapIn
    oid: 1.3.6.1.4.1.2021.11.3
    type: gauge
    help: The average amount of memory swapped in from disk, calculated over the last minute. - 1.3.6.1.4.1.2021.11.3
  - name: ssSwapOut
    oid: 1.3.6.1.4.1.2021.11.4
    type: gauge
    help: The average amount of memory swapped out to disk, calculated over the last minute. - 1.3.6.1.4.1.2021.11.4
  - name: ssIOSent
    oid: 1.3.6.1.4.1.2021.11.5
    type: gauge
    help: The average amount of data written to disk or other block device, calculated over the last minute - 1.3.6.1.4.1.2021.11.5
  - name: ssIOReceive
    oid: 1.3.6.1.4.1.2021.11.6
    type: gauge
    help: The average amount of data read from disk or other block device, calculated over the last minute - 1.3.6.1.4.1.2021.11.6
  - name: ssSysInterrupts
    oid: 1.3.6.1.4.1.2021.11.7
    type: gauge
    help: The average rate of interrupts processed (including the clock) calculated over the last minute - 1.3.6.1.4.1.2021.11.7
  - name: ssSysContext
    oid: 1.3.6.1.4.1.2021.11.8
    type: gauge
    help: The average rate of context switches, calculated over the last minute - 1.3.6.1.4.1.2021.11.8
  - name: ssCpuUser
    oid: 1.3.6.1.4.1.2021.11.9
    type: gauge
    help: The percentage of CPU time spent processing user-level code, calculated over the last minute - 1.3.6.1.4.1.2021.11.9
  - name: ssCpuSystem
    oid: 1.3.6.1.4.1.2021.11.10
    type: gauge
    help: The percentage of CPU time spent processing system-level code, calculated over the last minute - 1.3.6.1.4.1.2021.11.10
  - name: ssCpuIdle
    oid: 1.3.6.1.4.1.2021.11.11
    type: gauge
    help: The percentage of processor time spent idle, calculated over the last minute - 1.3.6.1.4.1.2021.11.11
  - name: ssCpuRawUser
    oid: 1.3.6.1.4.1.2021.11.50
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing user-level code - 1.3.6.1.4.1.2021.11.50
  - name: ssCpuRawNice
    oid: 1.3.6.1.4.1.2021.11.51
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing reduced-priority code - 1.3.6.1.4.1.2021.11.51
  - name: ssCpuRawSystem
    oid: 1.3.6.1.4.1.2021.11.52
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing system-level code - 1.3.6.1.4.1.2021.11.52
  - name: ssCpuRawIdle
    oid: 1.3.6.1.4.1.2021.11.53
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent idle - 1.3.6.1.4.1.2021.11.53
  - name: ssCpuRawWait
    oid: 1.3.6.1.4.1.2021.11.54
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent waiting for IO - 1.3.6.1.4.1.2021.11.54
  - name: ssCpuRawKernel
    oid: 1.3.6.1.4.1.2021.11.55
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing kernel-level code - 1.3.6.1.4.1.2021.11.55
  - name: ssCpuRawInterrupt
    oid: 1.3.6.1.4.1.2021.11.56
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing hardware interrupts - 1.3.6.1.4.1.2021.11.56
  - name: ssIORawSent
    oid: 1.3.6.1.4.1.2021.11.57
    type: counter
    help: Number of blocks sent to a block device - 1.3.6.1.4.1.2021.11.57
  - name: ssIORawReceived
    oid: 1.3.6.1.4.1.2021.11.58
    type: counter
    help: Number of blocks received from a block device - 1.3.6.1.4.1.2021.11.58
  - name: ssRawInterrupts
    oid: 1.3.6.1.4.1.2021.11.59
    type: counter
    help: Number of interrupts processed - 1.3.6.1.4.1.2021.11.59
  - name: ssRawContexts
    oid: 1.3.6.1.4.1.2021.11.60
    type: counter
    help: Number of context switches - 1.3.6.1.4.1.2021.11.60
  - name: ssCpuRawSoftIRQ
    oid: 1.3.6.1.4.1.2021.11.61
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent processing software interrupts - 1.3.6.1.4.1.2021.11.61
  - name: ssRawSwapIn
    oid: 1.3.6.1.4.1.2021.11.62
    type: counter
    help: Number of blocks swapped in - 1.3.6.1.4.1.2021.11.62
  - name: ssRawSwapOut
    oid: 1.3.6.1.4.1.2021.11.63
    type: counter
    help: Number of blocks swapped out - 1.3.6.1.4.1.2021.11.63
  - name: ssCpuRawSteal
    oid: 1.3.6.1.4.1.2021.11.64
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent by the hypervisor code to run other VMs even though the CPU in the current VM had something runnable - 1.3.6.1.4.1.2021.11.64
  - name: ssCpuRawGuest
    oid: 1.3.6.1.4.1.2021.11.65
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent by the CPU to run a virtual CPU (guest) - 1.3.6.1.4.1.2021.11.65
  - name: ssCpuRawGuestNice
    oid: 1.3.6.1.4.1.2021.11.66
    type: counter
    help: The number of 'ticks' (typically 1/100s) spent by the CPU to run a niced virtual CPU (guest) - 1.3.6.1.4.1.2021.11.66
  - name: ssCpuNumCpus
    oid: 1.3.6.1.4.1.2021.11.67
    type: gauge
    help: The number of processors, as counted by the agent - 1.3.6.1.4.1.2021.11.67
  - name: memIndex
    oid: 1.3.6.1.4.1.2021.4.1
    type: gauge
    help: Bogus Index - 1.3.6.1.4.1.2021.4.1
  - name: memErrorName
    oid: 1.3.6.1.4.1.2021.4.2
    type: DisplayString
    help: Bogus Name - 1.3.6.1.4.1.2021.4.2
  - name: memTotalSwap
    oid: 1.3.6.1.4.1.2021.4.3
    type: gauge
    help: The total amount of swap space configured for this host. - 1.3.6.1.4.1.2021.4.3
  - name: memAvailSwap
    oid: 1.3.6.1.4.1.2021.4.4
    type: gauge
    help: The amount of swap space currently unused or available. - 1.3.6.1.4.1.2021.4.4
  - name: memTotalReal
    oid: 1.3.6.1.4.1.2021.4.5
    type: gauge
    help: The total amount of real/physical memory installed on this host. - 1.3.6.1.4.1.2021.4.5
  - name: memAvailReal
    oid: 1.3.6.1.4.1.2021.4.6
    type: gauge
    help: The amount of real/physical memory currently unused or available. - 1.3.6.1.4.1.2021.4.6
  - name: memTotalSwapTXT
    oid: 1.3.6.1.4.1.2021.4.7
    type: gauge
    help: The total amount of swap space or virtual memory allocated for text pages on this host - 1.3.6.1.4.1.2021.4.7
  - name: memAvailSwapTXT
    oid: 1.3.6.1.4.1.2021.4.8
    type: gauge
    help: The amount of swap space or virtual memory currently being used by text pages on this host - 1.3.6.1.4.1.2021.4.8
  - name: memTotalRealTXT
    oid: 1.3.6.1.4.1.2021.4.9
    type: gauge
    help: The total amount of real/physical memory allocated for text pages on this host - 1.3.6.1.4.1.2021.4.9
  - name: memAvailRealTXT
    oid: 1.3.6.1.4.1.2021.4.10
    type: gauge
    help: The amount of real/physical memory currently being used by text pages on this host - 1.3.6.1.4.1.2021.4.10
  - name: memTotalFree
    oid: 1.3.6.1.4.1.2021.4.11
    type: gauge
    help: The total amount of memory free or available for use on this host - 1.3.6.1.4.1.2021.4.11
  - name: memMinimumSwap
    oid: 1.3.6.1.4.1.2021.4.12
    type: gauge
    help: The minimum amount of swap space expected to be kept free or available during normal operation of this host - 1.3.6.1.4.1.2021.4.12
  - name: memShared
    oid: 1.3.6.1.4.1.2021.4.13
    type: gauge
    help: The total amount of real or virtual memory currently allocated for use as shared memory - 1.3.6.1.4.1.2021.4.13
  - name: memBuffer
    oid: 1.3.6.1.4.1.2021.4.14
    type: gauge
    help: The total amount of real or virtual memory currently allocated for use as memory buffers - 1.3.6.1.4.1.2021.4.14
  - name: memCached
    oid: 1.3.6.1.4.1.2021.4.15
    type: gauge
    help: The total amount of real or virtual memory currently allocated for use as cached memory - 1.3.6.1.4.1.2021.4.15
  - name: memUsedSwapTXT
    oid: 1.3.6.1.4.1.2021.4.16
    type: gauge
    help: The amount of swap space or virtual memory currently being used by text pages on this host - 1.3.6.1.4.1.2021.4.16
  - name: memUsedRealTXT
    oid: 1.3.6.1.4.1.2021.4.17
    type: gauge
    help: The amount of real/physical memory currently being used by text pages on this host - 1.3.6.1.4.1.2021.4.17
  - name: memSwapError
    oid: 1.3.6.1.4.1.2021.4.100
    type: gauge
    help: Indicates whether the amount of available swap space (as reported by 'memAvailSwap(4)'), is less than the desired minimum (specified by 'memMinimumSwap(12)'). - 1.3.6.1.4.1.2021.4.100
  - name: memSwapErrorMsg
    oid: 1.3.6.1.4.1.2021.4.101
    type: DisplayString
    help: Describes whether the amount of available swap space (as reported by 'memAvailSwap(4)'), is less than the desired minimum (specified by 'memMinimumSwap(12)'). - 1.3.6.1.4.1.2021.4.101
  - name: sysUpTime
    oid: 1.3.6.1.2.1.1.3
    type: gauge
    help: The time (in hundredths of a second) since the network management portion of the system was last re-initialized. - 1.3.6.1.2.1.1.3
  - name: ifNumber
    oid: 1.3.6.1.2.1.2.1
    type: gauge
    help: The number of network interfaces (regardless of their current state) present on this system. - 1.3.6.1.2.1.2.1
  - 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
  - name: ifType
    oid: 1.3.6.1.2.1.2.2.1.3
    type: gauge
    help: The type of interface - 1.3.6.1.2.1.2.2.1.3
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifMtu
    oid: 1.3.6.1.2.1.2.2.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.2.1.2.2.1.4
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifSpeed
    oid: 1.3.6.1.2.1.2.2.1.5
    type: gauge
    help: An estimate of the interface's current bandwidth in bits per second - 1.3.6.1.2.1.2.2.1.5
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifPhysAddress
    oid: 1.3.6.1.2.1.2.2.1.6
    type: PhysAddress48
    help: The interface's address at its protocol sub-layer - 1.3.6.1.2.1.2.2.1.6
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifAdminStatus
    oid: 1.3.6.1.2.1.2.2.1.7
    type: gauge
    help: The desired state of the interface - 1.3.6.1.2.1.2.2.1.7
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOperStatus
    oid: 1.3.6.1.2.1.2.2.1.8
    type: gauge
    help: The current operational state of the interface - 1.3.6.1.2.1.2.2.1.8
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifLastChange
    oid: 1.3.6.1.2.1.2.2.1.9
    type: gauge
    help: The value of sysUpTime at the time the interface entered its current operational state - 1.3.6.1.2.1.2.2.1.9
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInOctets
    oid: 1.3.6.1.2.1.2.2.1.10
    type: counter
    help: The total number of octets received on the interface, including framing characters - 1.3.6.1.2.1.2.2.1.10
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInUcastPkts
    oid: 1.3.6.1.2.1.2.2.1.11
    type: counter
    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.2.1.2.2.1.11
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInNUcastPkts
    oid: 1.3.6.1.2.1.2.2.1.12
    type: counter
    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.2.1.2.2.1.12
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInDiscards
    oid: 1.3.6.1.2.1.2.2.1.13
    type: counter
    help: The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol - 1.3.6.1.2.1.2.2.1.13
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInErrors
    oid: 1.3.6.1.2.1.2.2.1.14
    type: counter
    help: For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol - 1.3.6.1.2.1.2.2.1.14
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInUnknownProtos
    oid: 1.3.6.1.2.1.2.2.1.15
    type: counter
    help: For packet-oriented interfaces, the number of packets received via the interface which were discarded because of an unknown or unsupported protocol - 1.3.6.1.2.1.2.2.1.15
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutOctets
    oid: 1.3.6.1.2.1.2.2.1.16
    type: counter
    help: The total number of octets transmitted out of the interface, including framing characters - 1.3.6.1.2.1.2.2.1.16
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutUcastPkts
    oid: 1.3.6.1.2.1.2.2.1.17
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.2.2.1.17
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutNUcastPkts
    oid: 1.3.6.1.2.1.2.2.1.18
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.2.2.1.18
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutDiscards
    oid: 1.3.6.1.2.1.2.2.1.19
    type: counter
    help: The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted - 1.3.6.1.2.1.2.2.1.19
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutErrors
    oid: 1.3.6.1.2.1.2.2.1.20
    type: counter
    help: For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors - 1.3.6.1.2.1.2.2.1.20
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutQLen
    oid: 1.3.6.1.2.1.2.2.1.21
    type: gauge
    help: The length of the output packet queue (in packets). - 1.3.6.1.2.1.2.2.1.21
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifName
    oid: 1.3.6.1.2.1.31.1.1.1.1
    type: DisplayString
    help: The textual name of the interface - 1.3.6.1.2.1.31.1.1.1.1
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInMulticastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.2
    type: counter
    help: The number of packets, delivered by this sub-layer to a higher (sub-)layer,  which were addressed to a multicast address at this sub-layer - 1.3.6.1.2.1.31.1.1.1.2
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifInBroadcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.3
    type: counter
    help: The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a broadcast address at this sub-layer - 1.3.6.1.2.1.31.1.1.1.3
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutMulticastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.4
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.31.1.1.1.4
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifOutBroadcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.5
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a broadcast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.31.1.1.1.5
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCInOctets
    oid: 1.3.6.1.2.1.31.1.1.1.6
    type: counter
    help: The total number of octets received on the interface, including framing characters - 1.3.6.1.2.1.31.1.1.1.6
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCInUcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.7
    type: counter
    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.2.1.31.1.1.1.7
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCInMulticastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.8
    type: counter
    help: The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a multicast address at this sub-layer - 1.3.6.1.2.1.31.1.1.1.8
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCInBroadcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.9
    type: counter
    help: The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were addressed to a broadcast address at this sub-layer - 1.3.6.1.2.1.31.1.1.1.9
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCOutOctets
    oid: 1.3.6.1.2.1.31.1.1.1.10
    type: counter
    help: The total number of octets transmitted out of the interface, including framing characters - 1.3.6.1.2.1.31.1.1.1.10
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCOutUcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.11
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.31.1.1.1.11
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCOutMulticastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.12
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a multicast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.31.1.1.1.12
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHCOutBroadcastPkts
    oid: 1.3.6.1.2.1.31.1.1.1.13
    type: counter
    help: The total number of packets that higher-level protocols requested be transmitted, and which were addressed to a broadcast address at this sub-layer, including those that were discarded or not sent - 1.3.6.1.2.1.31.1.1.1.13
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifLinkUpDownTrapEnable
    oid: 1.3.6.1.2.1.31.1.1.1.14
    type: gauge
    help: Indicates whether linkUp/linkDown traps should be generated for this interface - 1.3.6.1.2.1.31.1.1.1.14
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifHighSpeed
    oid: 1.3.6.1.2.1.31.1.1.1.15
    type: gauge
    help: An estimate of the interface's current bandwidth in units of 1,000,000 bits per second - 1.3.6.1.2.1.31.1.1.1.15
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifPromiscuousMode
    oid: 1.3.6.1.2.1.31.1.1.1.16
    type: gauge
    help: This object has a value of false(2) if this interface only accepts packets/frames that are addressed to this station - 1.3.6.1.2.1.31.1.1.1.16
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifConnectorPresent
    oid: 1.3.6.1.2.1.31.1.1.1.17
    type: gauge
    help: This object has the value 'true(1)' if the interface sublayer has a physical connector and the value 'false(2)' otherwise. - 1.3.6.1.2.1.31.1.1.1.17
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifAlias
    oid: 1.3.6.1.2.1.31.1.1.1.18
    type: DisplayString
    help: This object is an 'alias' name for the interface as specified by a network manager, and provides a non-volatile 'handle' for the interface - 1.3.6.1.2.1.31.1.1.1.18
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: ifCounterDiscontinuityTime
    oid: 1.3.6.1.2.1.31.1.1.1.19
    type: gauge
    help: The value of sysUpTime on the most recent occasion at which any one or more of this interface's counters suffered a discontinuity - 1.3.6.1.2.1.31.1.1.1.19
    indexes:
    - labelname: ifIndex
      type: gauge
  - name: dskIndex
    oid: 1.3.6.1.4.1.2021.9.1.1
    type: gauge
    help: Integer reference number (row number) for the disk mib. - 1.3.6.1.4.1.2021.9.1.1
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskPath
    oid: 1.3.6.1.4.1.2021.9.1.2
    type: DisplayString
    help: Path where the disk is mounted. - 1.3.6.1.4.1.2021.9.1.2
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskDevice
    oid: 1.3.6.1.4.1.2021.9.1.3
    type: DisplayString
    help: Path of the device for the partition - 1.3.6.1.4.1.2021.9.1.3
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskMinimum
    oid: 1.3.6.1.4.1.2021.9.1.4
    type: gauge
    help: Minimum space required on the disk (in kBytes) before the errors are triggered - 1.3.6.1.4.1.2021.9.1.4
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskMinPercent
    oid: 1.3.6.1.4.1.2021.9.1.5
    type: gauge
    help: Percentage of minimum space required on the disk before the errors are triggered - 1.3.6.1.4.1.2021.9.1.5
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskTotal
    oid: 1.3.6.1.4.1.2021.9.1.6
    type: gauge
    help: Total size of the disk/partion (kBytes) - 1.3.6.1.4.1.2021.9.1.6
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskAvail
    oid: 1.3.6.1.4.1.2021.9.1.7
    type: gauge
    help: Available space on the disk - 1.3.6.1.4.1.2021.9.1.7
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskUsed
    oid: 1.3.6.1.4.1.2021.9.1.8
    type: gauge
    help: Used space on the disk - 1.3.6.1.4.1.2021.9.1.8
    indexes:
    - labelname: dskIndex
      type: gauge
  - name: dskPercent
    oid: 1.3.6.1.4.1.2021.9.1.9
    type: gauge
    help: Percentage of space used on disk - 1.3.6.1.4.1.2021.9.1.9
    indexes:
    - labelname: dskIndex
      type: gauge
sslvpn:
  walk:
  - 1.3.6.1.4.1.32328.1.2.1.1 # vpn
  get:
  - 1.3.6.1.4.1.32328.1.2.1.1
  metrics:
  - name: runningStatus
    oid: 1.3.6.1.4.1.32328.1.2.1.1.0
    type: DisplayString
    help: Running status of the vpn - 1.3.6.1.4.1.32328.1.2.1.1.0
  - name: activeUserNum
    oid: 1.3.6.1.4.1.32328.1.2.1.1.1
    type: gauge
    help: The active user num on the vpn - 1.3.6.1.4.1.32328.1.2.1.1.1
  - name: sslSessionNum
    oid: 1.3.6.1.4.1.32328.1.2.1.1.2
    type: gauge
    help: The ssl session num on the vpn - 1.3.6.1.4.1.32328.1.2.1.1.2
  • Logs:

logs of snmp-exporter

time="2018-07-04T08:04:23Z" level=debug msg="Scraping target '10.95.135.203' with module 'common'" source="main.go:86"
time="2018-07-04T08:04:23Z" level=debug msg="Getting 1 OIDs from target \"10.95.135.203\"" source="collector.go:94"
time="2018-07-04T08:04:23Z" level=debug msg="Get of 1 OIDs completed in 741.931µs" source="collector.go:100"
time="2018-07-04T08:04:23Z" level=debug msg="Walking target \"10.95.135.203\" subtree \"1.3.6.1.2.1.2\"" source="collector.go:124"
time="2018-07-04T08:04:23Z" level=debug msg="Walk of target \"10.95.135.203\" subtree \"1.3.6.1.2.1.2\" completed in 44.552203ms" source="collector.go:134"
time="2018-07-04T08:04:23Z" level=debug msg="Walking target \"10.95.135.203\" subtree \"1.3.6.1.2.1.31.1.1\"" source="collector.go:124"
time="2018-07-04T08:04:23Z" level=debug msg="Walk of target \"10.95.135.203\" subtree \"1.3.6.1.2.1.31.1.1\" completed in 33.374154ms" source="collector.go:134"
time="2018-07-04T08:04:23Z" level=debug msg="Walking target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.4\"" source="collector.go:124"
time="2018-07-04T08:04:23Z" level=debug msg="Walk of target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.4\" completed in 6.570123ms" source="collector.go:134"
time="2018-07-04T08:04:23Z" level=debug msg="Walking target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.9\"" source="collector.go:124"
time="2018-07-04T08:04:23Z" level=debug msg="Walk of target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.9\" completed in 8.742174ms" source="collector.go:134"
time="2018-07-04T08:04:23Z" level=debug msg="Walking target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.11\"" source="collector.go:124"
time="2018-07-04T08:04:23Z" level=debug msg="Walk of target \"10.95.135.203\" subtree \"1.3.6.1.4.1.2021.11\" completed in 3.547934ms" source="collector.go:134"
time="2018-07-04T08:04:23Z" level=debug msg="Scrape of target '10.95.135.203' with module 'common' took 0.113080 seconds" source="main.go:97"

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

This is as expected, the snmp_exporter only looks at the the first module URL parameter. You'll need to create a single combined module.

@highkay

This comment has been minimized.

Copy link
Author

highkay commented Jul 4, 2018

while module param is an array, multi modules seems work. if only one module is work, it should be a value.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

HTTP supports multiple URL parameters with the same name, the snmp exporter does not.

@SuperQ

This comment has been minimized.

Copy link
Member

SuperQ commented Jul 4, 2018

@brian-brazil What if we changed the config parser to support both single and lists.

params:
  module: foo
  other_param:
    - foo
    - bar

This would make it less confusing for users.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

We've discussed this before, it can't be made to work as different modules can have conflicting settings. This is something to be dealt with with configuration management.

@SuperQ

This comment has been minimized.

Copy link
Member

SuperQ commented Jul 4, 2018

No, I didn't mean changing the snmp_exporter, I meant changing the Prometheus config parser to handle things differently.

Right now it uses a very simple conversion of yaml to Go net/url url.Values.

@highkay

This comment has been minimized.

Copy link
Author

highkay commented Jul 4, 2018

I still think the multi modules is better solution. For example, I have 3 types of device, all support net_snmp and private mibs. It is more structured to make 4 modules(1 net-snmp and 3 private mibs) in snmp.yml, and than add 3 jobs which contains net-snmp and 1 private mib in prometheus.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

Allowing for a given field to be more than one type sounds like a recipe for confusion to me.

@highkay

This comment has been minimized.

Copy link
Author

highkay commented Jul 4, 2018

I would like to consider it to be a feature which make the configuration more structured.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

It'd make the configuration less structured, as it'd no longer have a single schema.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

Is there some actual problem you're having that would be solved by changing this?

@highkay

This comment has been minimized.

Copy link
Author

highkay commented Jul 4, 2018

I combined the 2 modules as a workaround. I think we mean different structured in this case. I mean refactoring duplicated mibs into one or more module could make the snmp.yml more structured. Then I would config the modules in the prometheus explicitly. While the snmp which work with one module at one time, maybe it could combine the modules in snmp-exporter runtime.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 4, 2018

Combining the modules is the correct and only solution, this isn't something that either the exporter nor generator can offer due to the potential for conflicts.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Dec 7, 2018

This has gone stale, and I don't think there's anything for us to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.