RE: NET-SNMP V3 question.
> From: Pil Choi [mailto:cpil...@hotmail.com] > Sent: Tuesday, December 01, 2009 10:06 AM > This is how I did in subagent code to talk to master agent. Now how > will the client(snmp manager) call the master/subagent remotely? What > should be in snmpd.conf file? > > netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, >NETSNMP_DS_AGENT_X_SOCKET, > "tcp:127.0.0.1.705"); I think you may be confusing the master-subagent relationship and the manager-master relationship. AgentX is a master-subagent preotocol. It should be active all the time (assuming the subagent should always be running). You have configured your AgentX such that the subagent must be on the same host as the master, due to the use of 127.0.0.1:705 as the AgentX socket address. The manager asks the master for management data via SNMP. The manager can be, and usually is, on another host. If the manager wants data that is provided by the subagent, it must still ask the master, who will route the request to the subagent via AgentX. HTH, Mike -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: mib file is tables, use mib2c.table_data.conf template generate .c .h files, ./configure --with-mib-modules=
> From: chenyapu1...@qq.com [mailto:chenyapu1...@qq.com] > Sent: Tuesday, December 01, 2009 4:37 AM > My mib file is a table(just for experimental prototype testing),I use > mib2c.table_data.conf generate .c .h files, > > I use the > ./configure --with-mib-modules="uit" ;make; make install > > There is NO error here.But I cannot get the right result use snmpwalk - > v1 -c public localhost, below is my .c file,who can tell me where I am > wrong? Where do the rows get added? I see a function to do this, but I do not see it called..? HTH, Mike -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: compiling under x86_64
Hi Thomas, net-snmp-5.5 gnat> perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.18-164.6.1.el5, archname=x86_64-linux-thread-multi uname='linux vishnu 2.6.18-164.6.1.el5 #1 smp tue nov 3 16:12:36 est 2009 x8 6_64 x86_64 x86_64 gnulinux ' config_args='-de -Dprefix=/opt/vdops -Dscriptdir=/opt/vdops/bin -Dusethreads ' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fs tack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-prot ector -I/usr/local/include' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-46)', gccosandvers=' ' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize =8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protecto r' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Nov 30 2009 08:11:05 @INC: /opt/vdops/lib/perl5/5.10.1/x86_64-linux-thread-multi /opt/vdops/lib/perl5/5.10.1 /opt/vdops/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi /opt/vdops/lib/perl5/site_perl/5.10.1 /opt/vdops/lib/perl5/site_perl . gnat> --sk Thomas Anders wrote: > Stuart Kendrick wrote: >> I'm trying to compile net-snmp on a 64-bit box > > What exact version of net-snmp are you trying to compile? > What's the output of "perl -V" for your local Perl build? > > > +Thomas -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: compiling under x86_64
Stuart Kendrick wrote: > I'm trying to compile net-snmp on a 64-bit box What exact version of net-snmp are you trying to compile? What's the output of "perl -V" for your local Perl build? +Thomas -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
How to add and compile additional c files into mib module?
Hi all, 1. I have a MIB file converted to a mib module testAgentModule.c and testAgentModule.h 2. In testAgentModule.c, I want call a function in my own c file called dataProcess.c 3. Where do I add this dataProcess.c file in the Makefile and How do compile and link it to the testAgentModule? Thanks Chi Guan -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: snmptrap (V1) checksum errors
Ok thank you very much. I am sending traps on a linux computer (where I am logged as root), and spy packets there (using an Eth HUB of course, because the STB replies to an external server (should be hard coded)). I'll see where the authentication error comes from, (2 monthes ago it was on snmp v.2 ..) and see about the trap listener. Cheers, Shaiton 2009/12/1 Mike Ayers > > From: Shaiton [mailto:shaito...@gmail.com] > > Sent: Friday, November 27, 2009 5:42 AM > > > It has been 1 weeks that I tried to speak snmp with my Set Top Box, but > > I can't. > > I got the MIB, so I tried to sand many traps but sometimes I got > > "Authentification failed" (CAS authentification with an unknown > > server ..) > > That doesn't sound like an SNMP error. > > > But I tried simple traps like > > > > # snmptrap -v 1 -c command 192.168.1.248:161 1.3 "" 6 6 "" > > 1.3.6.1.4.1.8711.101.13.1.3.8 s "message here" > > You are sending the trap to port 161. The well known port for > receiving traps is 162 - are you sure you don't want to use that? > > > which would write the message on the TV. > > But I got a checksum error (while spying with wireshark). > > That probably doesn't matter. It is now common for the UDP > checksum to be done on the NIC itself, so wireshark will see the packet > before the checksum is calculated. If you see the same issues with other > UDP protocols, then worry not. > > > Ok I don't know if I can specify the port number like that, if I don't, > > with > > > > # snmptrap -v 1 -c command 192.168.1.248 1.3 "" 6 6 "" > > 1.3.6.1.4.1.8711.101.13.1.3.8 s "message here" > > > > I get an ICMP message "Destination port unreachable" (from the STB to > > my computer, where snmpd is running). > > You are running snmptrap on the STB? Embedded linux? Just > curious. > >On your PC you will want to run a trap listener. Check the man > pages for snmptrapd and snmptrapd.conf for details. If you cannot be root, > listen on an alternate port, like 8162. > > > snmpwalk answer me that I am not authentified ... > > There is no authentication in SNMPv1. This may be another issue. > > >HTH, > > Mike > > -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: snmptrap (V1) checksum errors
> From: Shaiton [mailto:shaito...@gmail.com] > Sent: Friday, November 27, 2009 5:42 AM > It has been 1 weeks that I tried to speak snmp with my Set Top Box, but > I can't. > I got the MIB, so I tried to sand many traps but sometimes I got > "Authentification failed" (CAS authentification with an unknown > server ..) That doesn't sound like an SNMP error. > But I tried simple traps like > > # snmptrap -v 1 -c command 192.168.1.248:161 1.3 "" 6 6 "" > 1.3.6.1.4.1.8711.101.13.1.3.8 s "message here" You are sending the trap to port 161. The well known port for receiving traps is 162 - are you sure you don't want to use that? > which would write the message on the TV. > But I got a checksum error (while spying with wireshark). That probably doesn't matter. It is now common for the UDP checksum to be done on the NIC itself, so wireshark will see the packet before the checksum is calculated. If you see the same issues with other UDP protocols, then worry not. > Ok I don't know if I can specify the port number like that, if I don't, > with > > # snmptrap -v 1 -c command 192.168.1.248 1.3 "" 6 6 "" > 1.3.6.1.4.1.8711.101.13.1.3.8 s "message here" > > I get an ICMP message "Destination port unreachable" (from the STB to > my computer, where snmpd is running). You are running snmptrap on the STB? Embedded linux? Just curious. On your PC you will want to run a trap listener. Check the man pages for snmptrapd and snmptrapd.conf for details. If you cannot be root, listen on an alternate port, like 8162. > snmpwalk answer me that I am not authentified ... There is no authentication in SNMPv1. This may be another issue. HTH, Mike -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Duplicated SNMP syslogs
I have found out where the problem is. The older version of net-snmp (5.3) doesn't have the function "shutdown_snmp_logging". Xuan From: b...@live.com To: d.t.shi...@liverpool.ac.uk CC: net-snmp-users@lists.sourceforge.net Subject: RE: Duplicated SNMP syslogs Date: Tue, 1 Dec 2009 11:22:52 -0500 I couldn't figure it out how to call this function in my main program. When I compile, I got the following error: warning: implicit declaration of function shutdown_snmp_logging Warnings are treated as errors in my make. I added the header file: #include , it didn't work either. Thanks Xuan > Date: Tue, 1 Dec 2009 09:28:15 + > Subject: Re: Duplicated SNMP syslogs > From: d.t.shi...@liverpool.ac.uk > To: b...@live.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/11/30 X Z : > > Does anyone know how to reset the syslog level to avoid the duplicated > > syslogs? > > Call 'shutdown_snmp_logging()' before configuring your new log settings. > > Dave Get gifts for them and cashback for you. Try Bing now. _ Get gifts for them and cashback for you. Try Bing now. http://www.bing.com/shopping/search?q=xbox+games&scope=cashback&form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1-- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: NET-SNMP V3 question.
This is how I did in subagent code to talk to master agent. Now how will the client(snmp manager) call the master/subagent remotely? What should be in snmpd.conf file? netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, "tcp:127.0.0.1.705"); Thanks, Pil > Date: Tue, 1 Dec 2009 16:05:10 + > Subject: Re: NET-SNMP V3 question. > From: d.t.shi...@liverpool.ac.uk > To: cpil...@hotmail.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/12/1 Pil Choi : > > I need to > > figure out how to configure SNMP so that SNMP manager communicate with its > > master/subagent via network remotely with local host between subagent and > > master agent, but SNMP manager should use subagent's real ip address when it > > sends a request to the remote sumbagent. > > The manager does not talk to the subagent directly. > The manager *always* talks to the master agent, >and the master agent talks to the subagent (if necessary) > > As far as the manager is concerned, there appears a to be only one agent. > Whether this is true, or whether there are actually a num,ber of > subagents is a private matter, known only to the master agent. > > So the manager should be using the IP address of the master > agent, not of the subagent. > > Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: DISMAN Event MIB configuration: monitor
2009/12/1 Sam V : > Is there another patch for existence triggers? > startup condition would be present, absence, or both. Hmmm... that's going to be harder. The parsing of the "monitor" directive currently treats the existence tests as an enumeration, rather than as three independent bits. And the startup flag (-s) simply applies the same at startup as well. Extending this to specify different startup values to the continuing case (as well as specifying combinations of the existence checks) is going to take a bit more thought. You should always be able to set things up via SNMP SET requests, and that should work correctly. It's just the config file directives that are more restricted. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: Duplicated SNMP syslogs
I couldn't figure it out how to call this function in my main program. When I compile, I got the following error: warning: implicit declaration of function shutdown_snmp_logging Warnings are treated as errors in my make. I added the header file: #include , it didn't work either. Thanks Xuan > Date: Tue, 1 Dec 2009 09:28:15 + > Subject: Re: Duplicated SNMP syslogs > From: d.t.shi...@liverpool.ac.uk > To: b...@live.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/11/30 X Z : > > Does anyone know how to reset the syslog level to avoid the duplicated > > syslogs? > > Call 'shutdown_snmp_logging()' before configuring your new log settings. > > Dave _ Get gifts for them and cashback for you. Try Bing now. http://www.bing.com/shopping/search?q=xbox+games&scope=cashback&form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1-- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: NET-SNMP V3 question.
2009/12/1 Pil Choi : > I need to > figure out how to configure SNMP so that SNMP manager communicate with its > master/subagent via network remotely with local host between subagent and > master agent, but SNMP manager should use subagent's real ip address when it > sends a request to the remote sumbagent. The manager does not talk to the subagent directly. The manager *always* talks to the master agent, and the master agent talks to the subagent (if necessary) As far as the manager is concerned, there appears a to be only one agent. Whether this is true, or whether there are actually a num,ber of subagents is a private matter, known only to the master agent. So the manager should be using the IP address of the master agent, not of the subagent. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: DISMAN Event MIB configuration: monitor
Thanks Dave for your reply. I'll try to see if this would work. Now, is there another patch for existence triggers? startup condition would be present, absence, or both. > Date: Tue, 1 Dec 2009 08:51:41 + > Subject: Re: DISMAN Event MIB configuration: monitor > From: d.t.shi...@liverpool.ac.uk > To: sbazd...@hotmail.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/11/30 Sam V : > > Now, in case of a threshold > > trigger > > which have multiple startup cases, Raising, Falling, RisingAndFalling. How > > can specify that I want a startup condition to be true on for the rising > > case > > and not all cases? > > In term of configuring this via the snmpd.conf file, this is not > currently possible. > The "monitor" directive doesn't provide that level of control. > > Try the attached patch (untested), which should extend the '-s' flag to > support '-sr' for rising only, and '-sf' for falling only.Please let me > know how it works for you. > > Dave _ Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you. http://go.microsoft.com/?linkid=9691817-- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: NET-SNMP V3 question.
I am sorry...correction in red below. From: cpil...@hotmail.com To: d.t.shi...@liverpool.ac.uk CC: net-snmp-users@lists.sourceforge.net Subject: RE: NET-SNMP V3 question. Date: Tue, 1 Dec 2009 10:41:06 -0500 Hi Dave, subagent is running on a dev board. And its itable looks empty. The thing is ... when I specified the real ip address of the board in my subagent like 123.45.67.910 instead of localhost(127.0.0.1), the SNMP manager found the subagent remotely. However, when I used localhost in subagent and used the real ip address(123.45.37.910) for the SNMP manager command line to find the master or subagent, the manager could find its remote subagent. I need to figure out how to configure SNMP so that SNMP manager communicate with its master/subagent via network remotely with local host between subagent and master agent, but SNMP manager should use subagent's real ip address when it sends a request to the remote sumbagent. my SNMP manager command line, snmpget -v 3 -u user01 -a MD5 -A user01 -x AES -X user01 -l authNoPriv 134.45.67.910 MIB-Example::wbParams.wbImped.0 I got this result after the command. snmpget: Timeout (Connection reset by peer) (Connection reset by peer) Any suggestion? > Date: Tue, 1 Dec 2009 14:16:15 + > Subject: Re: NET-SNMP V3 question. > From: d.t.shi...@liverpool.ac.uk > To: cpil...@hotmail.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/12/1 Pil Choi : > > My SNMP manger fails to send a message to a > > remote Master agnet and sub-agent that I created via net-work > > . It is fine when they are running on the same machines. > > Check whether the remote machine has a firewall configured. > (eg. iptables on a Linux box). This may well be blocking access > to the SNMP agent. > > Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
RE: NET-SNMP V3 question.
Hi Dave, subagent is running on a dev board. And its itable looks empty. The thing is ... when I specified the real ip address of the board in my subagent like 123.45.67.910 instead of localhost(127.0.0.1), the SNMP manager found the subagent remotely. However, when I used localhost in subagent and used the real ip address(123.45.37.910) for the SNMP manager command lien to find the master or subagent, the manager couldn't find its remote subagent. I need to figure out how to configure SNMP so that SNMP manager communicate with its master/subagent via network remotely... my SNMP manager command line, snmpget -v 3 -u user01 -a MD5 -A user01 -x AES -X user01 -l authNoPriv 134.45.67.910 MIB-Example::wbParams.wbImped.0 I got this result after the command. snmpget: Timeout (Connection reset by peer) (Connection reset by peer) Any suggestion? > Date: Tue, 1 Dec 2009 14:16:15 + > Subject: Re: NET-SNMP V3 question. > From: d.t.shi...@liverpool.ac.uk > To: cpil...@hotmail.com > CC: net-snmp-users@lists.sourceforge.net > > 2009/12/1 Pil Choi : > > My SNMP manger fails to send a message to a > > remote Master agnet and sub-agent that I created via net-work > > . It is fine when they are running on the same machines. > > Check whether the remote machine has a firewall configured. > (eg. iptables on a Linux box). This may well be blocking access > to the SNMP agent. > > Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
query regarding udpHCInDatagrams and udpHCOutDatagrams
Hi All, I have a doubt regaring udp mib w r t MIBII and rfc4113 As net-snmp5.4.2.1 does not support the following object: udpHCInDatagrams and udpHCOutDatagrams but it is supporting udpInDatagrams and udpOutDatagrams I found that in above object interpret set data but difference is only data type [counter32 and counter64]. Am I right If I am right then we I can update the udpHCInDatagrams and udpHCOutDatagrams, once size will be greater than (2^32-1) Rgds, Sanjay -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: NET-SNMP V3 question.
2009/12/1 Pil Choi : > My SNMP manger fails to send a message to a > remote Master agnet and sub-agent that I created via net-work > . It is fine when they are running on the same machines. Check whether the remote machine has a firewall configured. (eg. iptables on a Linux box). This may well be blocking access to the SNMP agent. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
NET-SNMP V3 question.
Hi, I have a question about configuring SNMP Manager and master agent- they are running on a separate machine. My SNMP manger fails to send a message to a remote Master agnet and sub-agent that I created via net-work. Does anyone know how to configure SNMP so that Manager and Master agent(or subagent) can communicate each other such as by using snmpdget and snmpdset? Should I need to add something to snmpd.conf? I am using NET-SNMP V3. It is find when they are running on the same machines. This is my current snmpd.conf file. rwuser user0001 priv createUser user0001 MD5 user0001 AES user0001 master agentx agentxSocket tcp:127.0.0.1:705 And this is a snippet of my subagent, this is how it invoke localhost. netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, "tcp:127.0.0.1:705"); Any idea? so that remote SNMP manager can send a request to master agent/subagent successfully? thanks, Pil Joo -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: mib file is tables, use mib2c.table_data.conf template generate .c .h files, ./configure --with-mib-modules=
2009/12/1 飞飞 : > But I cannot get the right result use snmpwalk -v1 -c public localhost Please see the FAQ entry Why can't I see values in the tree? Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: IPAddress like index for MIB table
Thanks for response, but I found the problem and fix it. The problem was in the "_get_first_data_point" (and "_get_next_data_point") functions. For function "snmp_set_var_value", prevoiusly I use a string variable (all project is written in the C++) to setting index which is ASN_IPADDRESS type (use 4 bytes for it; length of this string is 4): snmp_set_var_value(vptr, (u_char *)tIndex->m_multicastGroupIpAddress.c_str(), tIndex->m_multicastGroupIpAddress.length()); Now I change it, and use "u_long" type variable, for setting these indexes. Dejan From: Dave Shield To: Dejan Bojic Cc: net-snmp-users@lists.sourceforge.net Sent: Mon, November 30, 2009 12:08:04 PM Subject: Re: IPAddress like index for MIB table 2009/11/25 Dejan Bojic : > a GET request will return: radiusServerCurrentMode.192.168.1.20 > a GET_NEXT request will return: radiusServerCurrentMode.20.1.168.192 > Is anybody has any idea why I got index in the opposite order? This sounds like a bug in the code that implements this MIB. What does this code look like? Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: SNMP Perl module and MIB navigation
2009/9/9 Wes Hardaker : >> On Fri, 4 Sep 2009 16:53:07 -0400, Daniel Savard >> said: > DS> For example, I want to output a line like: > > DS> ATTR(=,$ENTERPRISE),VALUE(=,"$var"); > > DS> where $var is actually replaced by the value of the variable and > $ENTERPRISE > DS> must be output as a litteral not trying to interpret it as a variable. > > That's a missing feature of mib2c, you're right. Actually, having finally looked at the mib2c script itself, this functionality *is* present (and has been for years) Try using "$...@enterprise" in the template config file. This will be replaced by "$ENTERPRISE" in the resulting output. (I'll close the entry in the bug tracker) Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: Please help me to get sub agents working.
2009/11/30 Duo Maxwell : > I am having trouble getting a subagent to work. > I hope this is not one of thoes cases where the answer is > obvious and I have complete overlooked it. Probably not - getting new MIB modules to work can often be tricky. The best starting point is probably the FAQ entry Why doesn't my new MIB module report anything? This gives some guidance as to how to pinpoint where the problem actually lies. Other suggestions: - try compiling your module directly into the agent (rather than via a subagent). That way you can ensure that the code is working. You can always re-compile the same module to run as a subagent later, for active deployment with a standard agent. > 4)Testing > When using an SNMP manager connected to "localhost" > -Asking for the variable "1.3.6.1.2.1.1.1.0" does return the > "sysDescription". The SYSTEM tree does work. > -Asking for the variable "1.3.6.1.4.1.82.2" which belongs to the subagent, > returns null. What about information *outside* the system group (but still provided by themain agent)? > snmpget -v1 -c public localhost PS-TEST6-MIB::psTest6MIB > returns > "Eror In packet" > "Reason: (noSouchName) There is no such variable in this MIB" > "Failed object: PS-TEST6-MIB::psTest6MIB" That will always fail - you forgot the .0 instance subidentifier. > snmpwalk -v1 -c public localhost PS-TEST6-MIB:psTest6MIB > returns > "End Of MIB" I'd expect to see Net-SNMP values here. That looks like the access control settings might be wrong. (hence asking about non-system information above) > Using > "snmpd -DpsTest6MIB" to start the agent > returns some errors Is this the main agent, or your subagent? > 5)Confirgation > I added > rocommunity public 192.168.1.0/16 > to the configuration. Is there any other access control in the config file? after that didn't worked I also added the following > lines >com2sec readonly default public >com2sec readwrite default private > That still didnt work No - it wouldn't. The com2sec/view/group/access directives work in combination - you'd need all four. Just one bit isn't sufficient. But I'd forget about that style - the rocommunity approach is much simpler. Try with *just* rocommunity public master agentx in your config file. > psTest6MIB MODULE-IDENTITY > LAST-UPDATED "991209Z" > ORGANIZATION "Organization name goes here" > CONTACT-INFO "Contact info goes here" > DESCRIPTION "Attempt number 6 to get sub agents working" > ::= { enterprises 82 } Are you working for Network Computing Devices ? if not, then you shouldn't really be using their enterprise number. There's an OID (NET-SNMP-MIB::netSnmpPlaypen) that we provide specifically for testing purposes. If you don't have an OID of your own, then I suggest you use this as the root of your MIB. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: How do I modify the init_XXX(void) function get OIDs use mib2c.table_data.conf template???
2009/12/1 飞飞 : > when my mib is a simple table,I > use mib2c.table_data.conf,I cannot get oids in init_uit() function. > void > init_uit(void) > { > > /* here we initialize all the tables we're planning on supporting */ > initialize_table_diskSystemTable(); > } The 'init_uit' routine calls 'initialize_table_diskSystemTable()' which should define the OID of the root of the table. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
How do I modify the init_XXX(void) function get OIDs use mib2c.table_data.conf template???
Hi all: when I use template mib2c.scalar.conf I get OIDs in init_uit() rightly(My mib data entries are all simply scalars);but when my mib is a simple table,I use mib2c.table_data.conf,I cannot get oids in init_uit() function. I want to some one tell me where I am wrong and how to fix it. TIA Alex init_uit() function generated by mib2c.table_data.conf template (a table mib) void init_uit(void) { /* here we initialize all the tables we're planning on supporting */ initialize_table_diskSystemTable(); } init_uit() function generated by mib2c.scalar.conf template (a simple mib file are all scalars like above) void init_uit(void) { static oid portID_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,1 }; static oid encID_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,2 }; static oid slotID_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,3 }; static oid speed_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,4 }; static oid status_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,5 }; static oid revNew_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,6 }; static oid smtStatus_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,7 }; static oid bufStatus_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,8 }; static oid dstype_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,9 }; static oid uuID_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,10 }; static oid size_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,11 }; static oid diskID_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,12 }; static oid vendor_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,13 }; static oid revision_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,14 }; static oid product_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,15 }; static oid sn_oid[] = { 1,3,6,1,4,1,30901,2090,7000,1,16 }; DEBUGMSGTL(("uit", "Initializing\n")); netsnmp_register_scalar( netsnmp_create_handler_registration("portID", handle_portID, portID_oid, OID_LENGTH(portID_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("encID", handle_encID, encID_oid, OID_LENGTH(encID_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("slotID", handle_slotID, slotID_oid, OID_LENGTH(slotID_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("speed", handle_speed, speed_oid, OID_LENGTH(speed_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("status", handle_status, status_oid, OID_LENGTH(status_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("revNew", handle_revNew, revNew_oid, OID_LENGTH(revNew_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("smtStatus", handle_smtStatus, smtStatus_oid, OID_LENGTH(smtStatus_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("bufStatus", handle_bufStatus, bufStatus_oid, OID_LENGTH(bufStatus_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("dstype", handle_dstype, dstype_oid, OID_LENGTH(dstype_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("uuID", handle_uuID, uuID_oid, OID_LENGTH(uuID_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("size", handle_size, size_oid, OID_LENGTH(size_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("diskID", handle_diskID, diskID_oid, OID_LENGTH(diskID_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("vendor", handle_vendor, vendor_oid, OID_LENGTH(vendor_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_handler_registration("revision", handle_revision, revision_oid, OID_LENGTH(revision_oid), HANDLER_CAN_RONLY )); netsnmp_register_scalar( netsnmp_create_
Please help me to get sub agents working.
I am having trouble getting a subagent to work. I have attempted to follow the rules of support and first check alternative sources. I have been through the wiki and tutorials many times. I hope this is not one of thoes cases where the answer is obvious and I have complete overlooked it. If that is the case then I am sorry. Below is the process I used in detail. 0) Tested the MIB with "snmptranslate". It appeared to work fine. I havent registered a number with IANA yet so using 82 temporarily. Sorry "Auspex Systems, Inc". 1) I inputted this line env MIBS="+PS-TEST6-MIB" mib2c psTest6MIB this was the response OID: psTest6MIB numeric translation 1.3.6.1.4.1.82 number of scalars within: 1 I choose Net-SNMP style code and to "tie interger values to integer scalars" As expected is generated psTest6MIB.c and psTest6MIB.h 2)I then compile-subagent net-snmp-config --compile-subagent psTest6MIB psTest6MIB.c resulting in "subagent program psTest6MIB created". 3)I start net-snmp snmpd Then I start the subagent ./psTest6MIB All seems fine. No errors. 4)Testing When using an SNMP manager connected to "localhost" -Asking for the variable "1.3.6.1.2.1.1.1.0" does return the "sysDescription". The SYSTEM tree does work. -Asking for the variable "1.3.6.1.4.1.82.2" which belongs to the subagent, returns null. snmpget -v1 -c public localhost PS-TEST6-MIB::psTest6MIB returns "Eror In packet" "Reason: (noSouchName) There is no such variable in this MIB" "Failed object: PS-TEST6-MIB::psTest6MIB" snmpget -v2c -c public localhost PS-TEST6-MIB::psTest6MIB returns "No Such Object available on this agent at this OID" snmpgetnext -v1 -c public localhost PS-TEST6-MIB::versionTag returns "Unknown Object Idenfitier" snmpwalk -v1 -c public localhost PS-TEST6-MIB:psTest6MIB returns "End Of MIB" snmpwalk -v2c -c public localhost PS-TEST6-MIB::psTest6MIB returns "No more variables left in this MIB View(Is is past the end of the MIB tree)" Using "snmpd -DpsTest6MIB" to start the agent returns some errors /usr/local/share/snmp/snmp.conf: line 15: Warning: Unknown token: agentAddress. /usr/local/share/snmp/snmp.conf: line 45: Warning: Unknown token: view. /usr/local/share/snmp/snmp.conf: line 46: Warning: Unknown token: view. /usr/local/share/snmp/snmp.conf: line 51: Warning: Unknown token: rocommunity. /usr/local/share/snmp/snmp.conf: line 60: Warning: Unknown token: rouser. /usr/local/share/snmp/snmp.conf: line 77: Warning: Unknown token: sysLocation. /usr/local/share/snmp/snmp.conf: line 78: Warning: Unknown token: sysContact. /usr/local/share/snmp/snmp.conf: line 80: Warning: Unknown token: sysServices. /usr/local/share/snmp/snmp.conf: line 87: Warning: Unknown token: proc. /usr/local/share/snmp/snmp.conf: line 89: Warning: Unknown token: proc. /usr/local/share/snmp/snmp.conf: line 91: Warning: Unknown token: proc. /usr/local/share/snmp/snmp.conf: line 101: Warning: Unknown token: disk. /usr/local/share/snmp/snmp.conf: line 102: Warning: Unknown token: disk. /usr/local/share/snmp/snmp.conf: line 103: Warning: Unknown token: includeAllDisks. /usr/local/share/snmp/snmp.conf: line 113: Warning: Unknown token: load. /usr/local/share/snmp/snmp.conf: line 126: Warning: Unknown token: trapsink. /usr/local/share/snmp/snmp.conf: line 140: Warning: Unknown token: iquerySecName. /usr/local/share/snmp/snmp.conf: line 141: Warning: Unknown token: rouser. /usr/local/share/snmp/snmp.conf: line 143: Warning: Unknown token: defaultMonitors. /usr/local/share/snmp/snmp.conf: line 145: Warning: Unknown token: linkUpDownNotifications. /usr/local/share/snmp/snmp.conf: line 157: Warning: Unknown token: extend. /usr/local/share/snmp/snmp.conf: line 158: Warning: Unknown token: extend-sh. /usr/local/share/snmp/snmp.conf: line 190: Warning: Unknown token: master. 5)Confirgation I added rocommunity public 192.168.1.0/16 to the configuration. after that didn't worked I also added the following lines com2sec readonly default public com2sec readwrite default private That still didnt work I also made sure that master agentx was uncommented in snmpd.conf 6)Appendicies Received SNMP packet(s) from UDP: [192.168.1.146]:162->[192.168.1.147] GET message -- DISMAN-EVENT-MIB::sysUpTimeInstance Sending 43 bytes to UDP: [192.168.1.146]:162->[192.168.1.147] : 30 29 02 01 00 04 06 70 75 62 6C 69 63 A2 1C 020).public... 0016: 02 02 A2 02 01 00 02 01 00 30 10 30 0E 06 08 2B.0.0...+ 0032: 06 01 02 01 01 03 00 43 02 37 DA...C.7. Received 41 bytes from UDP: [192.168.1.146]:162->[192.168.1.147] : 30 27 02 01 00 04 06 70 75 62 6C 69 63 A0 1A 020'.public... 0016: 02 02 A3 02 01 00 02 01 00 30 0E 30 0C 06 08 2B.0.0...+ 0032: 06 01 04 01 52 02 00 05 00 R Received SNMP packet(s) from UDP: [192.168.1.146]:162->[192.168.1.147] GET message -- SNMPv2-SMI::enterprises.82.2.0 Sending 41 bytes to UDP: [192.168.1.146]:162->[192.168.1.147] :
Re: Duplicated SNMP syslogs
2009/11/30 X Z : > Does anyone know how to reset the syslog level to avoid the duplicated > syslogs? Call 'shutdown_snmp_logging()' before configuring your new log settings. Dave -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Re: DISMAN Event MIB configuration: monitor
2009/11/30 Sam V : > Now, in case of a threshold > trigger > which have multiple startup cases, Raising, Falling, RisingAndFalling. How > can specify that I want a startup condition to be true on for the rising case > and not all cases? In term of configuring this via the snmpd.conf file, this is not currently possible. The "monitor" directive doesn't provide that level of control. Try the attached patch (untested), which should extend the '-s' flag to support '-sr' for rising only, and '-sf' for falling only.Please let me know how it works for you. Dave Index: mteTriggerConf.c === --- mteTriggerConf.c (revision 17786) +++ mteTriggerConf.c (working copy) @@ -156,6 +156,7 @@ MTE_TRIGGER_FLAG_VALID; long idx = 0; long startup = 1;/* ??? or 0 */ +long startTh = MTE_THRESH_START_RISEFALL; long repeat = 600; netsnmp_session *sess = NULL; @@ -396,10 +397,19 @@ case 'S': /* disable startup tests */ startup = 0; +startTh = 0; break; case 's': /* enable startup tests (default?) */ startup = 1; +switch (buf[2]) { +case 'r': +startTh = MTE_THRESH_START_RISE; +break; +case 'f': +startTh = MTE_THRESH_START_FALL; +break; +} break; case 't': /* threshold test - already handled */ @@ -636,8 +646,7 @@ entry->mteTThFallValue = value; value = strtol(buf, NULL, 0); entry->mteTThRiseValue = value; -if (!startup) -entry->mteTThStartup = 0; +entry->mteTThStartup= startTh; if ( idx > 0 ) { /* * Refer to the objects for this trigger (if any)... -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users