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

snmp configuration file can not poll my switch #78

Closed
shadialsalamat opened this issue Oct 20, 2016 · 12 comments
Closed

snmp configuration file can not poll my switch #78

shadialsalamat opened this issue Oct 20, 2016 · 12 comments

Comments

@shadialsalamat
Copy link

hallo i iam new in this sector
i downlload it and aplly all steps
nodes is okey
my problem is
whenn i add snmp device , it can not show anything from him and it can not even pollen
but with snmpwalk from same machine works good i do not know where the problem
please look at the photos and tell me what muss i change
thank you

1
2
3
4
snmp

@shadialsalamat shadialsalamat changed the title hallo snmp configuration file can not poll my switch Oct 20, 2016
@SuperQ
Copy link
Member

SuperQ commented Oct 20, 2016

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?

@RichiH
Copy link
Member

RichiH commented Oct 20, 2016

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...

@shadialsalamat
Copy link
Author

shadialsalamat commented Oct 21, 2016

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 !

@shadialsalamat
Copy link
Author

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)

@SuperQ
Copy link
Member

SuperQ commented Oct 21, 2016

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

@shadialsalamat
Copy link
Author

shadialsalamat commented Oct 21, 2016

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

@SuperQ
Copy link
Member

SuperQ commented Oct 21, 2016

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.

@shadialsalamat
Copy link
Author

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 _

@shadialsalamat
Copy link
Author

i rebuld it still did not work

@shadialsalamat
Copy link
Author

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

@0x000flo
Copy link

0x000flo commented Dec 13, 2016

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

@iliomad
Copy link

iliomad commented May 23, 2017

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:
  -....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants