[smokeping-users] Trying to modify the smokeping web interface

Alessandro Palermo ok.aless at gmail.com
Thu Jan 23 17:30:53 CET 2014

Hi list.

I was working on a bash script to save the change of routes on smokeping
Target devices.
The script is quite simple, It's read the Target file and get the IP
address and the check if the device is reachable, if so, then it's make and
mtr and store the route in a database (mysql)
This script runs on cron each 5 minutes.
Also I wrote a php web that recives an IP address as a parameter and show
the changes of  routes for these IP.
I want to add this php web as a link in the title of the detailed graphs.
So I edited the Target file and add in the title variable something like

menu = Some place
title= Some place <a
host= <#>

This works so so, because the links appear ok in the detailed graphs as a
title (html title) but in the main view of the smokeping the graphs
generated by rrdtool show as a title this:

Some place <a href=/ruteo/search.php?ip=></a>

And so the graph It's look no good.

Then I edit the Smokeping.pm and this block of code
   my ($graphret,$xs,$ys) = RRDs::graph
    #       '--lazy',
           '--vertical-label', $ProbeUnit,
        my $ERROR = RRDs::error();
        $page .= "<div>";


I've changed the line             '--title',$phys_tree->{title},
for this line            '--title',$phys_tree->{mytitle},

With this change It's work so so, because in the rrdtool main graph It's
appear no title.
Trying to solve this, in the file Targets I've add a new variable defined
on this way

menu = Some place
title= Some place <a
mytitle= Some place
host= <https://mail.google.com/mail/u/0/#>

But with this change when I restart smokeping  I've an error. Unknown
variable mytitle.

Any ideas?

Thanks in advance and sorry for my english :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20140123/a74e4bde/attachment.html 

More information about the smokeping-users mailing list