Skip to main content

Hello,

 

A nice feature would be to be able to use macros within custom macros.

For example use $hostname$ in a URL like this in order to use the hostname do dynamically create the URL.


Thanks in advance for the consideration.

Hello,

This is my first idea post I did not know about the template, I did not find a way to update my post so I’ll add this here : 
 

  • Persona : Anyone who manages a Centreon platform

  • Problem : Prevents to set manual value for each host or create a dedicated service template

  • Expected outcome : Gain time and flexibility in macro management

  • Potential solutions : Refer to my screenshot

Hope this adds up to the initial post


NewNeeds Votes

Hi @LucasL

I acknowledge the interest of such a feature in a general purpose, of course.

But I also have an alternative proposition.

What about changing the way the commands are built, from

--url='$_HOSTJOLOKIAURL$'

to

--url='$_HOSTJOLOKIAPROTO$://$HOSTADDRESS$:$_HOSTJOLOKIAPORT$/$_HOSTJOLOKIAPATH$

?


Hello,

@omercier my post was to give an example this was not specifically related to Jolokia. The idea is to have the possibility macro in custom macro fields.

 

And the issue with having to modify the command you would have to modify the command for each services you want to add ‘the intelligence’


Hello,

I have an exemple with an old question

I would use a resource on a template because it was impossible to use a macro on a macro with standard command, standard service template.

The goal was to use a macro inside the value of a macro who contains a path of filesystem.

The workaround was to create a custom command, custom service template.

Regards,


If we imagine such a feature, the order in which macros are evaluated would be important. 

And maybe all types of macros do not need to be usable in other macros?

For example, what if only resource macros ($USER1$, $CENTREONPLUGINS$, any name you want that would have a unique value for each poller) and standard macros ($HOSTNAME$, $HOSTADDRESS$, $SERVICEDESC$ and all the builtin macros from centengine) would be available for substitution and custom macros ($_HOSTSNMPCOMMUNITY$, $_SERVICEWARNING$, all the macros that you can customize from the host/service configuration menus) would be excluded? Would it fit your needs?


Needs VotesDiscussion ongoing

Hello,

I'm not the creator of this ideas, but i think the type of Macros that it’s could be used inside a Macro would be the custom macro.

But the standard macro could be a good use case also.

I don't think ressource macro is a good features, by design this type of macro would be used to set user account and others macro for the execution of command.

But maybe, by that i limit the Idea and the new functionnality that we could imagine.

Greg,

 

 


Discussion ongoingIn Backlog