script query interface

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
deanpence
Posts: 13
Joined: Wed Feb 16, 2005 11:55 am

script query interface

Post by deanpence »

I'd appreciate anyone taking a quick look at what may be a rather rudimentary issue.

Although I've read the instructions, what is the interface that cacti expects from scripts that run scripted data queries?

As I understand it, it's similar to this:

Code: Select all

> script index
index0
index1
index2
...

> script query output_field_name
index0:result0
index1:result1
index2:result2
...

> script get output_field_name index_value
index_value:resultn
Is this somewhere near it?

Also, I'm having trouble thinking about how to make my query fit into this mold. In particular, I have hostnames, each with numerous metrics I want to query. So would I have one input for the hostname, one input for each metric name, and then one output value determined by the requested metric?

If so, then that would yield something like this:

Code: Select all

> script index
hostname0
hostname1
hostname2
...

> script query accesses
hostname0:12
hostname1:24
hostname2:7
...

> script get access hostname0
hostname0:12
Does that seem right? I appreciate anyone's help.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest