RE: sysUpTime returns an error
"Tanya Brudner" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Nikos, Dave and all, > Oh, well, that explains everything. Everyone here assumed that sysUpTime >was returned from the agent, and since nobody had problems like that, we >couldn't figure out what's wrong. You should have mentioned that at the >beginning, a lot of time got waisted because of that. I apologize again for wasting everyone's time, but as I was thrown into this project without any guidance and without even knowing what SNMP is - not to mention masters and agents - it took me a while to even start figuring things out. I'm not writing the agent, or even rewriting it - just trying to fix it, and it proves to be quite a task... I really do appreciate all the help here and wouldn't even know how to move on without it. >To exclude MIBs you use: >snmpd -I -DISMAN-EVENT-MIB (that's I as in Internet) >Minor correction - you should specify the name of the MIB >*code* module (e.g. 'mteEvent'), not th name of the MIB file. >See 'mibgroup/mib_module_inits.h' for the full list of configured >modules for your agent. Note that you may need to exclude >more than one code module. Yes, I tried excluding specific mte<...> modules, (and even all) - but that didn't prove to help. Either get the same "answer", or ruin it all (the system-mib stops replying altogether). Tried running it with the -Dmib_init option, but I don't get no list. I am not sure what the codependencies are, or how to learn them. I attach here the mib_modules_init.h, perhaps you can advise. (Just to make clear: I am not the one that can make compile-time changes, only invocation / runtime.) As I really do struggle to make sense of it and make it all work, I'll appreciate any advice you can give me, or any reference I might have missed that can shed more light. Thanks and apologies again, -Tanya -----Original Message----- From: Nikos Balkanas [mailto:[email protected]] Sent: Tuesday, January 27, 2009 22:01 To: Tanya Brudner; [email protected] Subject: Re: sysUpTime returns an error for more CLI options use snmpd -h snmpd -Dmib_init will give you the MIBs that snmpd loaded at startup. You will have to go by trial and error. i would start by removing DISMAN mibs first. But you have to consider that it is the subagent that needs fixing, not the mIB tree. BR, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: "Nikos Balkanas" <[email protected]>; <[email protected]> Sent: Tuesday, January 27, 2009 8:42 PM Subject: RE: sysUpTime returns an error Thanks again, Nikos, for all your help. I still don't really understand how this problem is caused, but I think it has something to do with the fact that the subagent is actually the one that "answers" to sysUpTime, (perhaps this sheds light on things and I should have mentioned it earlier, if so - please forgive the newbie :) ). I found a while back how to exclude the system_mib module on invocation (in the snmpd start script), I'd like to exclude this cross-reference as well (and see what happens :) ). How do I do that (find what's the module I need to exclude)? Thanks, -Tanya -----Original Message----- From: Nikos Balkanas [mailto:[email protected]] Sent: Tuesday, January 27, 2009 18:21 To: Tanya Brudner; Mike Ayers; [email protected] Subject: Re: sysUpTime returns an error sysUpTime is defined in 2 places: RFV1213-MIB and SNMPv2-MIB. DISMAN-EVENT-MIB has an instance of SNMPv2. The first one (RFC) is the official, the second one is depreciated, but still working. Maybe the problem is with mteTriggerDeltaDiscontinuityID in DISMAN-EVENT-MIB (read). BR, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: "Mike Ayers" <[email protected]>; "Nikos Balkanas" <[email protected]>; <[email protected]> Sent: Tuesday, January 27, 2009 5:42 PM Subject: RE: sysUpTime returns an error Hello all, I thank you for your help and apologize for my (unforeseen) absence and thus - belated response. I ask to remind you that the issue in question is the error in sysUptime (please see below). In short - all attempts to get its value failed miserably. The result for snmpget ... returns: "DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on this agent at this OID". - I tried changing the conf. file as was suggested by Nikos, no luck. - Snmpwalk skips it all together, returning just: SNMPv2-MIB::sysDescr.0 = STRING: xxxxx SNMPv2-MIB::sysObjectID.0 = OID: xx.x.x.x SNMPv2-MIB::sysContact.0 = STRING: Tanya B. SNMPv2-MIB::sysName.0 = STRING: xxxxxxx SNMPv2-MIB::sysLocation.0 = STRING: SNMPv2-MIB::sysServices.0 = INTEGER: 3 - The snmpgetnext on .1.3.6.1.2.1.1.3 (as Mike suggested) returned sysContact data. However, something has happened in my absence, which I'll appreciate your input for: In an attempt to solve the issue, someone here edited the DISMAN-EVENT-MIB and removed all references to sysUpTime and changed the DEFVAL for mteTriggerDeltaDiscontinuityID to 0 (zero). Surprisingly enough - the problem was solved. As I am new into the SNMP world, and that person just went "brut-force" and changed it without understanding - I turn to you for explanation. :) Thanks again, -Tanya -----Original Message----- From: Mike Ayers [mailto:[email protected]] Sent: Friday, January 02, 2009 06:32 To: Nikos Balkanas; Tanya Brudner; [email protected] Subject: RE: sysUpTime returns an error > From: Nikos Balkanas [mailto:[email protected]] > Sent: Thursday, January 01, 2009 2:18 PM > Yes. You can see clearly the definition of sysUpTime in the > snmpwalk output. > You have no problems with MIBs. In fact using either MIBs for > sysUpTime (RFC or DISMAN) will get you the same result, because they are > getting it from the same place: Just to be clear, SNMPv2-MIB::sysUpTime and DISMAN-EVENT-MIB::sysUpTimeInstance are the same OID. The redefinition of the OID by the disman group was a mistake. There is no way for an application to know, when converting that value to text, which of the two names to use. It seems that the net-snmp tools will always print the disman value - do not worry, it is still sysUpTime. The real item of concern is that your agent does not seem to have a sysUptime value. Let's try something - could you try a get-next on .1.3.6.1.2.1.1.3 and then cut-n-paste command and output (with security informastion obfuscated) to the list, please? Thanks, Mike P.S. Happy New Year -----Original Message----- >From: Nikos Balkanas [mailto:[email protected]] > Sent: Thursday, January 01, 2009 2:18 PM >Yes. You can see clearly the definition of sysUpTime in the snmpwalk >output. >You have no problems with MIBs. In fact using either MIBs for sysUpTime >(RFC or DISMAN) will get you the same result, because they are getting it >from the same place: >mib-2->system->sysUpTime->sysUptimeInstance >as you can see from the walk. >I am sorry for keeping you this late. This is my configuration >(snmpd.conf) with passwords crossed out. Replace all xxx with your >passwords. It works fine for me. Please back up yours, take mein and >restart snmpd and test again. BR, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: "Nikos Balkanas" <[email protected]>; <[email protected]> Sent: Thursday, January 01, 2009 11:58 PM Subject: RE: sysUpTime returns an error Nikos, The file - renamed. The snmpd - restarted. The snmpget returns the exact same error as before ("DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on this agent at this OID"). (If using the specific RFC1213-MIB reference, I get the same error text, just for the correct mib ("RFC1213-MIB::sysUpTime.0..") The snmptranslate worked properly this time - please see the attached file. Thanks again, very very much! -Tanya -----Original Message----- From: Nikos Balkanas [mailto:[email protected]] Sent: Thursday, January 01, 2009 23:29 To: Tanya Brudner; [email protected] Subject: Re: sysUpTime returns an error Looks like your sysUptime is correctly set. DISMAN-EVENT-MIB seems to have some issue. Please: mv /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt.1 /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt restart snmpd. snmpget 127.0.0.1 sysUpTime.0 If this doesn't work, one last output from: snmptranslate -M+. -m DISMAN-EVENT-MIB -Tp -IR mib-2 Thanx, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: "Nikos Balkanas" <[email protected]>; <[email protected]> Sent: Thursday, January 01, 2009 10:55 PM Subject: RE: sysUpTime returns an error Thanks, The output you requested: +-- -R-- TimeTicks sysUpTime(3) (keeping my fingers crossed) -Tanya -----Original Message----- From: Nikos Balkanas [mailto:[email protected]] Sent: Thursday, January 01, 2009 22:14 To: Tanya Brudner; [email protected] Subject: Re: sysUpTime returns an error Thanx. I think I see something. If you can please mail me also (1 line output): snmptranslate -M+. -m SNMPv2-MIB -Tp -IR sysUpTime BR, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: "Nikos Balkanas" <[email protected]>; <[email protected]> Sent: Thursday, January 01, 2009 9:56 PM Subject: RE: sysUpTime returns an error Hi Nikos, In the attached file are the snmpwalk result (I'm not sure what to make of it, really :) ), and the 'ls' output. Thanks again, -Tanya -----Original Message----- From: Nikos Balkanas [mailto:[email protected]] Sent: Thursday, January 01, 2009 21:29 To: Tanya Brudner; [email protected] Subject: Re: sysUpTime returns an error Please run: ls -la /usr/local/share/snmp/mibs/DISMAN* and also: snmpwalk 127.0.0.1 dismanEventMIB And send output. Thanx, Nikos ----- Original Message ----- From: "Tanya Brudner" <[email protected]> To: <[email protected]> Sent: Thursday, January 01, 2009 8:56 PM Subject: RE: sysUpTime returns an error > Hi, > > Thanks again but I am still a bit confused: > > My access rights (as defined in the /etc/snmp/snmpd.conf) (almost from > the sample file) are defined as following: > > Com2sec my-sec-ro default public > Com2sec my-sec-rw default private > > Group my-ro-group v1 my-sec-ro > Group my-rw-group v1 my-sec-rw > Group my-ro-group usm my-sec-ro > Group my-rw-group usm my-sec-rw > > View all included .1 > > access my-rw-group "" v1 noauth exact all all none > access my-ro-group "" v1 noauth exact all none none > access my-rw-group "" usm noauth exact all all none > access my-ro-group "" usm noauth exact all none none > > rwuser myuser authPriv (the user is created directly by putting the > createUser directive in the /var/lib/... snmpd.conf file). > > Perhaps there is anything wrong here, or you can advice on something > else I could try... > > Thanks again, > > -Tanya > > -----Original Message----- > From: Wes Hardaker [mailto:[email protected]] > Sent: Wednesday, December 31, 2008 18:47 > To: Tanya Brudner > Cc: [email protected] > Subject: Re: sysUpTime returns an error > >>>>>> On Tue, 30 Dec 2008 22:23:01 +0200, "Tanya Brudner" > <[email protected]> said: > > TB> I have a problem with Get-request on a single mib: SysUpTime. > > TB> On a snmpget -v3 ..... system.sysUpTime.0, it returns > TB> ""DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on > this > TB> agent at this OID" > > It looks like you don't have access rights to that object. Check your > access control settings, or check that the agent was compiled to include > the system group (it should have been unless you're doing something > odd). > > The DISMAN-EVENT-MIB part is actually just misleading. It is the right > object. The DISMAN-EVENT-MIB defines the scalar instance as something > special for it's own purposes. Just ignore that part in your error > comment as it's not relevant to your problem. > -- > Wes Hardaker > Sparta, Inc. > > ------------------------------------------------------------------------ ------ > _______________________________________________ > 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 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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
mib_module_inits.h
(application/octet-stream, 4.9 KB)
/* This file is automatically generated by configure. Do not modify by hand. */
if (should_init("ipv6")) init_ipv6();
if (should_init("system_mib")) init_system_mib();
if (should_init("sysORTable")) init_sysORTable();
if (should_init("at")) init_at();
if (should_init("ip")) init_ip();
if (should_init("snmp_mib")) init_snmp_mib();
if (should_init("tcp")) init_tcp();
if (should_init("icmp")) init_icmp();
if (should_init("udp")) init_udp();
if (should_init("vacm_vars")) init_vacm_vars();
if (should_init("setSerialNo")) init_setSerialNo();
if (should_init("memory")) init_memory();
if (should_init("vmstat")) init_vmstat();
if (should_init("proc")) init_proc();
if (should_init("versioninfo")) init_versioninfo();
if (should_init("pass")) init_pass();
if (should_init("pass_persist")) init_pass_persist();
if (should_init("disk")) init_disk();
if (should_init("loadave")) init_loadave();
if (should_init("extensible")) init_extensible();
if (should_init("extend")) init_extend();
if (should_init("errormib")) init_errormib();
if (should_init("file")) init_file();
if (should_init("dlmod")) init_dlmod();
if (should_init("proxy")) init_proxy();
if (should_init("logmatch")) init_logmatch();
if (should_init("snmpEngine")) init_snmpEngine();
if (should_init("snmpMPDStats")) init_snmpMPDStats();
if (should_init("usmStats")) init_usmStats();
if (should_init("usmUser")) init_usmUser();
if (should_init("snmpNotifyTable")) init_snmpNotifyTable();
if (should_init("snmpNotifyFilterProfileTable")) init_snmpNotifyFilterProfileTable();
if (should_init("notification_log")) init_notification_log();
if (should_init("snmpTargetAddrEntry")) init_snmpTargetAddrEntry();
if (should_init("snmpTargetParamsEntry")) init_snmpTargetParamsEntry();
if (should_init("target_counters")) init_target_counters();
if (should_init("nsTransactionTable")) init_nsTransactionTable();
if (should_init("nsModuleTable")) init_nsModuleTable();
if (should_init("nsDebug")) init_nsDebug();
if (should_init("nsCache")) init_nsCache();
if (should_init("nsLogging")) init_nsLogging();
if (should_init("schedCore")) init_schedCore();
if (should_init("schedConf")) init_schedConf();
if (should_init("schedTable")) init_schedTable();
if (should_init("override")) init_override();
if (should_init("hr_system")) init_hr_system();
if (should_init("hr_storage")) init_hr_storage();
if (should_init("hr_device")) init_hr_device();
if (should_init("hr_other")) init_hr_other();
if (should_init("hr_proc")) init_hr_proc();
if (should_init("hr_network")) init_hr_network();
if (should_init("hr_print")) init_hr_print();
if (should_init("hr_disk")) init_hr_disk();
if (should_init("hr_partition")) init_hr_partition();
if (should_init("hr_filesys")) init_hr_filesys();
if (should_init("hr_swrun")) init_hr_swrun();
if (should_init("hr_swinst")) init_hr_swinst();
if (should_init("var_route")) init_var_route();
if (should_init("tcpTable")) init_tcpTable();
if (should_init("udpTable")) init_udpTable();
if (should_init("vacm_context")) init_vacm_context();
if (should_init("ip_scalars")) init_ip_scalars();
if (should_init("snmpNotifyFilterTable")) init_snmpNotifyFilterTable();
if (should_init("mteScalars")) init_mteScalars();
if (should_init("mteTrigger")) init_mteTrigger();
if (should_init("mteTriggerTable")) init_mteTriggerTable();
if (should_init("mteTriggerDeltaTable")) init_mteTriggerDeltaTable();
if (should_init("mteTriggerExistenceTable")) init_mteTriggerExistenceTable();
if (should_init("mteTriggerBooleanTable")) init_mteTriggerBooleanTable();
if (should_init("mteTriggerThresholdTable")) init_mteTriggerThresholdTable();
if (should_init("mteTriggerConf")) init_mteTriggerConf();
if (should_init("mteEvent")) init_mteEvent();
if (should_init("mteEventTable")) init_mteEventTable();
if (should_init("mteEventSetTable")) init_mteEventSetTable();
if (should_init("mteEventNotificationTable")) init_mteEventNotificationTable();
if (should_init("mteEventConf")) init_mteEventConf();
if (should_init("mteObjects")) init_mteObjects();
if (should_init("mteObjectsTable")) init_mteObjectsTable();
if (should_init("mteObjectsConf")) init_mteObjectsConf();
if (should_init("ifTable")) init_ifTable();
if (should_init("ipAddressTable")) init_ipAddressTable();
if (should_init("inetNetToMediaTable")) init_inetNetToMediaTable();
if (should_init("ipSystemStatsTable")) init_ipSystemStatsTable();
if (should_init("ifXTable")) init_ifXTable();
if (should_init("ipCidrRouteTable")) init_ipCidrRouteTable();
if (should_init("inetCidrRouteTable")) init_inetCidrRouteTable();
if (should_init("hw_mem")) init_hw_mem();
if (should_init("cpu_linux")) init_cpu_linux();
if (should_init("cpu")) init_cpu();
if (should_init("interface")) init_interface();