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

Prometheus Not getting scraped data from snmp_exporter #3525

Closed
Passpes opened this Issue Nov 30, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@Passpes
Copy link

Passpes commented Nov 30, 2017

What did you do?
I'm monitoring my snmp device using snmp_exporter

What did you expect to see?
Endpoint up

What did you see instead? Under which circumstances?
Endpoint down

Environment

  • System information:

Linux 4.10.0-38-generic x86_64

  • Prometheus version:

prometheus, version 2.0.0

  • Prometheus configuration file:
# my global config
global:
  scrape_interval:     60s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 60s # Evaluate rules every 15 seconds. The default is every 1 minute.
#  scrape_timeout: 25s
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
      # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  - job_name: 'snmp'
    metrics_path: /snmp
    params:
      module: [if_mib]
    static_configs:
      - targets: ['10.104.x.x']
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 192.168.x.x:9116  # SNMP exporter.
  • snmpwalk:
snmpwalk -v2c -c public 10.104.x.x SNMPv2-MIB::sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Juniper Networks, Inc. ex2200-24t-4g Ethernet Switch, kernel JUNOS 12.3R9.4, Build date: 2015-02-12 11:18:43 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.
  • snmp.yml
[snmp.yml.txt](https://github.com/prometheus/prometheus/files/1518011/snmp.yml.txt)

So when I use the SNMP_exporter in the browser I get the juniper_snmp scraped data below:
image

  • Juniper_snmp scraped data
[Juniper_scraped_data.txt](https://github.com/prometheus/prometheus/files/1518012/Juniper_scraped_data.txt)

but with Prometheus target here's the output:
image

so Prometheus is not getting the metric data even though they are available using the snmp_exporter submit button manually, something is wrong here with Prometheus, any clue?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 30, 2017

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.

SNMP is slow, increase the timeout.

@Passpes

This comment has been minimized.

Copy link
Author

Passpes commented Dec 1, 2017

It's working , just added scrape_timeout: 1m (/)

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

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