Thanks Tobi! Saves me some work and should make Joe happy.<br><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 3:34 AM, Tobias Oetiker <span dir="ltr"><<a href="mailto:tobi@oetiker.ch" target="_blank">tobi@oetiker.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Joe,<br>
<br>
this patch might help:<br>
<br>
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm<br>
index 2d6e1e5..f9d162c 100644<br>
--- a/lib/Smokeping.pm<br>
+++ b/lib/Smokeping.pm<br>
@@ -1156,7 +1156,8 @@ sub get_detail ($$$$;$){<br>
<br>
$q->param('epoch_start',parse_datetime($q->param('start')));<br>
$q->param('epoch_end',parse_datetime($q->param('end')));<br>
- @tasks = (["Navigator Graph".$name, parse_datetime($q->param('start')),parse_datetime($q->param('end'))]);<br>
+ my $title = $q->param('title') || ("Navigator Graph".$name);<br>
+ @tasks = ([$title, parse_datetime($q->param('start')),parse_datetime($q->param('end'))]);<br>
my ($graphret,$xs,$ys) = RRDs::graph<br>
("dummy",<br>
'--start', $tasks[0][1],<br>
<br>
<br>
now you can specify the title as a cgi parameter<br>
<br>
cheers<br>
tobi<br>
<div><div class="h5"><br>
Today Borg, Joe, Vodafone Malta wrote:<br>
<br>
> Hi Don,<br>
> Many thanks for your response and no worries re: being blunt.<br>
><br>
> Essentially, you are right - only that the only custom item I require is the title. In other words, the legend and everything else on the graph should remain the same as what's seen in smokeping. Moreover though, I also need to 'automate' this graph generation via CLI/ a perl script.<br>
><br>
> So to do the above, I thought the best way would be to use the rrdtool directly from CLI; something like:<br>
><br>
> /usr/bin/rrdtool graph - --imgformat=PNG --start=-31536000 --end=-300 --title="customer abc instead of Navigator Graph"................<br>
><br>
> What I was after was simply the list of all the parameters I might need to pass to rrdtool so as to generate a graph that looks exactly like the ones generated by smokeping (only with a different title).<br>
><br>
> I'll go through the links you provided me with as the second one seems promising.<br>
><br>
><br>
> The alternative to all the above would be to run something like this from a linux CLI:<br>
><br>
> [root@foo /]# wget " <a href="http://oss.oetiker.ch/smokeping-demo/?displaymode=a;start=2007-08-15%2015:31;end=now;target=Customers.ITIS.otoro" target="_blank">http://oss.oetiker.ch/smokeping-demo/?displaymode=a;start=2007-08-15%2015:31;end=now;target=Customers.ITIS.otoro</a>"<br>
><br>
> The above is also fine for me and would be much simpler. The only problem with it is that I don't know if/how I could modify the graph title of the png file generated? Maybe there's some other url parameter I can pass? E.g. ?displaymode=a;start=2007-08-15%2015:31;end=now;target=Customers.ITIS.otoro;title=customer.abc (<-note added parameter).<br>
><br>
><br>
> Thanks for all your help.<br>
><br>
> Joe<br>
><br>
><br>
> -----Original Message-----<br>
> From: Don Gould [mailto:<a href="mailto:don@bowenvale.co.nz">don@bowenvale.co.nz</a>]<br>
> Sent: 13 July 2012 03:36<br>
> To: Borg, Joe, Vodafone Malta<br>
> Cc: Ryan Becker; <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
> Subject: Re: [smokeping-users] RRD Command for generating Smokeping graphs via CLI<br>
><br>
> Joe,<br>
><br>
> My reading of this thread is that you have asked the wrong question.<br>
> Or, at least you have not explained what you requirement is very clearly<br>
> and I wonder if you have also asked on the wrong list.[1]<br>
><br>
> As a result you are not getting the help you're looking for.<br>
><br>
> My understanding of your requirement:<br>
><br>
> * Produce a graph 'image' from an RRDTool database with custom titles<br>
> and legend information on it.<br>
><br>
> ------------<br>
><br>
> The fact that the "SmokePing" application put the data in to the RRDTool<br>
> database is only coincidental.<br>
><br>
> So, <a href="http://oss.oetiker.ch/rrdtool/" target="_blank">http://oss.oetiker.ch/rrdtool/</a><br>
><br>
> <a href="http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html" target="_blank">http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html</a><br>
><br>
> <a href="http://oss.oetiker.ch/rrdtool/doc/rrdgraph_examples.en.html" target="_blank">http://oss.oetiker.ch/rrdtool/doc/rrdgraph_examples.en.html</a><br>
><br>
> Is this more what you're after?<br>
><br>
> D<br>
><br>
> [1] Please excuse my blunt, and perhaps rude, break down of the problem<br>
> here. I do not mean to offend, I just felts you weren't getting<br>
> anywhere and wondered if it's a language problem that's causing<br>
> confusion. So the best way I could think of to try and help was by<br>
> being a bit more direct and black and white.<br>
><br>
><br>
> On 12/07/2012 6:42 p.m., Borg, Joe, Vodafone Malta wrote:<br>
> > Thanks Ryan/Tobias,<br>
> ><br>
> > Yes I got there. In fact, in the second thread I listed in my email,<br>
> > there's mention of the use of displaymod=a which displays the graph<br>
> > alone (e.g.<br>
> > <a href="http://oss.oetiker.ch/smokeping-demo/?displaymode=a;start=2007-08-15%2015:31;end=now;target=Customers.ITIS.otoro" target="_blank">http://oss.oetiker.ch/smokeping-demo/?displaymode=a;start=2007-08-15%2015:31;end=now;target=Customers.ITIS.otoro</a>).<br>
> > This is **nearly** what I want. I could use this via CLI with something<br>
> > like wget in a script. The problem is, as far as I can see, there are<br>
> > some things I can't modify. In particular, I'd like to modify the graph<br>
> > title (currently 'Navigator Graph') to be something else (e.g. 'Customer<br>
> > ABC's Link'). Is this possible with some URL paramet?<br>
> ><br>
> > Note that I'm referring to the title of the png graph itself, not the<br>
> > HTML titles as part of the smokeping interface...<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Joe<br>
> ><br>
> > *From:*Ryan Becker [mailto:<a href="mailto:rb14060@gmail.com">rb14060@gmail.com</a>]<br>
> > *Sent:* 11 July 2012 17:49<br>
> > *To:* Borg, Joe, Vodafone Malta<br>
> > *Cc:* Tobias Oetiker; <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
> > *Subject:* Re: [smokeping-users] RRD Command for generating Smokeping<br>
> > graphs via CLI<br>
> ><br>
> > He's referring to the Navigator Graph option. Go into the CGI, click on<br>
> > a monitored node, then click on the graph itself. It should take you to<br>
> > a new window and the title of the graph should be "Navigator Graph".<br>
> > There's parameters that you can set in the URL, and you can see them<br>
> > clearly.<br>
> ><br>
> > On Wed, Jul 11, 2012 at 8:53 AM, Borg, Joe, Vodafone Malta<br>
> > <<a href="mailto:Joe.Borg@vodafone.com">Joe.Borg@vodafone.com</a> <mailto:<a href="mailto:Joe.Borg@vodafone.com">Joe.Borg@vodafone.com</a>>> wrote:<br>
> ><br>
> > Hi Tobias,<br>
> > Many thanks for getting back to me on this and for the prompt reply.<br>
> > Would you be able to let me know where/how I can find the graph<br>
> > navigator as I'm unsure as to what you're referring to?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Joe<br>
> ><br>
> > -----Original Message-----<br>
> > From: Tobias Oetiker [mailto:<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a> <mailto:<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>>]<br>
> > Sent: 10 July 2012 21:43<br>
> > To: Borg, Joe, Vodafone Malta<br>
> > Cc: <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
> > <mailto:<a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a>><br>
> > Subject: Re: [smokeping-users] RRD Command for generating Smokeping<br>
> > graphs via CLI<br>
> ><br>
> > have a look at the graph navigator. you can get charts directly from the cgi<br>
> > cheers<br>
> > Tobias Oetiker<br>
> ><br>
> > On 10.07.2012, at 11:38, "Borg, Joe, Vodafone Malta"<br>
> > <<a href="mailto:Joe.Borg@vodafone.com">Joe.Borg@vodafone.com</a> <mailto:<a href="mailto:Joe.Borg@vodafone.com">Joe.Borg@vodafone.com</a>>> wrote:<br>
> ><br>
> > > Hi,<br>
> > > I need to write a script that generates the smokeping graphs for use<br>
> > in another front-end (i.e. without accessing the smokeping cgi<br>
> > directly). Would anyone have the relevant rrd command and parameters I<br>
> > should use or an easy way to find out what it is?<br>
> > ><br>
> > > I've read the following threads:<br>
> > ><br>
> > ><br>
> > <a href="https://lists.oetiker.ch/pipermail/smokeping-users/2011-November/004519.html" target="_blank">https://lists.oetiker.ch/pipermail/smokeping-users/2011-November/004519.html</a><br>
> > - This is what I need; unfortunately there doesn't seem to be a<br>
> > conclusion to this thread.<br>
> > ><br>
> > ><br>
> > <a href="https://lists.oetiker.ch/pipermail/smokeping-users/2007-August/002420.html" target="_blank">https://lists.oetiker.ch/pipermail/smokeping-users/2007-August/002420.html</a><br>
> > - This mentions the use of 'displaymod=a' which I've tried and is close<br>
> > to what I want (I could use something like wget to get the graph).<br>
> > Unfortunately though it doesn't allow for any modification of the graph<br>
> > itself and I need to modify some minor things such as the graph title.<br>
> > ><br>
> > > Any help would be appreciated.<br>
> > ><br>
> > ><br>
> > > Thanks & Regards,<br>
> > ><br>
> > ><br>
> > > Joe<br>
> > ><br>
> > -------------------------------------------------------------------------------------<br>
> > > Vodafone<br>
> > ><br>
> > -------------------------------------------------------------------------------------<br>
> > ><br>
> > > This email is intended only for the use of individuals to whom it is<br>
> > addressed, as it may contain confidential or privileged information. If<br>
> > you are not a named addressee, intended recipient, or the person<br>
> > responsible for delivering the message to the named addressee, be<br>
> > advised that you have received this email in error and that you should<br>
> > not disseminate, distribute, print, copy this mail or otherwise divulge<br>
> > its contents. In such instances, please notify Vodafone Malta Limited on<br>
> > telephone number <a href="tel:%2B356%2099999247" value="+35699999247">+356 99999247</a> <tel:%2B356%2099999247> and delete this<br>
> > email from your system. Since this transmission was affected via email,<br>
> > Vodafone Malta Limited cannot guarantee that it is secure or error-free<br>
> > as information could be intercepted, corrupted, lost, destroyed, arrive<br>
> > late or incomplete, or contain viruses. Vodafone Malta Limited does not<br>
> > accept liability for any errors or omissions in the contents of this<br>
> > message which arise as a result of email transmission.<br>
> > ><br>
> > > Save the environment for our children - Print e-mail only when necessary.<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > smokeping-users mailing list<br>
> > > <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
> > <mailto:<a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a>><br>
> > > <a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users</a><br>
> > ><br>
> > -------------------------------------------------------------------------------------<br>
> > Vodafone<br>
> > -------------------------------------------------------------------------------------<br>
> ><br>
> > This email is intended only for the use of individuals to whom it is<br>
> > addressed, as it may contain confidential or privileged information. If<br>
> > you are not a named addressee, intended recipient, or the person<br>
> > responsible for delivering the message to the named addressee, be<br>
> > advised that you have received this email in error and that you should<br>
> > not disseminate, distribute, print, copy this mail or otherwise divulge<br>
> > its contents. In such instances, please notify Vodafone Malta Limited on<br>
> > telephone number <a href="tel:%2B356%2099999247" value="+35699999247">+356 99999247</a> <tel:%2B356%2099999247> and delete this<br>
> > email from your system. Since this transmission was affected via email,<br>
> > Vodafone Malta Limited cannot guarantee that it is secure or error-free<br>
> > as information could be intercepted, corrupted, lost, destroyed, arrive<br>
> > late or incomplete, or contain viruses. Vodafone Malta Limited does not<br>
> > accept liability for any errors or omissions in the contents of this<br>
> > message which arise as a result of email transmission.<br>
> ><br>
> > Save the environment for our children - Print e-mail only when necessary.<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > smokeping-users mailing list<br>
> > <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a> <mailto:<a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a>><br>
> > <a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users</a><br>
> ><br>
> ><br>
> ><br>
> > -------------------------------------------------------------------------------------<br>
> > Vodafone<br>
> > -------------------------------------------------------------------------------------<br>
> ><br>
> > This email is intended only for the use of individuals to whom it is<br>
> > addressed, as it may contain confidential or privileged information. If<br>
> > you are not a named addressee, intended recipient, or the person<br>
> > responsible for delivering the message to the named addressee, be<br>
> > advised that you have received this email in error and that you should<br>
> > not disseminate, distribute, print, copy this mail or otherwise divulge<br>
> > its contents. In such instances, please notify Vodafone Malta Limited on<br>
> > telephone number <a href="tel:%2B356%2099999247" value="+35699999247">+356 99999247</a> and delete this email from your system.<br>
> > Since this transmission was affected via email, Vodafone Malta Limited<br>
> > cannot guarantee that it is secure or error-free as information could be<br>
> > intercepted, corrupted, lost, destroyed, arrive late or incomplete, or<br>
> > contain viruses. Vodafone Malta Limited does not accept liability for<br>
> > any errors or omissions in the contents of this message which arise as a<br>
> > result of email transmission.<br>
> ><br>
> > Save the environment for our children - Print e-mail only when necessary.<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > smokeping-users mailing list<br>
> > <a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
> > <a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users</a><br>
><br>
><br>
<br>
--<br>
</div></div>Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland<br>
<a href="http://it.oetiker.ch" target="_blank">http://it.oetiker.ch</a> <a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a> <a href="tel:%2B%2B41%2062%20775%209902" value="+41627759902">++41 62 775 9902</a> / sb: -9900<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
smokeping-users mailing list<br>
<a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users</a><br>
</div></div></blockquote></div><br>