[HOWTO] Install and configure the Net-SNMP agent for Windows

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

elayaraja.s
Cacti User
Posts: 137
Joined: Mon Feb 11, 2008 3:46 am

installed Net-SNMP

Post by elayaraja.s »

Yes i installed Net-SNMP as shown in screen#3.
Last edited by elayaraja.s on Thu Mar 06, 2008 11:59 pm, edited 3 times in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Please don't post .doc files, but images (.png for example).
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
elayaraja.s
Cacti User
Posts: 137
Joined: Mon Feb 11, 2008 3:46 am

No output: snmpwalk.exe -v 1 -c public localhost sysdesc

Post by elayaraja.s »

C:\net-snmp\bin>snmpwalk.exe -v 1 -c public localhost versiontag
Output: UCD-SNMP-MIB::versionTag.0 = STRING: 5.4.1

C:\net-snmp\bin>snmpwalk.exe -v 1 -c public localhost sysdesc
Output: No output.....Its blank..

Note:
If i replaced localhost to <remote ip address> such as
C:\net-snmp\bin>snmpwalk.exe -v 1 -c public <ip address> sysdesc
it working fine. Why its not working for my localhost ?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you run this :

Code: Select all

C:\> ping localhost
and

Code: Select all

C:\> netstat -an | findstr 161
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
elayaraja.s
Cacti User
Posts: 137
Joined: Mon Feb 11, 2008 3:46 am

Output

Post by elayaraja.s »

Please find the output as follows,

C:\>ping localhost

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% l
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>netstat -an | findstr 161
UDP 0.0.0.0:161 *:*
Last edited by elayaraja.s on Fri Mar 07, 2008 5:02 am, edited 1 time in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Well, I don't know :oops:

Ask in the Net-SNMP mailing list, or in a Windows forum.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Brashquido
Cacti User
Posts: 99
Joined: Sat Feb 28, 2004 10:16 pm
Location: Melbourne, Australia
Contact:

Unknown Token

Post by Brashquido »

For those getting unknown token warnings when running SNMP queries, make sure you have set an environment variable called SNMPCONF-PATH to the path of your Net-SNMP snmp.conf file
Dominic Ryan
www.iis-aid.com
sonia
Posts: 1
Joined: Thu Apr 10, 2008 5:22 am

SNMP walk on V3 user throws error

Post by sonia »

I'm able to snmpwalk and snmpget for v1 but not for snmp v3 objects. please help me to configure the snmpd.conf file for V3 users (viz username with auth protocol, auth password priv protocol and priv password) as i'm getting Encryption support enabled

C:\USR\bin>snmpwalk -v 1 -c public 172.26.22.215

SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.289.2.1.1.2
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (8721550) 1 day, 0:13:35.50
SNMPv2-MIB::sysContact.0 = STRING: End User Contact (please configure)
SNMPv2-MIB::sysName.0 = STRING:
SNMPv2-MIB::sysLocation.0 = STRING: End User Premise (please configure)
SNMPv2-MIB::sysServices.0 = INTEGER: 2
IF-MIB::ifNumber.0 = INTEGER: 147
IF-MIB::ifIndex.1 = INTEGER: 0
..... so on

C:\USR\bin>snmpwalk -v 3 -l AuthPriv -u TestAuthPriv -a MD5 -A 1111111111111111
-x DES -X 2222222222222222 172.26.22.210 SNMPv2-MIB::sysDescr.0
Encryption support not enabled.
snmpwalk: USM encryption error


C:\USR\bin>snmpget -v 3 -l AuthPriv -u TestAuthPriv -a MD5 -A 1111111111111111 -
x DES -X 2222222222222222 172.26.22.210 SNMPv2-MIB::sysDescr.0
Encryption support not enabled.
snmpget: USM encryption error
elayaraja.s
Cacti User
Posts: 137
Joined: Mon Feb 11, 2008 3:46 am

installed Net-SNMP in RedHat RHEL 5 x86_64 64 bits

Post by elayaraja.s »

I have installed Net-SNMP in RedHat RHEL 5 x86_64 64 bits


1) $ rpm -i net-snmp-5.4.x.svn200803270330-1.1.x86_64.rpm
warning: net-snmp-5.4.x.svn200803270330-1.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 7641048b
2) $ rpm -i net-snmp-devel-5.4.x.svn200803270330-1.1.x86_64.rpm
warning: net-snmp-devel-5.4.x.svn200803270330-1.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 7641048b
3) $ rpm -i net-snmp-perlmods-5.4.x.svn200803270330-1.1.x86_64.rpm
warning: net-snmp-perlmods-5.4.x.svn200803270330-1.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 7641048b

I am unable to find the snmpd.conf file. How to restart the net-snmp , i can able to seen snmpwalk,snmpstatus..etc from folder '/usr/bin '

I dont know how to restart and where i can create the snmpd.conf file ?
Axis
Posts: 6
Joined: Tue Sep 20, 2005 9:07 am
Location: Tilburg, the Netherlands

Post by Axis »

Wow, I would be really happy to have this working, as I would finally be able to run custom windows scripts. Until now i've been using Windows SNMP service with the free Paessler SNMP Helper to graph disk counters..

I've disabled the windows service, installed net-snmp according to the screenshots, created snmpd.conf, and started service. My snmpd.conf now has one line: "rocommunity public".

SNMPD starts, but I cannot get any decent output:

C:\>snmpwalk -v 2c -c public localhost sysName
SNMPv2-MIB::sysName = No Such Object available on this agent at this OID

If I walk all:

C:\>snmpwalk -v 2c -c public localhost
RFC1213-MIB::atIfIndex.2.1.10.0.0.1 = INTEGER: 2
RFC1213-MIB::atIfIndex.2.1.10.0.0.35 = INTEGER: 2
RFC1213-MIB::atIfIndex.2.1.10.0.0.50 = INTEGER: 2
RFC1213-MIB::atIfIndex.2.1.10.0.0.59 = INTEGER: 2
RFC1213-MIB::atIfIndex.2.1.10.0.0.77 = INTEGER: 2
RFC1213-MIB::atPhysAddress.2.1.10.0.0.1 = Hex-STRING: 00 19 2F 58 AA 17
RFC1213-MIB::atPhysAddress.2.1.10.0.0.35 = Hex-STRING: 00 16 17 DA 19 71
RFC1213-MIB::atPhysAddress.2.1.10.0.0.50 = Hex-STRING: 00 50 56 9D 48 51
RFC1213-MIB::atPhysAddress.2.1.10.0.0.59 = Hex-STRING: 00 50 56 87 67 E8
RFC1213-MIB::atPhysAddress.2.1.10.0.0.77 = Hex-STRING: 00 50 56 87 5E 7E
RFC1213-MIB::atNetAddress.2.1.10.0.0.1 = Network Address: 0A:00:00:01
RFC1213-MIB::atNetAddress.2.1.10.0.0.35 = Network Address: 0A:00:00:23
RFC1213-MIB::atNetAddress.2.1.10.0.0.50 = Network Address: 0A:00:00:32
RFC1213-MIB::atNetAddress.2.1.10.0.0.59 = Network Address: 0A:00:00:3B
RFC1213-MIB::atNetAddress.2.1.10.0.0.77 = Network Address: 0A:00:00:4D
SNMPv2-MIB::snmpInPkts.0 = Counter32: 18
SNMPv2-MIB::snmpOutPkts.0 = Counter32: 18
SNMPv2-MIB::snmpInBadVersions.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityUses.0 = Counter32: 0
SNMPv2-MIB::snmpInASNParseErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpInNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpInReadOnlys.0 = Counter32: 0
SNMPv2-MIB::snmpInGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpInTotalReqVars.0 = Counter32: 28
SNMPv2-MIB::snmpInTotalSetVars.0 = Counter32: 0
SNMPv2-MIB::snmpInGetRequests.0 = Counter32: 1
SNMPv2-MIB::snmpInGetNexts.0 = Counter32: 31
SNMPv2-MIB::snmpInSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpInGetResponses.0 = Counter32: 0
SNMPv2-MIB::snmpInTraps.0 = Counter32: 0
SNMPv2-MIB::snmpOutTooBigs.0 = Counter32: 0
SNMPv2-MIB::snmpOutNoSuchNames.0 = Counter32: 0
SNMPv2-MIB::snmpOutBadValues.0 = Counter32: 0
SNMPv2-MIB::snmpOutGenErrs.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetNexts.0 = Counter32: 0
SNMPv2-MIB::snmpOutSetRequests.0 = Counter32: 0
SNMPv2-MIB::snmpOutGetResponses.0 = Counter32: 42
SNMPv2-MIB::snmpOutTraps.0 = Counter32: 0
SNMPv2-MIB::snmpEnableAuthenTraps.0 = INTEGER: disabled(2)
SNMPv2-MIB::snmpSilentDrops.0 = Counter32: 0
SNMPv2-MIB::snmpProxyDrops.0 = Counter32: 0

Does anyone have a clue as to why I can't get it to show more info?

edit: the above was on a Windows Server 2003 x64, just got the same results on my vista business workstation..
Axis
Posts: 6
Joined: Tue Sep 20, 2005 9:07 am
Location: Tilburg, the Netherlands

Post by Axis »

Still no idea anyone?

If I reinstall net-snmp in default mode, not the windows extension thingy, then I do get back some data..

But then snmpd starts moaning that it does not know the token 'disk'.. Grrr.. I'm getting a bit annoyed that net-snmp is that broken, and a day of googling isn't getting me any further..
Ka
Posts: 1
Joined: Thu May 22, 2008 7:48 am

OID

Post by Ka »

Hello fmangeant,

The tut. is very helpfull. I'm just beginning with cacti and planning to use it with MS W2K3 servers. In your tut. you write "extOutput translates to .1.3.6.1.4.1.2021.8.1.101"
Well of course i believe you but how do you get that oid? I presume with snmptranslate? But if so, how do i use it?
chap0230
Posts: 10
Joined: Wed Sep 03, 2008 4:11 pm

Easier way

Post by chap0230 »

An MUCH easier way to setup and use SNMP for a Windows 2003 server is to just use the built-in Windows service.

1. Install snmp service. Go to Start->Run and type:

appwiz.cpl @,2

This will open Add/Remove Windows Components Wizard.
2. In list find Management and Monitoring Tools and click Details. In new window check Simple Network Management Protocol and press OK. Press Next to begin installation of snmp service.
3. Configure snmp service. Go to Start->Run and type:

services.msc

This will open System Services window.
4. In list find SNMP service and double-click on it. Go to Agent Tab, fill the Contact and Location boxes and check all Service checkboxes.
Go to Security Tab and edit the community name.
Optional: you can specify from what hosts your windows machine can accept SNMP packets.
5. Test snmp service. In video I test it from Gentoo box: read the system MIBs with snmpwalk command. Windows host ip is 172.16.50.179:

snmpwalk -v 2c -c cacti_com 172.16.50.179 system
found at: http://www.video4admin.com/monitoring-l ... cacti.html
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

It's easier, but Net-SNMP can be extended, not the Windows SNMP agent :wink:
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

Can this be used on a VMware guest machine to get data from the guest?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests