Page 1 of 1

Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 10:46 am
by LuisN
Hey Guys,

Whats the best way to tail a log, look for something specific all the time and send it to SNMP OR have it as an alert?

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 11:46 am
by abrist
Start with the nagios exchange. There are a number of log related plugins for string checking, regex matching etc:
http://exchange.nagios.org/index.php?op ... =check_log

Reporting through snmp might require a custom solution.

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 3:34 pm
by LuisN
Well the thing is the logs are on a remote server, and i want to tail it real time. i would need to have this custom tail log program / snmp run on that server and display via snmp

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 3:44 pm
by sreinhardt
If you can, nsca would likely be a good option for this. Otherwise I think this is a bit out of scope for what we would handle as you'd likely be looking at a very specific snmp server.

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 4:34 pm
by LuisN
well the reason i ask is b/c of for example the check_yum right? It checks the yum updates and checks for security updates and warns via snmp to a service created in nagios.

so how could i do the same for something i want to tail in a log? no?

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Fri May 03, 2013 4:57 pm
by LuisN
ah like using extend + yum to check security updates

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Sat May 04, 2013 9:09 am
by LuisN
Something like this

http://community.zenoss.org/docs/DOC-2477

BUT i have no clue where to even start with that script.

Re: Tail Log and Grep for XYZ show on SNMP

Posted: Sat May 04, 2013 1:55 pm
by scottwilkerson
We had a speaker, Robert Bolton, at last years conference go over this very topic, you can see his presentation slides and additional files here
http://www.nagios.com/events/nagiosworl ... sentations
Look for
"Custom SNMP OID Creation for System Monitoring"

Also the first 10 minutes are on youtube
http://www.youtube.com/watch?v=1JeI9kM5RgA