[smokeping-users] Generate graph (rrdtool-graph) from script

boesemar . boesemar at gmail.com
Thu Sep 8 19:01:13 CEST 2016


Hi,

we are graphing ~2000 hosts with smokeping and I need to integrate live
graphs into an external tool.

First I tried to find-out the right rrdtool-graph arguments, but it's seems
not to be possible (without doing prior calculations).

So I was looking at Smokeping.pm and tried to copy of what the CGI script
is doing, but I am stuck.

I am trying this:

 my $parser = Smokeping::get_parser;
 $cfg = Smokeping::get_config $parser, '/etc/smokeping/config';
 $tree = $cfg->{Targets};
 $open = $tree->{$ARGV[0]};    # <- this works, I have all targets in root
of the tree
 $probes = Smokeping::load_probes($cfg);
 my $step = $probes->{$tree->{probe}}->step();
 $q = bless \$q, 'dummyCGI';
 my $x = Smokeping::get_detail( $cfg,$q,$tree,$open,"a" );


However sub get_detail in Smokeping.pm returns "" on line:

   return "" if not defined $tree->{host} or 0 == @slaves;


???? Now I am lost for something that feels it should be easy.

Please someone point me into the right direction.


Thanks in Advance!!
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20160908/5b67958d/attachment.html>


More information about the smokeping-users mailing list