Data Input methods - Using stored data

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

Moderators: Developers, Moderators

Post Reply
Grand Master Wierdo
Posts: 10
Joined: Fri Nov 05, 2004 11:26 am

Data Input methods - Using stored data

Post by Grand Master Wierdo »

I have a data input method that returns some numeric data and also a text string. The numeric data is no problem because I store those data to the RRD file, however, the text field I want displayed on the graphs (as a comment) when they are drawn.
I have added the field to the data input method and unchecked the 'add to RRA' which, according to the docs stores that in the database. How do I reference this and retrieve it so it is displayed as a text line on the graph? I have tried |query_myfieldname| but to no joy.

Anyone able to assist?

Thanks

GMW
thisisharper
Posts: 31
Joined: Fri Jul 01, 2005 12:07 pm

Post by thisisharper »

I'm interested in doing this too, but I believe you can only query fields for Data Queries and not Data Input Methods.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Make sure that your xml field direction is "input" for the fields that you want to use on the graphs. Then the variable replacement will work.

If the variable shows up on the create graphs page for that device as column in the data query item selection area, then you can use it as a variable. But, you have to make the name of the field XML name, not the friendly name.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Grand Master Wierdo
Posts: 10
Joined: Fri Nov 05, 2004 11:26 am

Post by Grand Master Wierdo »

Geven I am using a data input method which is running a perl script rather than a query method I guess I don't have the option.

Ah well

Thanks

GMW
User avatar
TheWitness
Developer
Posts: 17050
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

raX needs to answer this one as both Rony and I don't frequent that section of code.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Unfortunately, I do not think that this will currently work with regular scripts or script query-based scripts. This used to work with scripts, but somewhere along the way support for this was dropped and was never re-added. I don't believe that there is any particular reason for this, it just never showed up on the radar. I do apologize for the misleading documentation though.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests