[SOLVED???] Automatically send traps by proc/exec/ without

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello all,

that's a little embarrassingly...

For testing the disman-event I have configured "portmap" 
to monitor this daemon, but I never start portmap...
The prError flag was set to "1" permanently.

Then I start snmpd and got the trap before the "coldStart" trap was
received.
I never start portmap again (I don't need this daemon, only for
testing:)), so I get the trap at starttime...

The disman-event fires only ONE Trap (I don't know about this matter)
and after the second interval frequency there wouldn't fired any
trap...

I've accepted, that the trap was fired every frequency interval;((((

Snmpd with disman-event seems to work!!!!

Thanks to Dave and Thomas!


Greetings 

Andre


Am 09.01.2006 um 16:21 Uhr haben Sie geschrieben:

> Hi Dave,
> 
> Am 06.01.2006 um 12:10 Uhr haben Sie geschrieben:
> > > When I use this row in my snmpd.conf, I got the segfault after 
> > > a few minutes.
> > > 
> > > monitor -u pl-combots -o sysUpTime.0 -o hrSWRunName \
> > > "high process Memory" hrSWRunPerfMem > 10
> > 
> > Have you created a user "pl-combots" ?
> 
> Oh no, I don't create any user;(
> 
> I use the net-snmp-config command:
> 
> net-snmp-config --create-snmpv3-user -ro -a pl-combots pl-combots
> 
> After calling net-snmp-config, I see in
> /var/lib/net-snmp/snmpd.conf
> the new directive:
> 
> createUser pl-combots MD5 "pl-combots" DES
> 
> In /usr/share/snmp/snmpd.conf, there is a "rouser pl-combots
> defined, but I need this directive in /root/perl/snmpd.conf too.
> 
> > The iquery callback mechanism only works with SNMPv3
> > requests.  It's known not to work with community-based
> > callbacks.	Now there's nothing in your config to
> > indicate that you've set up SNMPv1 or SNMPv2c-style
> > callbacks, but it's a little suspicious that the
> > community strings mentioned here match the SNMPv3
> > user that you specified above.
> 
> A callback is needed for automatically send
> traps(disman/event-mib)?
> 
> 
> > > # DISMAN/event.mib
> > > agentSecName public
> > > iquerySecName public
> > 
> > You do *NOT* need both of these lines.
> > They do exactly the same job - just choose one
> > of them, and delete the other.   (That duplication
> > shouldn't cause the agent to crash, but it's a
> > possible source of confusion, if nothing else).
> > I'd suggest that you try simplifying your config
> > as much as possible.   Try getting rid of all the
> > DisMan-related stuff (including both *SecName entries
> > defaultMonitors and linkUpDownNotifications), and
> > work with *just* the following:
> > 
> >	 rouser  pl-combots
> >	 monitor -u pl-combots "high process Memory" 
> > hrSWRunPerfMem 10
> 
> >	 trap2sink  10.17.1.124
> > (plus the "createUser pl-combots" line)
> 
> Ok, I have create the user an removing some directives from
> my conf:
> 
> 
> <snmpd.conf>
> # need for snmpwalk, etc
> rocommunity pl-combots
> 
> # Need for sending traps to snmptrapd
> trapcommunity pl-combots
> 
> proc xinetd 1 1
> proc smbd 30 1
> proc portmap 1 1
> 
> # User with net-snmp-config created, in 
> # /var/lib/net-snmp/snmpd.conf
> rouser pl-combots
> 
> monitor -u pl-combots -r 120 -o prNames -o prErrMessage "process
> table" prErrorFlag != 0
> 
> trap2sink 10.17.1.124
> </snmpd.conf>
> 
> I start snmptrapd:
> 
> snmptrapd -c /etc/snmptrapd.conf -m ALL -Lo -f
> 
> <snmptrapd.conf>
> authCommunity log,execute,net pl-combots
> traphandle default /root/perl/inform_handler.pl terminate
> </snmptrapd.conf>
> 
> I start the snmpd:
> 
> snmpd -Ddisman:event -m ALL -c /root/perl/snmpd.conf -f -Lf
> ./snmpd.log 10.17.1.124
> 
> When the daemon was startet, I can see some traps in my
> snmptrapd.log and I see some disman:event debug messages
> like "disman:event:fire: Firing notification event".
> 
> After 2 minutes (monitor -r 120), I can't see any traps incoming!!!
> 
> In the snmpd.log I can the, that snmpd try the monitor:
> 
> disman:event:trigger:monitor: Running trigger (process table)
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (1 != 0) 1
> 
> But there is nothing fired;(
> 
> 
> After starting the snmpd, I get this output:
> 
> <debug>
> disman:event:init: init trigger container
> disman:event:init: create trigger container (5d3dc0)
> disman:event:init: init trigger container
> disman:event:init: Trigger Table
> disman:event:init: init trigger container
> disman:event:init: Trigger Delta Table
> disman:event:init: init trigger container
> disman:event:init: Trigger Exist Table
> disman:event:init: init trigger container
> disman:event:init: Trigger Bool Table
> disman:event:init: init trigger container
> disman:event:init: Trigger Threshold Table
> disman:event:init: init trigger container
> disman:event:init: init event container
> disman:event:init: create event container (5d9d50)
> disman:event:table: Create event entry (_snmpd, _mteTriggerFired)
> disman:event:table: Event entry created
> disman:event:table: Create event entry (_snmpd, _mteTriggerRising)
> disman:event:table: Event entry created
> disman:event:table: Create event entry (_snmpd, _mteTriggerFalling)
> disman:event:table: Event entry created
> disman:event:table: Create event entry (_snmpd, _mteTriggerFailure)
> disman:event:table: Event entry created
> disman:event:table: Create event entry (_snmpd, _linkDown)
> disman:event:table: Event entry created
> disman:event:table: Create event entry (_snmpd, _linkUp)
> disman:event:table: Event entry created
> disman:event:init: init event container
> disman:event:init: Event Table container (5d9d50)
> disman:event:init: init event container
> disman:event:init: Event Set Table container (5d9d50)
> disman:event:init: init event container
> disman:event:init: Event Notify Table container (5d9d50)
> disman:event:init: init event container
> disman:event:conf: Parsing disman monitor config (-u pl-combots -r
> 60
> -o prNames -o prErrMessage "process table" prErrorFlag != 0)
> disman:event:conf: _Bprocess table: Bool (prErrorFlag, 1, 0)
> disman:event:table: Create trigger entry (snmpd.conf, process
> table)
> disman:event:table: Trigger entry created
> disman:event:trigger:monitor: Running trigger (process table)
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (1 != 0) 1
> disman:event:trigger:fire: Firing boolean test:
> UCD-SNMP-MIB::prErrorFlag.3 (startup)
> disman:event:fire: Event fired (_snmpd, _mteTriggerFired)
> disman:event:fire: Firing notification event
> disman:event:fire: Adding event objects (first)
> disman:event:fire: Adding trigger objects (general)
> disman:event:fire: Adding trigger objects (specific)
> disman:event:objects: Objects add (snmpd.conf, _Bprocess table)
> disman:event:fire: Adding event objects (internal)
> disman:event:conf: Storing mteTriggerTable config:
> disman:event:conf:   done.
> disman:event:conf: Storing mteEventTable config:
> disman:event:conf:   done.
> disman:event:conf: Storing mteObjectTable config:
> disman:event:conf:   done.
> NET-SNMP version 5.3
> NET-SNMP version 5.3
> disman:event:trigger:monitor: Running trigger (process table)
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (0 != 0) 0
> disman:event:delta: Bool comparison: (1 != 0) 1
> </debug>
> 
> On my Laptop, I have SuSE 10 Prof. with net-snmp-5.2.2
> installed(rpm
> based).
> There was fired traps after 2 Minutes (-r 120) and
> without creating any user.
> 
> I have test net-snmp-5.3rc2 on my Gentoo Desktop, the same Problem,
> none traps fired after starting the snmpd;(
> 
> 
> Where is my mistake?
> 
> 
> Many greetings && thanks
> 
> Andre
> Mit freundlichen Grüssen
> 
> Andre Heine
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems?  Stop!	Download the new AJAX search engine that
> makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk
> _______________________________________________
> 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

Mit freundlichen Grüssen

Andre Heine



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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
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.