Hello all,
I downloaded the nstAgentModuleObject.c and nstAgentModuleObject.h and
placed them in my net-snmp-5.6.1.1/agent/mibgroups folder. Then I
configured and was able to successfully get the snmpd up and running.
I could successfully get the value of the variable but was unable to
make a set on the variable.
# snmpget -v2c -c telpublic localhost nstAgentModuleObject.0
NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0 = INTEGER: 12
The value 12 was because I had given that as the default value in
nstAgentModuleObject.c But when I do snmpset it doesn't work.
# snmpset -v2c -c telprivate localhost nstAgentModuleObject.0 = 20
Error in packet.
Reason: wrongLength (The set value has an illegal length from what the
agent expects)
Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0
I even tried giving as
#snmpset -v2c -c telprivate localhost nstAgentModuleObject.0 i 20
Error in packet.
Reason: wrongLength (The set value has an illegal length from what the
agent expects)
Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0
I am attaching the snmpd.conf that I had used. The rest everything has
been taken from the tutorial on how to write a MIB module.
Thanks in advance
Regards
Nisha
###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.
# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string
syslocation "Right Here"
# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string
syscontact root@cvs-a
######################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.
# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]
rwuser global
# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]
rwcommunity telprivate
rocommunity telpublic
###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
# The following check up on various aspects of a host.
# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#
# NAME: the name of the process to check for. It must match
# exactly (ie, http will not find httpd processes).
# MAX: the maximum number allowed to be running. Defaults to 0.
# MIN: the minimum number to be running. Defaults to 0.
#
# The results are reported in the prTable section of the UCD-SNMP-MIB tree
# Special Case: When the min and max numbers are both 0, it assumes
# you want a max of infinity and a min of 1.
#proc
# disk: Check for disk space usage of a partition.
# The agent can check the amount of available disk space, and make
# sure it is above a set limit.
#
# disk PATH [MIN=100000]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Can be a raw byte value or a percentage followed by the %
# symbol. Default value = 100000.
#
# The results are reported in the dskTable section of the UCD-SNMP-MIB tree
#disk
#disk
###############################################################################
# Access Control
###############################################################################
# sec.name source community
master agentx
# OpenManage
smuxpeer .1.3.6.1.4.1.674.10892.1
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users