LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Reports/graphs from Nagios raw log files (https://www.linuxquestions.org/questions/linux-server-73/reports-graphs-from-nagios-raw-log-files-4175472237/)

forrie 08-05-2013 04:14 PM

Reports/graphs from Nagios raw log files
 
I have the need to assemble a report and graph from a series of existing Nagios logs that cover a month or so.

Preferably, assemble some RRD graph that shows the outages and times.

I realize there are utilities to have Nagios log to MySQL etc., but that won't really help me right now. I need to parse the logs and get the information settled.

I looked around the net, don't see much out there - but I wonder if anyone here might know of a few tricks I could use to accomplish what I need. There are specific hosts I need to report.

Thanks.

sharadchhetri 08-05-2013 11:50 PM

Quote:

Originally Posted by forrie (Post 5003618)
I have the need to assemble a report and graph from a series of existing Nagios logs that cover a month or so.

Preferably, assemble some RRD graph that shows the outages and times.

I realize there are utilities to have Nagios log to MySQL etc., but that won't really help me right now. I need to parse the logs and get the information settled.

I looked around the net, don't see much out there - but I wonder if anyone here might know of a few tricks I could use to accomplish what I need. There are specific hosts I need to report.

Thanks.

You can try with gnu plot but you have to write script.

forrie 08-06-2013 04:37 PM

I figured out out to script out the data I need from the logs. Basically, the timestamp and RTA value.

Right now, I'm trying to figure out how to correctly input these into rrd with rrdtool:

rrdtool create rtatrack.rrd --start 946684800 --step 600 DS:time:GAUGE:600:U:U DS:rta:GAUGE:600:1:999 RRA:MIN:0.5:1:999 RRA:MAX:0.5:1:999 RRA:AVERAGE:0.5:1:
999

I'm not sure that's accurate. The values I have in a large file (over 3,000 entries) are in the form of:

epoch:value

where it could be

1326233071:22.64

which RRDTOOl complains about in terms of

ERROR: ./rtatrack.rrd: expected 2 data source readings (got 2) from 1308663854

so clearly I'm not doing something correctly.

I have a ton of logs that need to be calculated with these figures. It's just not something I've done before.

So I have a script created to parse through the many entries and perform "rrdtool update" to catch up with the data.

Habitual 08-06-2013 05:04 PM

check out one or all of these:
http://www.vandenbogaerdt.nl/rrdtool.../rrdcreate.php
http://www.cuddletech.com/articles/rrd/index.html
http://www.generationip.com/document...owto-version-1


All times are GMT -5. The time now is 08:13 PM.