Some users (and me) wanted to use "|query_xxxx|" from datasource in graph title,but this feature is limited to datasources that used Data Queries, not for Data Input Method.See also: get param passed to an script

So I've tried implementing that.

How to use1) Place 'addon_data_input_field.php' at 'cacti/lib/' directory

If the changes won't be applied immediately (like this),perform "Reapply Suggested Names" to the graph.

NOTICE:- I'm using on Cacti 0.8.7g + official patch + PA2.9- I made this mainly for Advanced Ping, not enough tested with other templates (e.g. a graph that is related with multiple rrd file which is made by Data Input Method)- The changes won't be applied when the device is down- I'm not sure whether if this will work properly (or not) when the multiple input fields with the same name existed in same datasource (e.g. aggregated graph?)

LogicIt needed to determine "what datasources are used in this graph"..(Does anyone know easier method for that?)

I tried this way：1) determine what graph template is used in its graph2) determine what data (output) field is used in its graph template(collect field which has "Data Source" type in "Graph Item Inputs")3) determine what datasource has its field (= what datasource is used for its graph)4) if data input id and data template id which used in its datasource are known, then retrieve data input fields from its datasource

This was already 99.9% implemented in 0.8.7h, but we left off the title_cache part of this. Being voted on now. If you look at SVN under branches/0.8.7/lib/variables.php, you will see the function already written.

TheWitness

_________________True understanding begins only when we realize how little we truly understand...

This was already 99.9% implemented in 0.8.7h, but we left off the title_cache part of this. Being voted on now. If you look at SVN under branches/0.8.7/lib/variables.php, you will see the function already written.

Sorry for late response, I've looked into new code in SVN.

"title_cache" (actual title of graph to be shown) seems to be updated,- when performed "Reapply Suggested Names"- when added new graph- when saved graph template- when saved device settings (?)

And "name_cache" (actual name of datasource to be shown) is also updated by similar logic.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum