Why snmpget doesnt work to one switch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Why snmpget doesnt work to one switch

Post by Jessuzz94 »

Hi, the issue is this, i have nagios installed with the net-snmp and net-snmp-utils , the snmp works monitoring to one switch directly connected to my nagios servers, but now i want monitor one router that is not direclty connected but it is in the same network so i can ping to the router, i put the service PING and it shows OK, but now i want to but snmp services for the router, like the check_uptime, i test a snmpget to try if the snmp work:

Code: Select all

snmpget -v 2c -c public "router-ip" sysUpTime.0
And shows me : Timeout: No response from "router-ip"

What can i do?, it can be problem of the snmp community configured in the router?
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Why snmpget doesnt work to one switch

Post by lgroschen »

I would first check to see if your system has a firewall running, if it does you need to allow port 161.

Also, I would check your snmpd.conf file to see if you are allowing connections from specific IP's or allowing all connections here:
/etc/snmp/snmpd.conf

then run:

Code: Select all

service snmpd restart
Then see what you get for a return from the snmpget.
/Luke
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: Why snmpget doesnt work to one switch

Post by Jessuzz94 »

i think allowing 161 port works,thanks!, just one thing, if another switch or router that i want to monitor is in other subnet, and if a route protocol is configured, no matter if nagios and the router have differents subnets, im going to be able to monitor ping, bandwidth, and uptime of the router/switch?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Why snmpget doesnt work to one switch

Post by hsmith »

Jessuzz94 wrote:i think allowing 161 port works,thanks!, just one thing, if another switch or router that i want to monitor is in other subnet, and if a route protocol is configured, no matter if nagios and the router have differents subnets, im going to be able to monitor ping, bandwidth, and uptime of the router/switch?
As long as you have a route there, and can ping you should be just fine. Is there anything else you need help with, or are we all right to close this one?
Former Nagios Employee.
me.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: Why snmpget doesnt work to one switch

Post by Jessuzz94 »

another D:, i what cases i will need to configure passive checks?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Why snmpget doesnt work to one switch

Post by tgriep »

Take a look at this link for a few reasons to use passive checks.
https://assets.nagios.com/downloads/nag ... hecks.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: Why snmpget doesnt work to one switch

Post by Jessuzz94 »

Oki doki, thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Why snmpget doesnt work to one switch

Post by hsmith »

Jessuzz94 wrote:Oki doki, thanks!
Is there anything else that we can do for you regarding this, or are we free to lock this topic?
Former Nagios Employee.
me.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: Why snmpget doesnt work to one switch

Post by Jessuzz94 »

Can lock :D !
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Why snmpget doesnt work to one switch

Post by hsmith »

Jessuzz94 wrote:Can lock :D !
Thank you.

Please let us know if you have any more questions!
Former Nagios Employee.
me.
Locked