Is there a way to obtain custom metrics from a log file and out put it into a graph in Nagios?
-Doron
Taking Metrics from Log files
Re: Taking Metrics from Log files
This would probably require a custom plugin script as most of the check_log type of plugins just check for a string match. What type of metrics are you looking for? (number of times a line appears, a specific value on a recurring line, etc)
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.
"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.
Re: Taking Metrics from Log files
I am taking in data from every line and putting the number that is in each line into a Nagios graph. I am trying to see if we can use Nagios to replace one of our applications that has a sub par interface.
-Doron
-Doron
Re: Taking Metrics from Log files
Nagios can definitely do this, though it would have to be a custom script. Do you want to re-parse the whole log everytime (create an aggregate or average) for your value, or just the newest line? Can you afford to miss some lines here and there? (in between scheduled checks)
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.
"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.
Re: Taking Metrics from Log files
Is there a script or plugin that you could recommend that I could use a reference?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Taking Metrics from Log files
There are quite a large number of log file checking and parsing plugins located here:
http://exchange.nagios.org/index.php?op ... log%20file
http://exchange.nagios.org/index.php?op ... log%20file