Tail Log and Grep for XYZ show on SNMP

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
LuisN
Posts: 40
Joined: Thu May 24, 2012 10:47 am

Tail Log and Grep for XYZ show on SNMP

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Tail Log and Grep for XYZ show on SNMP

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
LuisN
Posts: 40
Joined: Thu May 24, 2012 10:47 am

Re: Tail Log and Grep for XYZ show on SNMP

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Tail Log and Grep for XYZ show on SNMP

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
LuisN
Posts: 40
Joined: Thu May 24, 2012 10:47 am

Re: Tail Log and Grep for XYZ show on SNMP

Post 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?
LuisN
Posts: 40
Joined: Thu May 24, 2012 10:47 am

Re: Tail Log and Grep for XYZ show on SNMP

Post by LuisN »

ah like using extend + yum to check security updates
LuisN
Posts: 40
Joined: Thu May 24, 2012 10:47 am

Re: Tail Log and Grep for XYZ show on SNMP

Post by LuisN »

Something like this

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

BUT i have no clue where to even start with that script.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Tail Log and Grep for XYZ show on SNMP

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked