Process mult. counters for mult. indexes in Data Query?

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

Moderators: Developers, Moderators

Post Reply
csorrows
Posts: 2
Joined: Thu Nov 13, 2008 1:05 am

Process mult. counters for mult. indexes in Data Query?

Post by csorrows »

I'm new to Cacti, so please excuse any terms I use that don't quite make sense...

I need to collect multiple counters and their values from multiple indexes from a non-SNMP device (collection will be done via an API in a script I will write).

I know in advance the counters I will be collecting, but the number of indexes and the index values (names) can vary at runtime.

The API, and my script, can return all the indexes and counters/values during one run, which I'd prefer so that some timestamps I need to process are all the same for that run.

However, from my understanding of Data Queries, it's possible to send an "index" request to the script to have it return a list of indexes, and a "query" request to return a list of multiple values for the one counter specified (one value per index). But I'm not finding a way for Data Queries to handle multiple counters/values for multiple indexes.

In other words, if the "index" request returned a list of these indexes:

Index1
Index2
Index3

And I have two Counters I'm interested in:

Counter1
Counter2

Is it possible for the script to return, and the Data Query to process, in one run, something like:

Index1: Counter1:Counter1Value Counter2:Counter2Value
Index2: Counter1:Counter1Value Counter2:Counter2Value
Index3: Counter1:Counter1Value Counter2:Counter2Value

Or is the only way Cacti does this to "index" the script, and then run a "query" of the script once for each Counter? If that's the only way to do this, then that would mean I have to cache or store the results of my script's one run of the API, and return that cached data as my script is called?

However, I'd rather not deal with making my script handle data persistence or caching, I'd rather get everything in one call, and pass it to a Data Query in one call. If that's possible.

I hope all that made sense...

Ideas? Thoughts? Comments?

Thanks!
csorrows
Posts: 2
Joined: Thu Nov 13, 2008 1:05 am

Post by csorrows »

Sorry for bumping, but does anybody know if Cacti can/cannot process multiple counters/values for multiple indexes during one call of a Data Query script?

I don't think it can from the documentation I've read, but would like to confirm.

Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The answer is: NO
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests