Re: can't get linkUpDownNotifications working

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Mon, 2006-03-13 at 13:38 +0100, H. McManus wrote:
> mteEventNotification looks like:

> mteEventNotification."_snmpd".'_linkDown' = OID: linkDown
> mteEventNotification."_snmpd".'_linkUp'   = OID: linkUp
    (etc, etc).


> 2006-03-13 09:30:38 disman:event:fire: disman:event:fire:
>                     Event fired (snmpd.conf, _linkUp)
> 2006-03-13 09:30:38 Event fired (snmpd.conf, _linkUp)
> 2006-03-13 09:30:38 disman:event:fire: disman:event:fire:
>                     No matching event
> 2006-03-13 09:30:38 No matching event
> 2006-03-13 09:30:38 disman:event:trigger:monitor: 
>                     disman:event:trigger:monitor:
>                     Running trigger (linkDown)
> 2006-03-13 09:30:38 Running trigger (linkDown)


OK - I think I've spotted the problem.
The mteEventTable (and mteEventNotificationTable) have
been set up with the internal owner string "_snmpd",
but the trigger that's being fired is using the owner
string "snmpd.conf".

Ummm...  Can you try the following patch, and see if it
helps at all.

Dave
trigger.patch (text/x-patch, 1.1 KB)
--- mteTriggerConf.c.cln	2006-03-13 14:33:53.171599000 +0000
+++ mteTriggerConf.c	2006-03-13 14:35:04.149271000 +0000
@@ -663,10 +663,16 @@
              */
             if ( ename[0] ) {
                 memset(entry->mteTThDRiseOwner,  0,     MTE_STR1_LEN+1);
-                memcpy(entry->mteTThDRiseOwner,  "snmpd.conf",      10);
+                if ( ename[0] == '_' )
+                    memcpy(entry->mteTThDRiseOwner,  "_snmpd",       6);
+                else
+                    memcpy(entry->mteTThDRiseOwner,  "snmpd.conf",  10);
                 memcpy(entry->mteTThDRiseEvent,  ename, MTE_STR1_LEN+1);
                 memset(entry->mteTThDFallOwner,  0,     MTE_STR1_LEN+1);
-                memcpy(entry->mteTThDFallOwner,  "snmpd.conf",      10);
+                if ( ename[0] == '_' )
+                    memcpy(entry->mteTThDRiseOwner,  "_snmpd",       6);
+                else
+                    memcpy(entry->mteTThDFallOwner,  "snmpd.conf",  10);
                 memcpy(entry->mteTThDFallEvent,  ename, MTE_STR1_LEN+1);
             } else {
                 memset(entry->mteTThDRiseOwner,  0,     MTE_STR1_LEN+1);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.