Variables in custom data of Data sources

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
mantiss
Posts: 4
Joined: Tue Apr 03, 2012 10:50 am

Variables in custom data of Data sources

Post by mantiss »

There is a problem that variables does not work in custom data of Data Sources.
There is a little patch for "/var/www/cacti/cmd.php" fixes this problem in attach. Please add it to all future versions.
Sincerelly yours Vladimir.
Attachments
cacti_variables.patch
for "/var/www/cacti/cmd.php"
(158 Bytes) Downloaded 322 times
Dear administrators of forums.cacti.net!
My primary nickname is "Checker" and this is not a SPAM!;
sergeant
Posts: 1
Joined: Sat May 05, 2012 4:25 am

Re: Variables in custom data of Data sources

Post by sergeant »

Guys, is there any opinion or response on this issue?

Let me describe it in more details:
We've created data template where one of "Custom Data" entry contains |host_hostname| macro. It's supposed to be automatically substituted during data source creation time, or during data source execution time. But it doesn't((( So script, specified in "Data Input Method", still be invoked with "service:jmx:rmi:///jndi/rmi://|host_hostname|:8006/jmxrmi" argument!

Attached patch helped us to solve this problem on the level of data source execution in cmd.php. I've attached more readable version of patch.
Attachments
cacti_variables.patch.txt
Patch that fixes the problem
(541 Bytes) Downloaded 345 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Variables in custom data of Data sources

Post by gandalf »

Should be part of 088a already
R.
pjbcr
Posts: 2
Joined: Tue Nov 29, 2016 12:13 pm

Re: Variables in custom data of Data sources

Post by pjbcr »

gandalf wrote:Should be part of 088a already
R.
I'm really sorry to revive such and old post, but I'm having this problem and the patch doesn't seem to have made it.
I added the suggested code but it did not produce the desired result :(

I have Version 0.8.8g
pjbcr
Posts: 2
Joined: Tue Nov 29, 2016 12:13 pm

Re: Variables in custom data of Data sources

Post by pjbcr »

*bump*

Can anyone chime in on this subject?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests