Variables in custom data of Data sources

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

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

Variables in custom data of Data sources

#1 Post by mantiss » Fri May 04, 2012 7:56 am

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 245 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

#2 Post by sergeant » Sat May 05, 2012 6:38 am

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 269 times

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

Re: Variables in custom data of Data sources

#3 Post by gandalf » Sat May 12, 2012 8:23 am

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

#4 Post by pjbcr » Tue Nov 29, 2016 12:26 pm

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

#5 Post by pjbcr » Mon Dec 05, 2016 12:07 pm

*bump*

Can anyone chime in on this subject?

Post Reply