[smokeping-users] Re: Link-up graph

Olivier Nicole on at cs.ait.ac.th
Thu Feb 14 11:07:08 MET 2002


Hi Tobias,

>The UpTime thing currently only gets enabled for devices which use
>DYNAMIC ipaddressing. How would you detect 'uptime' for your
>satelites ? Snmp 

OK I figured that out. Maybe the label could be changed, by the
current label, I thought it was about the link, while it is the remote
side machine uptime.

As for the satellite, ping through the link and some parameters read
from the satellite receiver box (home made program).

> > A couple of remarks, installation is far from being straight forward
> > (but the tool is designed mostly for network people, so they should
> > know how to works around of that),
> can you elaborate, what would have helped you to make the process
> simpler ?

A single configuration file, instead of configuring smokepine,
smokeping.cgi, config. Maybe a configuration script that would patch
all the needed values in the files?

But once again, I know how to walk my way inside thet files. And maybe
l-users do not need SmokePing (they would not ne able to read the
results).

> so should the template have the option for embeding some sort of
> ssi into the template ? This could be done quite easily ...

I once considered doing that, but then I started looking at the
various issues. With SSI you can set some variables, you need to
provide a facilty for that, the name of the SSI scrpt can be relative
to Unix file hierachy or to Web file hierarchy, some SSI commands have
a given result (instead of calling an external script). Then you
end-up writting a full SSI interpreter. 

Maybe that is far beyond the point of SmokePing (while it could be
good as a general tool).

I think Apache provides no way to refeed the result of a CGI into
Apache, so it would take care of expanding the SSI.

What I did, in SmokePing.pm, in the function fill_template, I added
the following lines, and it did the trick for me:


+    $ENV{'title'} = "Latency page for <##title##>";
+    $ENV{'expire'}="300";
+    $ENV{'description'}= "Latency graphs are created using <##author##>'s <##smokeping##>.";
+    open I, "/web/csim/cgi-bin/new-head|";
+    my $data=<I>;
+    close I;
    open I, $template or return "<HTML><BODY>ERROR: Reading page template $template: $!</BODY></HTML>";
    $data .= <I>;
    close I;
+    open I, "/web/csim/cgi-bin/foot|";
+    $data.=<I>;
+    close I;
+    $data=~s/Content-type: text\/html//i;

By the way, the result is (temporarily) at
http://www.cs.ait.ac.th/~on/smokeping-1.1/htdocs/smokeping.cgi

Best regards,

Olivier

--
Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the smokeping-users mailing list