Speedtest graph/data template available

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

paulbeard206
Cacti User
Posts: 150
Joined: Sat Jul 30, 2005 2:15 pm

Speedtest graph/data template available

Post by paulbeard206 »

Looks like this:
graph_image.php.png
graph_image.php.png (18.83 KiB) Viewed 23291 times
Since the values being graphed are not the same (ms and Mbit/sec), I left off the Y axis label and let the Legend handle that.

This is just after I got it working. From the Readme (enclosed in the zip file):
Import the two enclosed files into Cacti through the cacti/templates_import.php interface.

You will also need the speedtest python script or something similar.

https://github.com/sivel/speedtest-cli

I use it this way:

speedtest-cli --simple | cut -d" " -f1,2 | sed -e 's/ //g'| tr '\n' ' '

There are almost certainly more elegant ways to extract the data from this output:
Ping: 34.332 ms
Download: 2.60 Mbit/s
Upload: 1.82 Mbit/s

But it works.
Attachments
Speedtest.zip
(4.51 KiB) Downloaded 2363 times
evrenbey
Posts: 6
Joined: Mon Nov 28, 2011 8:29 am
Location: Turkey/Ankara

Re: Speedtest graph/data template available

Post by evrenbey »

Thanks for templates.

i just want to ask a question,

if i want to draw different graphs for different speedtest servers for example

graph for Turkey and graph for US for servers how can i do that?
pilotMsk
Posts: 1
Joined: Thu Jul 24, 2014 8:12 am

Re: Speedtest graph/data template available

Post by pilotMsk »

evrenbey wrote:Thanks for templates.

i just want to ask a question,

if i want to draw different graphs for different speedtest servers for example

graph for Turkey and graph for US for servers how can i do that?

check
speedtest-cli --list
then use server that you want....
/usr/bin/speedtest-cli --simple --server 3682|cut -d" " -f1,2 |sed -e 's/ //g'|tr '\n' ' '
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Speedtest graph/data template available

Post by tosage »

Thanks for the share but why do bandwitch mesurement every 5 minutes or less ?
You are not afraid to saturate your internet connection ?

David
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
User avatar
Djoks
Posts: 5
Joined: Sun Sep 07, 2014 1:17 am

Re: Speedtest graph/data template available

Post by Djoks »

Doesn't work here - tried to import XML templates and get an error: Error: XML: Hash version does not exist. :-?
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Speedtest graph/data template available

Post by tosage »

http://docs.cacti.net/howto:determine_c ... te_version

You must have a cacti template hash smaller or equal than the hash version of your cacti version.

David
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
User avatar
Djoks
Posts: 5
Joined: Sun Sep 07, 2014 1:17 am

Re: Speedtest graph/data template available

Post by Djoks »

Many thanks!

I'll try to upgrade Cacti and retry.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Speedtest graph/data template available

Post by tosage »

You can do this but you can modify the hash in XML file with notepad++ and retry ;)
Good Luck
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
User avatar
Djoks
Posts: 5
Joined: Sun Sep 07, 2014 1:17 am

Re: Speedtest graph/data template available

Post by Djoks »

Excellent!

Some minor tweaking (XML templates hash changes, SPINE pooling timeout and script location) - all works as expected and described above!

Many thanks again. :)

BTW: was wondering - is it too difficult to add: MIN and AVG values, as well?
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Speedtest graph/data template available

Post by tosage »

No, go to Graph Template menu, select your template
Click on Add at the right bottom of your window
Select your Data Source
Graph Item Type : GPRINT
Consolidation Function : MIN or AVG
Text Format : Min or Avg
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
User avatar
Djoks
Posts: 5
Joined: Sun Sep 07, 2014 1:17 am

Re: Speedtest graph/data template available

Post by Djoks »

What else to say but: I owe you many beers! :)

Works and looks great:

Image

Thanks again! :)
mmethe
Posts: 5
Joined: Thu May 04, 2006 12:05 pm
Contact:

Re: Speedtest graph/data template available

Post by mmethe »

All,

Is there a step-by-step regarding how to install and use something like this? I have added the templates but am confused about adding data input methods, sources and graphs.

Thanks
-Mike M
http://blatbox.freehostia.com
mmethe
Posts: 5
Joined: Thu May 04, 2006 12:05 pm
Contact:

Re: Speedtest graph/data template available

Post by mmethe »

OK. I got the graph to show up but it contains no data. I am getting NAN's for everything. Cacti log does not show an error. When I run the data generating command line it does take a while to process. Could this slow response be the cause of NAN's?
-Mike M
http://blatbox.freehostia.com
User avatar
Djoks
Posts: 5
Joined: Sun Sep 07, 2014 1:17 am

Re: Speedtest graph/data template available

Post by Djoks »

mmethe wrote:OK. I got the graph to show up but it contains no data. I am getting NAN's for everything. Cacti log does not show an error. When I run the data generating command line it does take a while to process. Could this slow response be the cause of NAN's?
It could. Was in my case but errors showed in Cacti log accordingly. Try increasing "Script and Script Server Timeout Value" in Settings -> Poller.
jnorris765
Posts: 2
Joined: Tue Jun 19, 2012 9:15 am

Re: Speedtest graph/data template available

Post by jnorris765 »

How do I add the host to create the graph?

Also I'm still getting the NAN on the realtime and the overall graphs

Imported the temps, got the script in the right folders.

Script runs fine -- just not getting anything in the graphing department
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests