RE: Adding my own MIB
Well , i think you are missing one of the most important step of extending the agent. By adding MIB to a directory does not mean that it would start answering the OID it contains.Snmptranslate works because it just reads the oid from MIB and returns what it means and snmpwalk works since it would answer all the OID that are known to agent . In order to get your oid working with agent you have to extent the agent using dynamic loadable modules /static linking or perhaps use agentX protocol. net-snmp has the tutorials on how to extend the agent and make it to answer your OID's.I hope it helps . RegardsFrom: hrom...@globalbackbone.com.pe To: net-snmp-users@lists.sourceforge.net Subject: Adding my own MIB Date: Fri, 28 Sep 2012 09:21:17 -0500 Hi there! I was wondering if someone can help me with this. I’m trying to add my own mib in order to set and get values from an oid (my own object). I have followed this step: 1. Create my own Mib and added it into my Mib directory. (This worked good) After I did this; I could execute the following commands successfully: snmpset -m MIB-TEST -v 2c -c private localhost .1.3.6.1.4.1.6147.1.1 i 45 snmptranslate -m TDP-MIB -Td .1.3.6.1.4.1.6147.1.1 BUT when I try to run this commands: snmpget -m MIB-TEST -v 2c -c private localhost .1.3.6.1.4.1.6147.1.1.0 snmpget -m MIB-TEST -v 2c -c private localhost .1.3.6.1.4.1.6147.1.1 Returned me this: MIB-TEST::ClearCodeGroup1 = No Such Instance currently exists at this OID MIB-TEST::ClearCodeGroup1.0 = No Such Instance currently exists at this OID And if execute the snmpwalk command: snmpwalk -v 2c -c private localhost .1.3.6.1.4.1.6147.1.1 I only got the result of some mibs like: SNMPv2-MIB IF-MIB RFC1213-MIB IP-MIB TCP-MIB BUT I have, in my mibs directory, A LOT of MORE MIBS (like MIB-TEST) and they seem no to be running in my pc (My OS is linux). what should I do??? Am I missing anything??? Pleeease, I really need your help guys. Hernán -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ 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 -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ 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 doesn't work
If it is working on debian then you might have installed net snmp package differently maybe that is why it is not working on centos.Are you sure your snmptrapd.conf is located in tmp directory /tmp/snmptrapd.conf.Try reducing you snmptrapd.conf options and first try to make it run then try to diagnose where is the problem . Regards, Muhammad Waqas. Date: Tue, 24 Jul 2012 09:13:44 +0430 Subject: Re: SNMPTRAP doesn't work From: smhjafar...@gmail.com To: mohwaqa...@hotmail.com Thanks I run snmp trap demon and I get answer like this]# snmptrapd -f -C -c /tmp/snmptrapd.conf -Le/tmp/snmptrapd.conf: No such file or directory/tmp/snmptrapd.conf: No such file or directory Warning: no access control information configured.This receiver will *NOT* accept any incoming notifications.NET-SNMP version 5.3.2.2 ... and after that this process take long time and I should stop it - but about I think I have problem in snmptrapd.conf because when I run snmptrap I don't have any error but I don't have anything in my log file I set my snmptrapd.conf like this : logOption f /var/log/snmptraps.logauthCommunity log,execute,net public and in this path : /etc/sysconfig/snmpd.options I set like this : OPTIONS=-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -x (MY IP) and also I turnd my IPtable off for test but I dont have anything in my log file after I run snmptrap . I TEST my request in debian and I get true answer but in CentOS I didn't get any answer On Tue, Jul 24, 2012 at 8:55 AM, Mohammad Waqas Athar mohwaqa...@hotmail.com wrote: Well if you are new to using net-snmp library you will come across such kind of problems. I think you are having problem setting up snmptrap daemon . If this is the case then 1- First of all make sure your snmptrapd.conf configuration file is in (any) directory as pointed out by `net-snmp-config --snmpconfpath` 2- Secondly make sure you flush your iptables rule by sudo iptables -F so that snmp trap messages are not blocked by firewall.3- Try to run snmptrap daemon using sudo /usr/local/sbin/snmptrapd -f -L o and generate a dummy snmptrap as given in net snmp tutorial and check does your daemon works or not. When you run snmptrap , you will get an error of some config file. Ignore that message if you follow the correct syntax then message would definitively be delivered to snmptrap daemon. Regards, Muhammad Waqas. Date: Tue, 24 Jul 2012 04:54:08 +0430 Subject: SNMPTRAP doesn't work From: smhjafar...@gmail.com To: net-snmp-users@lists.sourceforge.net Hi I set snmptrap configure and then I change these conf file but I can't fine /etc/default/snmptrap.conf So when I run a snmptrap instruction on my agent this instruction run but I don't have anything in my log file can you help me? ot can you tell me snmptrap step by step? thanks -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ 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 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ 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 to use net-snmp for monitoring java processes in linux
Well it seems like you have not seen any tutorials on net-snmp.First of all you need to create mib files for all the parameters that you want to monitor.Then you have to extend your snmpd agent so that it answers request for your parameters.For this you have to use mib2c to generate code. Follow examples given here http://www.net-snmp.org/docs/man/mib2c.htmlThen you need to compile your code as sub agent or dynamic loadable objecthttp://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagenthttp://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object Once that is done you need to configure your snmpd.conf, run your agent and query your parameters. This is just the guideline . Please see net-snmp tutorial for a detailed info You can integrate file reading/writing or database in the code generated by mib2c.For this you need to see the above tutorials.With this your agent will be able to interact with db or file. Regards From: zain.mi...@hughes.com To: net-snmp-users@lists.sourceforge.net Date: Sun, 12 Feb 2012 19:58:36 -0500 Subject: how to use net-snmp for monitoring java processes in linux Hi All, I am very new to net-snmp. I have many hosts with each running few java processes. These processes have custom statistics which we want to be reported back to an SNMP server for e.g. EM7. I started off by writing a separate “.mib” for each process and its scalar statistics. Now I have following questions to answer: 1- How do I feed these multiple .mibs( one mib for each process on that host) to snmpd on that host? 2- How does snmpd get configured to respond to a get for an individual statistic for a process?3- How does the process communicate the statistics?(For step 3, in my mind one of the following will be needed: a) i have to write add extra layer in my java processes that interacts with snmpd agent. If so how ? code examples? b) can I write some generic code which can be invoked by my snmpd to read some data repository (a file or db etc.). If so how and how can I integrate it with snmpd? Code examples? c) I have to write sub agents? Do I also have to use AgentPro necessarily to generate java stubs for my mib files ? if so how do I plug them in to snmpd ? I guess I do not have one clear way of implementing a solution. A feasible solution recommendation would really help me get around this. Since I have beenreading information in pieces but so far found no clear example on “how to monitor custom statistics of java processes on ” etc. to explain all the pieces. Your prompt response will really help me in my endeavor and probably I can write that example for the rest of us with your help. -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ 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 -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2___ 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 to use net-snmp for monitoring java processes in linux
Well for that you have to use java bindings . There is a related library netsnmpj that provides java api for net-snmp and it supports agent x protocol . I have not used it but it would be very similar and the fastest way to get it going is to install it and run some examples or debug them , that would help you understand how to extend it so that it answers your queries. Regards From: zain.mi...@hughes.com To: mohwaqa...@hotmail.com; net-snmp-users@lists.sourceforge.net Date: Mon, 13 Feb 2012 07:12:25 -0500 Subject: RE: how to use net-snmp for monitoring java processes in linux Thanks a lot waqas for your prompt reply. Is there a way i could do the same in java? I am sorry i was not very clear about our limitation to only use java. Keeping this in mind, what will be my way to go? Sent from my HTC Touch Pro2 on the Now Network from Sprint®. From: Mohammad Waqas Athar mohwaqa...@hotmail.com Sent: Monday, February 13, 2012 4:52 AM To: Zain Mirza zain.mi...@hughes.com; net-snmp-users@lists.sourceforge.net net-snmp-users@lists.sourceforge.net Subject: RE: how to use net-snmp for monitoring java processes in linux Well it seems like you have not seen any tutorials on net-snmp. First of all you need to create mib files for all the parameters that you want to monitor.Then you have to extend your snmpd agent so that it answers request for your parameters.For this you have to use mib2c to generate code. Follow examples given here http://www.net-snmp.org/docs/man/mib2c.html Then you need to compile your code as sub agent or dynamic loadable object http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object Once that is done you need to configure your snmpd.conf, run your agent and query your parameters. This is just the guideline . Please see net-snmp tutorial for a detailed info You can integrate file reading/writing or database in the code generated by mib2c.For this you need to see the above tutorials.With this your agent will be able to interact with db or file. Regards From: zain.mi...@hughes.com To: net-snmp-users@lists.sourceforge.net Date: Sun, 12 Feb 2012 19:58:36 -0500 Subject: how to use net-snmp for monitoring java processes in linux Hi All, I am very new to net-snmp. I have many hosts with each running few java processes. These processes have custom statistics which we want to be reported back to an SNMP server for e.g. EM7. I started off by writing a separate “.mib” for each process and its scalar statistics. Now I have following questions to answer: 1- How do I feed these multiple .mibs( one mib for each process on that host) to snmpd on that host? 2- How does snmpd get configured to respond to a get for an individual statistic for a process? 3- How does the process communicate the statistics? (For step 3, in my mind one of the following will be needed: a) i have to write add extra layer in my java processes that interacts with snmpd agent. If so how ? code examples? b) can I write some generic code which can be invoked by my snmpd to read some data repository (a file or db etc.). If so how and how can I integrate it with snmpd? Code examples? c) I have to write sub agents? Do I also have to use AgentPro necessarily to generate java stubs for my mib files ? if so how do I plug them in to snmpd ? I guess I do not have one clear way of implementing a solution. A feasible solution recommendation would really help me get around this. Since I have been reading information in pieces but so far found no clear example on “how to monitor custom statistics of java processes on ” etc. to explain all the pieces. Your prompt response will really help me in my endeavor and probably I can write that example for the rest of us with your help. -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ 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 -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow
RE: NET-SNMP duplicate registration: MIB modules
i had the similar problem . i just reinstalled net-snmp and it was solved. It might be because of having 2 snmpd.conf files in different configuration search path. It might solve your problem From: nakhta...@hotmail.com To: net-snmp-users@lists.sourceforge.net Subject: NET-SNMP duplicate registration: MIB modules Date: Sun, 29 Jan 2012 15:53:46 -0800 Hi, I am trying to enable net-snmp and when I run /etc/rc2.d/S98net-snmp start on a Solaris server with the following line in /dvs/tools/net-snmp/share/snmp/snmpd.conf it generates several duplicate warnings as shown below. Will appreciate any help. snmpd.conf: trapsess -v 3 -u securityName -l authNoPriv -a MD5 -A authorization_passphrase snmp_trap_listener_host:port # /etc/rc2.d/S98net-snmp start NET-SNMP version 5.5 duplicate registration: MIB modules mibII/sysDescr and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.1). duplicate registration: MIB modules mibII/sysObjectID and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.2). duplicate registration: MIB modules mibII/sysUpTime and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.3). duplicate registration: MIB modules mibII/sysContact and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.4). duplicate registration: MIB modules mibII/sysName and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.5). duplicate registration: MIB modules mibII/sysLocation and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.6). duplicate registration: MIB modules mibII/sysServices and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.7). duplicate registration: MIB modules mibII/sysORLastChange and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.1.8). ...duplicate registration: MIB modules memSwapError and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.4.100). duplicate registration: MIB modules memSwapErrMsg and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.4.101). duplicate registration: MIB modules ucd-snmp/proc and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.2.1.1). duplicate registration: MIB modules ucd-snmp/proc and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.2.1.2). ... duplicate registration: MIB modules ucd-snmp/versioninfo and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.100.1). duplicate registration: MIB modules ucd-snmp/versioninfo and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.100.2). duplicate registration: MIB modules ucd-snmp/versioninfo and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.100.3). ... duplicate registration: MIB modules dlmod and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.13.14.1). duplicate registration: MIB modules dlmod and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.2021.13.14.2.1.2). ... duplicate registration: MIB modules snmpv3/snmpEngine and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.10.2.1.1). duplicate registration: MIB modules snmpv3/snmpEngine and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.10.2.1.2). duplicate registration: MIB modules snmpv3/snmpEngine and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.10.2.1.3). ...duplicate registration: MIB modules snmpNotifyTable and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.13.1.1.1.2). duplicate registration: MIB modules snmpNotifyTable and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.13.1.1.1.3). ...duplicate registration: MIB modules target/snmpTargetAddrEntry and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.12.1.2.1.2). duplicate registration: MIB modules target/snmpTargetAddrEntry and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.6.3.12.1.2.1.3). ...duplicate registration: MIB modules nsTransactionTable and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.8072.1.8.1). duplicate registration: MIB modules nsModuleTable and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.4.1.8072.1.2.1). duplicate registration: MIB modules host/hr_system and AgentX subagent 6, session 158bb8, subsession 16d1b8 (oid .1.3.6.1.2.1.25.1.1). duplicate
RE: SNMP request
It might be because of some invalid packet request . Use wireshark or tcpdump to verify what kind of snmp packet is received.Verify port number, type of snmp request and requested oid.This might help you a bit. Regards Date: Tue, 27 Dec 2011 13:30:44 +0100 Subject: SNMP request From: mech.lou...@gmail.com To: net-snmp-users@lists.sourceforge.net hi, environment: gcc 4.5 under Ubuntu 11.04 I'm trying to implement a C application that sends an snmp request (snmp get) to retrieve some information (variables) from the local MIB but when executing the program it seems that it is not able to get the response from the snmp agent any ideas? please help me thanks in advance leila -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ 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 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev___ 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
Dynamic snmp agent reconfiguration
Hello users, Is there a way to dynamically reconfigure snmpd settings without restarting it. I mean are there any IOCTL command, C api or signal handler defined to reconfigure agent settings other then editing the snmpd.conf and restarting agent ourself. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ 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: Help needed on implementing snmp table
okay but regarding iterate method . How do we fetch the index from get_first_data_point or get_next_data_point so that we can query the database for the requested index From: dgau...@juniper.net To: mohwaqa...@hotmail.com; net-snmp-users@lists.sourceforge.net Date: Tue, 13 Sep 2011 12:46:15 +0530 Subject: RE: Help needed on implementing snmp table I believe mib2c.iterate.conf should provide this. You might need to disable caching of data. disabling the caching will make snmpd to fetch data from application always -Dheeraj From: Mohammad Waqas Athar [mailto:mohwaqa...@hotmail.com] Sent: Tuesday, September 13, 2011 12:00 PM To: net-snmp-users@lists.sourceforge.net Subject: RE: Help needed on implementing snmp table I have the same configuration . i need to query mysql for every request . i think table raw is the best in this case, but i do not know how to make get next working so ,i am currently using table iterate access somehow.I modified the code that was generated by mib2c but then get next and bulk get do not work . If you find any good implementation for external access please Let me know too Thanks Date: Mon, 12 Sep 2011 18:56:20 -0700 From: karthik_96...@yahoo.com Subject: Help needed on implementing snmp table To: net-snmp-users@lists.sourceforge.netHi All, Could you please suggest me the mib2c config file and the sample implementation for the following case? - snmp Table resides outside of agent - Data in that external table is not static. Hence, this table need to be built dynamically for each snmp request. Thanks, -karthi -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ 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 -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ 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
NETSNMP , Problem in Get Next. column number not incremented
I generated code using mib2c.table_raw.conf . ALL work well except Get Next Request.when i walk table using snmpwalk i get Error: OID not increasing: i looked at the code and it seems the column number does not increase. Do we have to increase the column number ourself? -- 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/___ 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