You can also use the above method to monitor log files by using the following 
snmpd.conf lines: 


Code:
monitor -u userX -r 1 -D -o logMatchGlobalCounter -o logMatchFilename -o 
logMatchName "log match" logMatchGlobalCounter != 0

logmatch "xyzErrorTest" /var/tmp/test.log 1 ERROR xyz



And then changing the mapping rule a little... "ERROR xyz" is the regex to 
match. I've been meaning to write a howto for this but haven't got around to it.

NOTE: snmp has a fixed limit of 50 logmatch entries, although you can change 
this in the code and recompile (it's just 1 variable in 
[$net-snmp-src]/agent/mibgroup/ucd-snmp/logmatch.c) - however you may want to 
do some stress testing if you do this to monitor net-snmp's cpu usage!




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=22234#22234

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to