Script Queries : How many times ...

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
sebb
Posts: 1
Joined: Sat Jul 21, 2007 6:46 pm

Script Queries : How many times ...

Post by sebb »

Hi,

How many time the script specified in the queries is called. ? 1 times per objects per attributes ?

Let s says : i have : 3 objects ( A,B,C,D,E) , for each i get 5 attributes values ( 1,2,3,4,5) All are specidied in Xml queries script.

My understanding of documentation and example ( is that the script will run 3 times to reply something like that :


A:value_of_1
B:value_of_1
C:value_of_1
example :

Code: Select all

[boby@libox scripts]$ perl query_unix_partitions.pl query used
/dev/mapper/main-root:103208372
/dev/md0:181284320
/dev/md1:12478
So if i have specified in XML queries script 5 output sources, will Cacti run the script 3*5 times. (one per objects, and one per attributes) ??
I query a distant source so, when i retreive a file of one object, with all attribute on it. I want to avoid to make several times a query for a same object.

Is Cacti can process a query like that

Code: Select all

[boby@libox scripts]$ perl query_unix_partitions.pl query used available
/dev/mapper/main-root: used: 103208372 available:54458
/dev/md0: used:181284320 available:456886
/dev/md1: used:12478 available:5454
Thanks for reading
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

It depends how one has set up the script/templates.

For example, if you use the PHP script server then a query will only happen once per data source. Conversely, if you have a script which takes some parameter via a data input method, and there are 10 data pieces of data associated to a data template, the script will be executed 10x per data source. Clear as mud?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests