Code Monkey home page Code Monkey logo

Comments (12)

iliomad avatar iliomad commented on May 18, 2024 4

I got the same error message from the snmp exporter when talking to a switch and ended up here after a little searching. Figured I'd add my findings in case somebody else ends up here.

I played about with snmpwalk in the command line, stepping up through the protocol levels (I'm new to SNMP). Note, when it fails, the response message also indicates a timeout.

I ended up with snmp v3 with the security level and user name taken from the switch management interface info. snmpwalk then returned the desired info.
I applied the same parameters to the snmp.yml file, started up the snmp_exporter and it's working ok now.

snmpwalk -v1 -c public 172.ip.add.ress
Timeout: No Response from 172.ip.add.ress

snmpwalk -v2c -c public 172.ip.add.ress
Timeout: No Response from 172.ip.add.ress

snmpwalk -v3 -lnoAuthNoPriv -u guest 172.ip.add.ress
SNMPv2-MIB::sysDescr.0 = STRING: M4300-8X8F ProSAFE 8-port 10GBASE-T and 8-port 10G SFP+, 12.0.2.10, 1.0.0.8
....

Added the following to the snmp.yml file:

default:
  version: 3
  auth:
    username: guest
    security_level: noAuthNoPriv
  walk:
  -....

from snmp_exporter.

SuperQ avatar SuperQ commented on May 18, 2024

This is likely due to timeouts. SNMP devices can be very slow. Have you tested using a utility like curl against the SNMP exporter URL to see if it times out?

The SNMP exporter has a hard-coded timeout of 60 seconds. How long does it take to SNMP walk the device?

from snmp_exporter.

RichiH avatar RichiH commented on May 18, 2024

A full walk will (almost) always take longer than the few snmpbulkgets snmp_exporter does by default. That being said, you still want to look at the error it gives you via http.

In general, please never ever make screen shots of text. Past the text in here, instead. Everything else makes it very hard to read, and help you...

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

SuperQ how can i make that curl against the SNMP exporter URL to see if it times out?
curl -X GET http://127.0.0.1:9116/
dann 404 page not found !

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

whenn i browser http
http://172.21.10.117:9116/snmp?module=default&target=172.16.10.1
give me the this error
An error has occurred during metrics gathering:

error collecting metric Desc{fqName: "snmp_error", help: "Error scraping target", constLabels: {}, variableLabels: []}: Error walking target 172.16.10.1: Request timeout (after 3 retries)

from snmp_exporter.

SuperQ avatar SuperQ commented on May 18, 2024

Yes, it seems like your SNMP device is very slow to respond. The timeouts are currently hard-coded, and you'll have to edit them yourself and re-build the snmp_exporter.

See: https://github.com/prometheus/snmp_exporter/blob/master/collector.go#L42

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

i test 6 switches and the same result .....always the status is down
i change the time 8 m and never always offline scrap_interval 8 m
scrap_evaluation 8
never changed do you think is there error with configuration file
with nodes ---ok
with snmp ---not ok

from snmp_exporter.

SuperQ avatar SuperQ commented on May 18, 2024

Changing the scrape_interval will not affect the internal timeouts in the exporter. The problem is the snmp_exporter is unable to communicate with your switches, or they take too long to respond.

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

SuperQ thank you ....how can i rebuld the file where can i find collector.go
i am beginner can you help me and say how can i build it agein or where i find the correct information _

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

i rebuld it still did not work

from snmp_exporter.

shadialsalamat avatar shadialsalamat commented on May 18, 2024

now the switch all up but did not show information .
up switch

from snmp_exporter.

0x000flo avatar 0x000flo commented on May 18, 2024

Hi, this is a problem with your procurve switch. The IP (VLAN) of the request is another one than the reply address.
The following command will solve your problem:
snmp-server response-source yourIP

from snmp_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.