Mallikharjun Lanke | 28 Aug 11:16 2015

How to configure net-snmp for mysql logging to log received traps

Hi

How to configure net-snmp for mysql logging to log received traps

my snmptrapd.conf

###########################
# maximum number of traps to queue before forced flush
# set to 1 to immediately write to the database
sqlMaxQueue 140

# seconds between periodic queue flushes
sqlSaveInterval 9

i loaded database schema from <dist/schema-snmptrapd.sql

can you guide me through this setup.

thanks
Best Regards
Mallik
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
raja vankam | 28 Aug 20:51 2015
Picon

Re: Unable to send SNMP V3 Informs to multiple destinations

Hi,

Do anybody have any input on this behavior.

I have configured two inform destinations but not started one of the destinations trap receiver or removed the network cable from the server PC. At that time if I start the agent on the Linux target then the agent is not doing anything. Agent is waiting for the second destination to be available until then I am not receiving cold start trap at either of the destinations. If I restore the communication to another destination then agent starts functional, I see debug message Net-Snmp 5.7.3 and then cold start is sent to both destinations. 

Is there any way to make the agent functional with one trap receiver and try for the other trap receiver until it is available.

Appreciate your help.

Thanks.
Raj.

On Mon, Aug 3, 2015 at 2:30 PM, raja vankam <raja.vankam <at> gmail.com> wrote:
Hi Robert,

Thanks for your reply and sorry for the delayed response.

I had an error on my side due to which I was not interpreting the informs at the other end. Now I could test SNMP V3 informs with the same or multiple users to different destinations.

However I am seeing a behavior which I would like to know whether it is normal with V3?

I have configured two inform destinations but not started one of the destinations trap receiver or made the network to go down, at that time if I start the agent then agent is not functional. Agent is waiting for the second destination to be available until then I am not receiving cold start trap at either of the destinations. I see debug message Net-Snmp 5.7.3 comes only after all the destinations are available and takes few seconds after the above message to send the inform. From then onwards I am able to receive all the subsequent informs and acknowledgements.

Appreciate your help.

Thanks.

Raja.

On Fri, Jul 17, 2015 at 2:56 PM, Robert Story <rstory <at> freesnmp.com> wrote:
On Wed, 8 Jul 2015 17:03:09 -0500 raja wrote:
RV> If I try to send Informs to more than one destination with the
RV> same user or different user then just cold start trap is being
RV> delivered to all destinations but subsequent Informs are
RV> delivered to only the first destination in the snmpd.conf.

Hi Raja,

Something is definitely wrong. You should be able to send multiple
informs to different destinations. Try adding some debg tokens to
your snmpd command line: "-D trap,send,transport:send" to see
what's happening.

Robert


------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Ryan Holliday | 27 Aug 22:46 2015

Logging with embedded Perl

Hi all,

I have an embedded PERL module that I am writing for a custom MIB. When we start the demon we use the options '-LS0-4d -Lf /dev/null' and expect all the log files to get dumped to /dev/null. This seems to work under normal operations, but when I add 'perl do /path/to/pl' to my snmpd.conf file it appears to override those settings. I'm seeing log message appear on the console instead of going to /dev/null and I'm also getting "Connection from UDP:" messages which I anticipated being removed due to the 0-4d option that it's passed. 

Why would net-snmp treat logging differently if I have an embedded PERL agent?

This is for snmpd 5.5 running on RHEL6.3.

Thanks,
-Ryan Holliday
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Gaurav Dalvi | 21 Aug 00:26 2015
Picon

Regarding net-snmp Can't load '/usr/local/lib64/perl5/auto/NetSNMP/default_store/default_store.so'

Hello All,


Here is the problem:
I have production machine which centos 5.8. On which this perl application runs fine.
I am trying to create Sand Box machine to run this perl application on my 
Red Hat Enterprise Linux Server release 7.1 (Maipo).

When I ran the tool I get this error :

[root <at> gdalvi-vm bin]# sudo perl macDetection -d -n -p IX -x csw1.sv1
Can't load '/usr/local/lib64/perl5/auto/NetSNMP/default_store/default_store.so' for module NetSNMP::default_store: libnetsnmp.so.30: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.
 at /usr/local/lib64/perl5/SNMP.pm line 19.
Compilation failed in require at /usr/local/lib64/perl5/SNMP.pm line 19.
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/SNMP.pm line 19.
Compilation failed in require at /usr/local/eqix/nettools/lib/Equinix/DeviceBase.pm line 13.
BEGIN failed--compilation aborted at /usr/local/eqix/nettools/lib/Equinix/DeviceBase.pm line 13.
Compilation failed in require at macDetection line 62.
BEGIN failed--compilation aborted at macDetection line 62.

Could you please let me know how to resolve this error. I have installed net-snmp and all nexessary packages using CPAN and yum.
 
Gaurav Dalvi
about.me/gaurav_dalvi
 
 
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Sergiy Michka | 18 Aug 10:19 2015
Picon

net-snmp versions mess

Hello,

simple question but from sf.net site:

Latest by date is:  5.4.5-pre-releases (2015)
Latest by version according to sf site is is 5.6.1.1.1
Latest by binaries under project files is 5.7.0.1 but its from 2011.
Latest by source is 5.7.3 from 2014, still 5.4.5-pre-release seems to have more recent changes/updates/etc from 2015.

So what is the actual latest stable release? And why lower versions seem to be more recent?

Thanks,
Sergiy
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dinesh M | 26 Aug 12:05 2015

SNMP Queue issue

Hi Team,

 

We have installed SNMP version "net-snmp.x86_64  1:5.5-54.el6_7.1" on CentOs and currently configured our SIEM to send traps via SNMP. We are facing issues with SNMP and here is the brief description of the issue we are going through:


When we start snmptrapd daemon with "-Otn" or "-Ot" or "-On" switches, every trap after first one is staying in receive queue and can be confirmed by issuing following command


netstat -panu | grep 162


But when we remote all of "-O" options from snmptrapd startup scripts everything is working fine, but we are loosing format that is critical for our follow up script to work.


Hence when we start snmptrapd with following options 


OPTIONS="-COtn -Lf /var/log/snmptrapd.log -c /etc/snmp/snmptrapd.conf -p /var/run/snmptrapd.pid"                    


the requests are getting queued except for the first one post service restart which goes through fine, and when we start same with following options.. it works fine. but we loose critical functionality, which is not acceptable.


OPTIONS="-C -Lf /var/log/snmptrapd.log -c /etc/snmp/snmptrapd.conf -p /var/run/snmptrapd.pid"                    


Any help in getting this issue resolved, is much appreciated.


Thanks in advance,


Regards

Dinesh



------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Mostafa Salari | 25 Aug 16:59 2015
Picon

how can I handle a Counter32 MIB?

Hello,
In a subagent, when I want to update the value of an (for example) INTEGER mib, I use the following line in Netsnmp_Node_Handler * myhandler(...):
          snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER, v->value, sizeof(long));

HOW can I update the value of a Counter32 mib? In other word: what should I put instead of ASN_INTEGER?

I cant find the appropriate definition in "asn.h"
Thanks,
Mostafa
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Kuroishi Mitsuo | 25 Aug 03:58 2015
Picon

IF-MIB::ifPhysAddress bug


Hi, I'm Mitsuo.

I found a problem that causes net-snmp to respond
IF-MIB::ifPhysAddress with wrong value.

More specifically 1st octet of MAC addres(00:xx:xx:xx:xx:xx)
bacomes always 00.

My environment is NetBSD 3 on Virtualbox.
Though I use the net-snmp 5.6.1.1 on it, as far as I take a look
the latest one it seems to have a same problem.

A patch for fixing this is below.

|
|struct sockaddr_dl {
|       u_char      sdl_len;    /* Total length of sockaddr */
|       sa_family_t sdl_family; /* AF_LINK */
|       u_int16_t   sdl_index;  /* if != 0, system given index for interface */
|       u_char      sdl_type;   /* interface type */
|       u_char      sdl_nlen;   /* interface name length, no trailing 0 reqd. */
|       u_char      sdl_alen;   /* link level address length */
|       u_char      sdl_slen;   /* link layer selector length */
|       char        sdl_data[24]; /* minimum work area, can be larger;
|                                    contains both if name and ll address */
|};
|

The sdl_data contains both if name and ll address so filling \0
isn't right.

Regards,

--
Kuroishi Mitsuo

Index: agent/mibgroup/if-mib/data_access/interface_sysctl.c
===================================================================
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c
 <at>  <at>  -325,7 +325,7  <at>  <at> 
     struct sockaddr *a;
     struct sockaddr_dl *adl;
     int amask;
-    char *if_name;
+    char if_name[64];
     int flags;

     DEBUGMSGTL(("access:interface:container:sysctl",
 <at>  <at>  -363,7 +363,6  <at>  <at> 
     for (cp = if_list; cp < if_list + if_list_size; cp += ifp->ifm_msglen) {

         ifp = (struct if_msghdr *) cp;
-        if_name = NULL;
         flags = 0;
         adl = NULL;

 <at>  <at>  -386,8 +385,13  <at>  <at> 
                 }
             }
             adl = (struct sockaddr_dl *) a;
-            if_name = (char *) adl->sdl_data;
-            if_name[adl->sdl_nlen] = '\0';
+
+	    if (sizeof(if_name) < adl->sdl_nlen + 1) {
+                snmp_log(LOG_ERR, "no space for interface name"
+                                   "(sdl_nlen: %lu bytes)\n", adl->sdl_nlen);
+                return -3;
+	    }
+            snprintf(if_name, adl->sdl_nlen + 1, "%s", adl->sdl_data);
         }
         if (!(ifp->ifm_addrs & RTA_IFP) || if_name == NULL) {
             snmp_log(LOG_ERR, "ifm_index %u: no interface name
                 in message, "

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Sergei Dubrov | 24 Aug 18:13 2015
Picon
Picon

enterprises.ucdavis.dskTable broken in SLC6.7

G'day all!

After upgrading from SLC6.6 to SLC6.7 we got broken one subtree in OID-tree enterprises.ucdavis.dskTable (.1.3.6.1.4.1.2021.9):

[root <at> hostSLC6.7 ~]# snmpwalk -m all -v 2c -c public localhost .1.3.6.1.4.1.2021.9
UCD-SNMP-MIB::dskTable = No Such Object available on this agent at this OID
...

[root <at> hostSLC6.6 ~]# snmpwalk -m all -v 2c -c public localhost .1.3.6.1.4.1.2021.9
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskIndex.2 = INTEGER: 2
...
UCD-SNMP-MIB::dskErrorMsg.1 = STRING:
UCD-SNMP-MIB::dskErrorMsg.2 = STRING:
...

[root <at> hostSLC6.7 ~]# cat /etc/redhat-release
Scientific Linux CERN SLC release 6.7 (Carbon) (2.6.32-573.3.1.el6.x86_64)

[root <at> hostSLC6.6 ~]# cat /etc/redhat-release
Scientific Linux CERN SLC release 6.6 (Carbon) (2.6.32-504.30.3.el6.x86_64)
...

Other subtrees - e.g., .4, .11 from the enterprises.ucdavis - works perfectly. Does not work only .9 subtree. SNMP config absolutely the same in SLC6.6 and in SLC6.7.

After some investigations we found:


       | net-snmp-5.5-50.el6_6.1.x86_64 | net-snmp-5.5-54.el6_7.1.x86_64 |
-------+--------------------------------+--------------------------------+
SLC6.6 | ucdavis.dskTable WORKS         |   ucdavis.dskTable WORKS       |
-------+--------------------------------+--------------------------------+
SLC6.7 | ucdavis.dskTable WORKS         |   ucdavis.dskTable NOT WORKING |
-------+--------------------------------+--------------------------------+


I.e., does not works latest SLC6x with latest net-snmp 5.5.


---
Sergei DUBROV
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Mostafa Salari | 23 Aug 09:02 2015
Picon

a question aboat: Mibs structure

Hello 
When I execute [snmpwalk -c public -v1 localhost -On] in my Ubuntu shell (on vm ware) I see an OID such as:
.1.3.6.1.2.1.28.0 which has a Counter32 value and is translated to: SNMPv2-MIB::snmpOutGetResponses.0

here: { http://www.oid-info.com/cgi-bin/ } wa can search an OID and view the description.
So, I can search 1.3.6.1.2.1.28 and view the result, but 1.3.6.1.2.1.28.0 gets no result.
I want to ask you: What is the meaning of ".0" at the tail of the OID?
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Sanjay Singh | 20 Aug 16:21 2015
Picon

SNMPv3 and Extension Agent

Hi All,


We currently have a Windows Extension Agent Dll which uses the Windows SNMP service. It all work in SNMP version 1.

We need to migrate to SNMP v3 now. As Window SNMP Service doesn't support Version 3, I am planning to use Net-SNMP.


My need some help:


1. Will Net-SNMP(version 3) be able to work with our Extension Agent as is? or Extension Agent will also require some changes as was running with version1 previously?

2. Where can I find the Latest 64 bit installer for windows for Net-SNMP?

3. Any guide or pointer on configuring Net-SNMP for version 3 on windows?


Any help will be much appreciated as this is my first exposure to Net-SNMP.


Thanks,

Sanjay Singh

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Gmane