LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-05-2013, 04:14 PM   #1
forrie
Member
 
Registered: Sep 2003
Distribution: RedHat
Posts: 41

Rep: Reputation: 15
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.
 
Old 08-05-2013, 11:50 PM   #2
sharadchhetri
Member
 
Registered: Aug 2008
Location: INDIA
Distribution: Redhat,Debian,Suse,Windows
Posts: 179

Rep: Reputation: 23
Quote:
Originally Posted by forrie View Post
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.
 
Old 08-06-2013, 04:37 PM   #3
forrie
Member
 
Registered: Sep 2003
Distribution: RedHat
Posts: 41

Original Poster
Rep: Reputation: 15
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.
 
Old 08-06-2013, 05:04 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios reports host as down, services as OK eblonk Linux - Software 9 06-27-2013 03:41 PM
Nagios daily Reports ravikiran189 Linux - Server 1 01-11-2012 02:07 AM
not getting graphs in nagios vivek123 Linux - Newbie 4 10-19-2010 01:39 AM
Nagios Reporting ang Graphs yashgoley Linux - General 4 07-26-2010 06:35 AM
squid log graphs btaylor1988 Linux - Server 2 06-10-2008 05:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration