Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 27, 2017 3:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Speedtest graph/data template available
PostPosted: Sat May 17, 2014 9:29 pm 
Offline
Cacti User

Joined: Sat Jul 30, 2005 2:15 pm
Posts: 138
Looks like this:
Attachment:
graph_image.php.png
graph_image.php.png [ 18.83 KiB | Viewed 9569 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):

Quote:
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 1243 times
Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Thu Jun 19, 2014 3:58 am 
Offline

Joined: Mon Nov 28, 2011 8:29 am
Posts: 6
Location: Turkey/Ankara
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?


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Thu Jul 24, 2014 8:15 am 
Offline

Joined: Thu Jul 24, 2014 8:12 am
Posts: 1
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' ' '


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Fri Aug 15, 2014 4:05 pm 
Offline
Cacti User

Joined: Wed Jul 28, 2010 5:05 am
Posts: 153
Location: France
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Sun Sep 21, 2014 3:35 pm 
Offline
User avatar

Joined: Sun Sep 07, 2014 1:17 am
Posts: 5
Doesn't work here - tried to import XML templates and get an error: Error: XML: Hash version does not exist. :-?


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 2:03 am 
Offline
Cacti User

Joined: Wed Jul 28, 2010 5:05 am
Posts: 153
Location: France
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 3:30 am 
Offline
User avatar

Joined: Sun Sep 07, 2014 1:17 am
Posts: 5
Many thanks!

I'll try to upgrade Cacti and retry.


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 3:43 am 
Offline
Cacti User

Joined: Wed Jul 28, 2010 5:05 am
Posts: 153
Location: France
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 5:55 am 
Offline
User avatar

Joined: Sun Sep 07, 2014 1:17 am
Posts: 5
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?


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 6:57 am 
Offline
Cacti User

Joined: Wed Jul 28, 2010 5:05 am
Posts: 153
Location: France
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Mon Sep 22, 2014 7:52 am 
Offline
User avatar

Joined: Sun Sep 07, 2014 1:17 am
Posts: 5
What else to say but: I owe you many beers! :)

Works and looks great:

Image

Thanks again! :)


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Wed Oct 15, 2014 9:58 am 
Offline

Joined: Thu May 04, 2006 12:05 pm
Posts: 5
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Fri Oct 17, 2014 8:23 am 
Offline

Joined: Thu May 04, 2006 12:05 pm
Posts: 5
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


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Sun Oct 19, 2014 3:59 am 
Offline
User avatar

Joined: Sun Sep 07, 2014 1:17 am
Posts: 5
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.


Top
 Profile  
 
 Post subject: Re: Speedtest graph/data template available
PostPosted: Thu Dec 11, 2014 10:53 am 
Offline

Joined: Tue Jun 19, 2012 9:15 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group