> > 
> > What about the "agentSecUser" or "iqueryUser" line?
> > Have you configured which user to run internal queries as
> > (and given that user sufficient access) ?
> 
> I had not as it wasn't apparent to me from the man page what exactly was 
> required for this to work. I have since added a user, but still see no
> indication it's running from the script itself or doing a truss on the 
> snmpd process. Here's what I have now. I am not getting any authentication
> failures sent out, so what else might be missing? Thanks.
> 
> createUser testuser
> agentSecName testuser
> rouser testuser noauth
> monitor -u testuser -r 1 -o nsExtendOutput1Line.\"failure\" "Failure Check" 
> nsExtendResult.\"failure\" != 0

Some more playing around with this has gotten me to the point where
snmpd will run the scripts, but it appears to be completely random
which extend script it runs and I cannot pinpoint a pattern. If and
only if the extend script in the monitor directive is the only extend
script I have defined will it run that one. Otherwise, it runs any of
the other ones I have defined at the frequency set. 

So I have two extend scripts defined and wish to monitor one.

extend test2 /tmp/test2
extend test1 /tmp/test1
monitor -r 5 -o nsExtendOutput1Line.\"test1\" "Failure Check" nsExtendResult.\"t
est1\" != 0

Here's the two scripts.

# cat /tmp/test1
#!/bin/sh
echo $$ > /tmp/test1.pid
echo "Test1 - CRITICAL"
exit 2

# cat /tmp/test2
#!/bin/sh
echo $$ > /tmp/test2.pid
echo "Test2 - CRITICAL"
exit 2

Here's some truss output showing it's running test2, not test 1.

fork()                                          = 26554
close(12)                                       = 0
close(15)                                       = 0
close(13)                                       = 0
poll(0xFFBE0A38, 1, 1000)                       = 1
read(14, " T e s t 2   -   C R I T".., 102399)  = 17
poll(0xFFBE0A38, 1, 1000)                       = 1
read(14, 0xFFBE5CE1, 102382)                    = 0

And the output file for test2 is being written to.

# ls -l /tmp/test?.pid
-rw-r--r--   1 root     other          6 Feb 26 11:09 /tmp/test1.pid
-rw-r--r--   1 root     other          6 Feb 26 11:12 /tmp/test2.pid

Any thoughts?

-- 
- Kyle 
---------------------------------------------
[EMAIL PROTECTED]   http://www.panix.com/~kylet    
---------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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

Reply via email to