|
It is currently Thu May 17, 2012 9:31 am
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 7 posts ] |
|
Examples of Reports plugin (interface and a report)
| Author |
Message |
|
casepie
New User
Joined: Wed Feb 01, 2006 11:27 am Posts: 3
|
 Examples of Reports plugin (interface and a report)
Hi guys,
I'm currently using cacti in a production setting (monitoring 145 devices in one network and 154 in another). A customer has recently requested weekly or monthly reports for twenty or so of his backbone links. After my initial confusion, we had a talk and as it turns out, he doesn't like going to the interface and looking up the graphs one at a time. what he wants is more of a numeric summarization. I thought I was making it as easy as I could by providing an online tool that gives them nice easy to read graphs but alas, he finds it "hard".
As near as I can tell, yours is the only integrated "reporting" module I can find for cacti. However, I don't find on the site any examples of what the reporting interface looks like, or what the html emails look like. I think I could appease him by simply pulling the 20 monthly graphs all together in one email (or pdf) but I don't have a good idea of what your module will do, or whether I should begin trying to copy/paste into an Office document of some sort.
Anybody be willing to forward me a copy of a reporting module email and maybe a screenshot of the interface?
russell.casey at gmail.com
|
| Wed Feb 01, 2006 11:40 am |
|
 |
|
psyber
User
Joined: Mon Oct 10, 2005 11:30 pm Posts: 47
|
The interface and options are pretty simplistic, I know there are a few TODOs for this plugin.
Heres some screen scrapes
|
| Wed Feb 01, 2006 11:59 am |
|
 |
|
casepie
New User
Joined: Wed Feb 01, 2006 11:27 am Posts: 3
|
 Thank you Psyber, anyone know of text reporting for rrdtool?
Thank you Psyber, that's pretty inline with what I had expected it to look like from the descriptions I could see here on the site, but I thank you for taking the time to confirm it for me. I believe I'll try this as a first step to meeting their needs.
In the event the customer finds the graphs too "pretty" and not managerial enough, does anyone know of scripts that will parse a group of RRD files and create text bandwidth reports?
--Thanks.
|
| Wed Feb 01, 2006 12:48 pm |
|
 |
|
psyber
User
Joined: Mon Oct 10, 2005 11:30 pm Posts: 47
|
How are you at perl?
I'm actually doing this with our home grown monitoring software at work. I run a cron that does a rrdtool fetch of the last hour of data and compares it to the same period 1 day ago. I then email any delta above a set threshold to alert me that something is either out of whack or has changed significantly. The same idea could be applied to periodicaly email just the numbers on a graph (if your looking for trend data you will have to do the math in your script all fetch spits back is raw data). Might be a reasonable addition to the reports plugin. I'll have a look at my script tonight and see if there is anything I can post up that will translate to caci.
heres the docs on rrdtool fetch
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/doc/rrdfetch.en.html
~p
|
| Wed Feb 01, 2006 1:03 pm |
|
 |
|
casepie
New User
Joined: Wed Feb 01, 2006 11:27 am Posts: 3
|
 Text based reporting
My perl expertise is just about equal with my ability to breathe underwater :-)
I don't get much more advanced than bash scripting when it comes to creating my own tools. (I happen to be the Routing nerd, not much of a programmer) but we have a programmer here who I know could help me modify something.
I'll keep an eye on the thread, if you're able to post something you think is useful, I'd appreciate it, until then I'll go do some reading on fetch.
Thank you.
|
| Wed Feb 01, 2006 1:25 pm |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
The plugin itself is currently getting a nice overhall, more robust scheduler, add more items than just graphs, and PDF support (using PHP not external libraries). I tried converting the other reports (export?) plugin out there, and I didn't like that it was tied to htmldocs and wasn't as functional as I wanted it to be, so I am starting up development on mine again.
One thing that I wanted to add, but wasn't sure of how it would work, was the possibility to add values, where you select the datasource, and click a timeline, and it would spit out the total, or average for that timeline. So for network graphs, you could add the graph, and then have it display the total bandwidth used in that time period. We could take even further and allow the comparisons between timelines (yesterday and today) and show the difference, but that would take abit more work.
In either case, there will be further development on this plugin, but with everything else, it may take awhile.
|
| Wed Feb 01, 2006 4:14 pm |
|
 |
|
psyber
User
Joined: Mon Oct 10, 2005 11:30 pm Posts: 47
|
Heres the pertanent snippits of my script that deal with fetch (mind the line wrap)
It's pretty straight forward
grab old data average it
grab newer data average it
subtract the two and compare the result to a threshold
if outside the threshold toss it into the array that will eventually end up getting passed to mail
Code: foreach $probe(@probes){ my ($delta,$now,$then); my (@then,@now); #sample from past open (RRD, "/usr/local/bin/rrdtool fetch $abs_db_dir/$probe/data.rrd AVERAGE -r $rrdres -s midnight-1470min -e s+1h |") or die "Can't run rrdtool $!\n"; while (<RRD>){ #drop NANs and other garbage if ($_=~/\d+:\s+[0-9.]+e.\d+/){ push (@then,$_); } } close (RRD); if (@then){ $then=&calc_avg(@then); }else{ push (@content, "\nno valid data for $probe please investigate\n"); } #sample from recent open (RRD, "/usr/local/bin/rrdtool fetch $abs_db_dir/$probe/data.rrd AVERAGE -r $rrdres -s midnight-30 -e s+1h |") or die "Can't run rrdtool $!\n"; while (<RRD>){ #drop NANs and other garbage if ($_=~/\d+:\s+[0-9.]+e.\d+/){ push (@now,$_); } } if (@now){ $now=&calc_avg(@now); }else{ push (@content, "\nno valid data for $probe please investigate\n"); } $delta=$now-$then; if (abs($delta) > $threshold){ push (@content,"\n$probe\nthreshold(+/-) $threshold\n-------------------\nyesterday = $then\ntoday = $now\nchange = $delta\n\n"); } }
sub calc_avg{ my @list=@_; my ($avg,$sum)=0; foreach (@list){ if ($_=~/(\d+):\s+([0-9.]+)e(.\d+)/){ my $num=$2; my $exp =$3; $sum += ($num*10**$exp); } } $avg = $sum/@list; return $avg; }
|
| Wed Feb 01, 2006 5:55 pm |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|