# [SOLVED] net-snmp is being a asshat... =)

## Ateo

Hello..

I need to get snmp up and running a a server so I can show of the fancy server stats to a client via mrtg. mrtg works nicely as I can poll the local router and display that. Since this is so, I have basically taken the snmpd.conf file from the router (an Asus running openWRT and net-snmp) and copied to the server, changing some stuff around.

Anyways, to make a long story short:

```
SNMPD_FLAGS="-c /etc/snmp/snmpd.conf -x localhost"

SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd"
```

```
syslocation 1st Floor

syscontact God

sysname broker

rocommunity tards

rwcommunity tardsrule
```

The daemon is in fact running on 161:

```
$ ps -ef | grep snmp && netstat -an | grep 161

root      1169     1  0 22:04 ?        00:00:00 /usr/sbin/snmpd -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf -x localhost -Lsd

root      1399   740  0 22:07 pts/0    00:00:00 grep --colour=auto snmp

tcp        0      0 127.0.0.1:161           0.0.0.0:*               LISTEN

udp        0      0 0.0.0.0:161             0.0.0.0:*
```

But when I try to talk to the asshat I get this:

```
$ snmpwalk -v 1 -c tards localhost

Timeout: No Response from localhost
```

There are absolutely NO routers nor firewalls that could possibly interfere.

Any ideas??

Muchas gracias.Last edited by Ateo on Tue Nov 21, 2006 11:52 pm; edited 1 time in total

----------

## Ateo

bump

----------

## Onkelborg

I managed to get snmp up and running without any trouble, and I used mrtg. Stupid me to not bookmark the page I found on google :/ *Searching*

Found this, I believe this was the "tutorial" I used, although I just wanted the network stats: http://gentoo-wiki.com/HOWTO_SNMP_and_MRTG_Made_Easy

----------

## Ateo

Well, I followed that wiki. While it worked for getting stats from a remote router, it's net-snmp on the local machine that won't work. It won't work with the configuration from that wiki nor the [almost] exact copy of snmpd.conf from the router.

Thanks for responding.

----------

## Onkelborg

 *Ateo wrote:*   

> Well, I followed that wiki. While it worked for getting stats from a remote router, it's net-snmp on the local machine that won't work. It won't work with the configuration from that wiki nor the [almost] exact copy of snmpd.conf from the router.
> 
> Thanks for responding.

 

Hm, I got it working both with remote switches and with a locally running snmpd? I could try to plugin the computer I used and copy the config if you want to?

----------

## Ateo

Well, here was the issue....

While fudging with snmp, i didn't realize that there was already an instance of snmp running. So no matter how many times I restarted it, altered the config file, etc, it wouldn't work. I had to issue a kill -HUP to kill that instance. Once killed, I restarted snmp and am now able to poll it!

What tricked me was the fact that doing a ps -ef showed snmp loaded but what i didn't pay attention to was that it didn't have the arguments passed from conf.d. I figured it out while in the router doing a ps -ef on snmp there it displayed -c /path/to/snmpd.conf and that's what tipped me off....

----------

## Onkelborg

:)

----------

## Sakkath

 *Ateo wrote:*   

> Hello..
> 
> I need to get snmp up and running a a server so I can show of the fancy server stats to a client via mrtg. mrtg works nicely as I can poll the local router and display that. Since this is so, I have basically taken the snmpd.conf file from the router (an Asus running openWRT and net-snmp) and copied to the server, changing some stuff around.
> 
> Anyways, to make a long story short:
> ...

 

My system has snmpd running fine and I can't connect using that command either, so maybe it's not relevant in some way...

----------

