Re: Unknown Object Identifier - HOST MIBS
Tam Vo <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <OFCF4762AF.7B758E07-ON882570C9.00585467-882570C9.005E87D5@mck.us.ray.com> |
Dave,
Thank you for the clarification. I also tried
snmpget -Dparse-mibs -v 1 -c public localhost hrSystemDate.0
snmpget -Dparse-mibs -v 1 -c public localhost
HOST-RESOURCES-MIB::hrSystemDate.0
but it gave me the same nosuchname error. Your clarification makes me
think that I have not configure the daemon correctly. I followed the
README.solaris (http://net-snmp.sourceforge.net/docs/README.solaris.html)
instruction to configure the net-snmp running together with the Sun's SNMP
daemon (Section 7, page 11) . I also followed the instruction from
SNMPD.CONF to configure the snmpd.conf to the best of my knowledge and
copy it to /usr/local/share/snmp/snmpd.conf. Do you know what is suppose
to be in /etc/snmp/conf/path? I got the following warning and error in
this path file:
path/snmpd.conf: Not a directory
path/snmpd.local.conf: Not a directory
path/snmp.conf: Not a directory
path/snmp.local.conf: Not a directory
net-snmp: 1 error(s) in config file(s)
/usr/local/share/snmp/snmpd.conf: line 10: Warning: Unknown token:
system-group-read-community.
/usr/local/share/snmp/snmpd.conf: line 13: Warning: Unknown token:
read-community.
/usr/local/share/snmp/snmpd.conf: line 16: Warning: Unknown token:
trap.
/usr/local/share/snmp/snmpd.conf: line 17: Warning: Unknown token:
trap-community.
/usr/local/share/snmp/snmpd.conf: line 22: Error: Blank line
following managers token.
I think it is telling me that I have error in my snmpd.conf file. I used
snmpconf -g basic_setup to configure this snmpd.conf file. I noticed that
the ACCESS CONTROL INFORMATION is different than the original
/etc/snmp/conf/snmpd.conf, included in the installation. At this point I
have no where to go. Any pointer is greatly appreciated. I also included
my snmpd.conf for reference purpose.
Another question is what should be in /var/snmp/mib folder? I observed
two mib files snmpdx.mib and sun.mib. snmpdx.mib contains the Sun Master
and Sub Agent information and the sun.mib contain mib-II information.
Coincidentally, mib-II information is the only information I can perform
snmpget and snmpwalk. It seems like my Solaris 8 system has no knowledge
of the HOST-RESOURCES-MIB eventhough I manually added "export
MIBS=+HOST-RESOURCES-MIB" and confirmed with -Dparse-mibs option. How do
I check if the net-snmp.reg and net-snmp.rsrc daemon was launch correctly?
and whether or not the HOST-RESOURCES-MIB was added correctly since it
requires IMPORT of other MIBS?
I know I am asking a lot of ignorance questions, but I am stuck. Thanks
in advance for your help.
On Tue, 2005-11-29 at 08:13 -0800, Tam Vo wrote:
> Thank you for the suggestion. I tried
> snmpget -Dparse-mibs -v 1 -c public localhost hrSystemDate
>
> and it found all of the MIBS, including HOST-RESOURCES-MIB.txt
Good - so the HOST-RESOURCES-MIB is in the correct location.
> I also noticed that it imports a lot of the other MIBS (IP-MIB,
> SNMPv2-SMI, mib-2, IF-MIB), but not Module 25 HOST-RESOURCES-MIBS.
No - the command line tools don't load all MIBs automatically.
They have a fixed list of MIBs to load, and you have to explicitly
add any extra ones to this. See the FAQ entry
How do I add a MIB to the tools?
> The next thing I tried was
> snmpget -Dparse-mibs -v 1 -c public localhost
> HOST-RESOURCES-MIB::hrSystemDate
That should indeed load the HostRes MIB file.
> Then the error
> Error in packet
> Reason: (nosuchname) There is no such variable in this MIB.
> Failed Object: HOST-RESOURCE-MIB::hrSystemDate
Note that this is now an error from the remote agent.
Previously, the tools were telling you that they didn't know
what to ask for. Now, the tools are asking for something,
and the agent is saying "No".
As Robert has said, you've forgotten '.0' instance subidentifier.
Try
snmpget -v 1 -c public localhost HOST-RESOURCES-MIB::hrSystemDate.0
> Is it possible that the header in my HOST-RESOURCES-MIB.txt is
> incorrect?
No - the file is fine. See above.
Dave
snmpd.conf
(application/octet-stream, 5.4 KB)
########################################################################### # # 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 System administrators office syslocation "\"Fullerton, CA, Building 675, room C117\"" # 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 System administrator syscontact "\"Tam Vo, Raytheon, 1-714-446-4850\"" ########################################################################### # 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 "tvo auth" # rouser: a SNMPv3 read-only user # arguments: user [noauth|auth|priv] [restriction_oid] rouser tvo # rocommunity: a SNMPv1/SNMPv2c read-only access community name # arguments: community [default|hostname|network/bits] [oid] rocommunity public # rwcommunity: a SNMPv1/SNMPv2c read-write access community name # arguments: community [default|hostname|network/bits] [oid] rwcommunity private #Trying new things #First, map the community name "whatever" into a "security name" # sec.name source community com2sec tam default public # Second, map the security name into a group name: # groupName securityModel securityName group tamgroup v1 tam group tamgroup v2c tam #Third, create a view for us to let the group have rights to: #Make at least snmpwalk -v 1 localhost -c whatever system fast again. # Name incl/excl subtree mask(optional) view systemview included .1.3.6.1.2.1.1 view systemview included .1.3.6.1.2.1.25 #Finally, grant the group read-only access to the systemview view # Group context sec.model sec.level prefix read write notif access tamgroup "" any noauth exact systemview none none ########################################################################### # SECTION: Trap Destinations # # Here we define who the agent will send traps to. # trapsink: A SNMPv1 trap receiver # arguments: host [community] [portnum] trapsink Nitrogen public 162 # trap2sink: A SNMPv2c trap receiver # arguments: host [community] [portnum] trap2sink Nitrogen public 162 # informsink: A SNMPv2c inform (acknowledged trap) receiver # arguments: host [community] [portnum] informsink Nitrogen public 162 # trapcommunity: Default trap sink community to use # arguments: community-string trapcommunity public # authtrapenable: Should we send traps when authentication failures occur # arguments: 1 | 2 (1 = yes, 2 = no) authtrapenable 1 ########################################################################### # 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 "process table" 100 # 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 dskTable "100 MB" # load: Check for unreasonable load average values. # Watch the load average levels on the machine. # # load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0] # # 1MAX: If the 1 minute load average is above this limit at query # time, the errorFlag will be set. # 5MAX: Similar, but for 5 min average. # 15MAX: Similar, but for 15 min average. # # The results are reported in the laTable section of the UCD-SNMP-MIB tree load 90 80 70