Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


script query, many data sources when creating a graph

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
doubleshot



Joined: 26 Sep 2008
Posts: 8

PostPosted: Mon Oct 06, 2008 4:57 pm    Post subject: script query, many data sources when creating a graph Reply with quote

OK. I've written a script that queries a ssh client and returns data like so:
<desc>:<value> <desc>:<value> <desc>:<value> <desc>:<value>

I created a Data Input Method and had it return the data. I created all the fields in a data template (see image)

My problem is on every new graph it creates a new data source. Does this mean it's running the script every time for each graph or is it actually using the data template?

I'm still learning, as you can tell. It'd be great to only run the script once and return all the values so the graphs can only use one data source.



2008Oct06-008.png
 Description:
Data Template
 Filesize:  10.55 KB
 Viewed:  268 Time(s)

2008Oct06-008.png



2008Oct06-007.png
 Description:
data sources
 Filesize:  25.32 KB
 Viewed:  268 Time(s)

2008Oct06-007.png


Back to top
doubleshot



Joined: 26 Sep 2008
Posts: 8

PostPosted: Tue Oct 07, 2008 10:49 am    Post subject: Reply with quote

found a post that details that this is by design and there's a manual workaround to solve it:
http://forums.cacti.net/viewtopic.php?t=21388&highlight=csv

It is a "well known" but ugly behaviour. And yes, it's by design.
But it is hard to google for that one. Here's the workaround:
- create a single graph only in the first step
- then visit Graph Management and ADD
- specify the next Graph Template and the Host, CREATE
- select the data sources used from the dropdowns, SAVE
Repeat this procedure for each Graph (9 times in your case). Ugly, I know
Reinhard
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group