Install Net-snmp di windows XP/2003

Terkadang butuh bisa juga pantau semua pc di lab dan pc di kantor, melalui mrtg di website. semua hal di pc termasuk kapasitas harddisk, load processor dan trafik bandwidth.
di tulisan ini saya coba menyampaikan gimana setting net-snmpd di windows XP/2003, untuk bikin mrtgnya nanti yah 🙂

Net-snmpd ada juga versi windowsnya, saat ini udah sampe versi 5.4.1.2. download file net-snmp-5.4.1.2-1.win32.exe
untuk install tinggal jalankan file net-snmp-5.4.1.2-1.win32.exe dan ikuti wizardnya, gampang deh tinggal tekan next aja . setelah selesai kita perlu cek terlebih dahulu, apakah instalasi sudah benar atau belum. Secara default net-snmp akan di install di c:\usr

C:\usr\bin>snmpd -v

NET-SNMP version:  5.4.1.2
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders@lists.sourceforge.net

c:\usr>registeragent.bat
Registering snmpd as a service using the following additional options:
.
-Lf “C:/usr/log/snmpd.log”
.
For information on running snmpd.exe and snmptrapd.exe as a Windows
service, see ‘How to Register the Net-SNMP Agent and Trap Daemon as
Windows services’ in README.win32.
.
Press any key to continue . . .

That is all there is to it. Just start the service now:

kita perlu membuat file C:\usr\etc\snmp\snmpd.conf yang isinya sebagai berikut :

## Of the following Net-SNMP agent features
## NONE are supported on Net-SNMP-5.1.1 Win32 platforms
## Process checks “proc” config token
## Executable scripts “exec” config token
## Disk checks “disk” config token
## Load average checks “load” config token
## Extensible sections “exec” config token with shelltest
## Pass-through control “pass” config token

#############################################################
#
# EXAMPLE.conf:
# An example configuration file for configuring the ucd-snmp snmpd agent.
#
#############################################################
#
# This file is intended to only be an example. If, however, you want
# to use it, it should be placed in c:/usr-mingw/etc/share/snmp/snmpd.conf.
# When the snmpd agent starts up, this is where it will look for it.
#
# You might be interested in generating your own snmpd.conf file using
# the “snmpconf” program (perl script) instead. It’s a nice menu
# based interface to writing well commented configuration files. Try it!
#
# Note: This file is automatically generated from EXAMPLE.conf.def.
# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
# configure & make, and then make sure you read the EXAMPLE.conf file
# instead, as it will tailor itself to your configuration.

# All lines beginning with a ‘#’ are comments and are intended for you
# to read. All other lines are configuration commands for the agent.

#
# PLEASE: read the snmpd.conf(5) manual page as well!
#

####################################################################
# Access Control
####################################################################

# YOU SHOULD CHANGE THE “COMMUNITY” TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

# By far, the most common question I get about the agent is “why won’t
# it work?”, when really it should be “how do I configure the agent to
# allow me to access it?”
#
# By default, the agent responds to the “public” community for read
# only access, if run out of the box without any configuration file in
# place. The following examples show you other ways of configuring
# the agent so that you can change the community names, and give
# yourself write access as well.
#
# The following lines change the access permissions of the agent so
# that the COMMUNITY string provides read-only access to your entire
# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
# localhost (127.0.0.1, not its real ipaddress).
#
# For more information, read the FAQ as well as the snmpd.conf(5)
# manual page.

####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

# sec.name source community —-> cukup edit bagian ini aja 🙂
com2sec local localhost uns
com2sec mynetwork 192.168.13.0/24 uns

####
# Second, map the security names into group names:

# sec.model sec.name
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork

####
# Third, create a view for us to let the groups have rights to:

# incl/excl subtree mask
view all included .1 80

####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:

# context sec.model sec.level match read write notif
access MyROGroup “” any noauth exact all none none
access MyRWGroup “” any noauth exact all all none

# —————————————————————–

##################################################################
# System contact information
#

# It is also possible to set the sysContact and sysLocation system
# variables through the snmpd.conf file. **PLEASE NOTE** that setting
# the value of these objects here makes these objects READ-ONLY
# (regardless of any access control settings). Any attempt to set the
# value of an object whose value is given here will fail with an error
# status of notWritable.

syslocation Solo.
syscontact Tunggul <tunggul@uns.ac.id>

# Example output of snmpwalk:
# % snmpwalk -v 1 -c public localhost system
# system.sysDescr.0 = “Windows NT 2000 SP4”
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.win32
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
# system.sysContact.0 = “Me <me@somewhere.org>”
# system.sysName.0 = “name”
# system.sysLocation.0 = “Right here, right now.”
# system.sysServices.0 = 72

# —————————————————————

#################################################################
# Subagent control
#

# The agent can support subagents using a number of extension mechanisms.
# From the 4.2.1 release, AgentX support is being compiled in by default.
# However, this is still experimental code, so should not be used on
# critical production systems.
# Please see the file README.agentx for more details.
#
# If having read, marked, learnt and inwardly digested this information,
# you decide that you do wish to make use of this mechanism, simply
# uncomment the following directive.
#
# master agentx
#
# I repeat – this is *NOT* regarded as suitable for front-line production
# systems, though it is probably stable enough for day-to-day use.
# Probably.
#
# No refunds will be given.

############################################################
# Further Information
#
# See the snmpd.conf manual page, and the output of “snmpd -H”.
# MUCH more can be done with the snmpd.conf than is shown as an
# example here.

C:\>net start “net-snmp agent”
The Net-SNMP Agent service was started successfully.

Bisa juga melalui menu berikut :

Paling akhir kita test dengan perintah berikut :

C:\usr\bin>snmpwalk -v 1 -c uns localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Windows loopback 5.1.2600 Service Pack 2 XP Pro
fessional x86 Family 15 Model 3 Stepping 4
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.13
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (640) 0:00:06.40
SNMPv2-MIB::sysContact.0 = STRING: Me <me@somewhere.org>
SNMPv2-MIB::sysName.0 = STRING: loopback
SNMPv2-MIB::sysLocation.0 = STRING: Right here, right now.
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects fo
r network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementatio
ns
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP imple
mentations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementatio
ns
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatchin
g.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for th
e SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (1) 0:00:00.01

udah deh sukses, tinggal bikin mrtgnya aja 🙂

2 Responses to “Install Net-snmp di windows XP/2003

  • Adaslav
    8 years ago

    Hi
    I have no idea what you wrote in your article (I don’t speak your language and even don’t know what the language it is 🙂 ) but your example snmpd.conf file helped my to run snmpd (Net-SNMP) on my Windows machine 🙂

    Thank you!

    Regards,
    Adaslav,
    POLAND

  • hi, salam kenal
    maaf mas, sya pake config snmpd.conf dari pnya mas
    kq gk running ya
    saya install d windows xp
    tapi kq swaktu d running

    snmpwalk -v 1 -c public localhost system

    gk muncul apa2..
    gk ada informasi yg didapat
    npa ya mas??

Leave a Reply

Your email address will not be published. Required fields are marked *


*

Skip to toolbar