Skip to main content

Hello,

When i used a custom macro and want to initialise it with value macro $HOSTALIAS$ ,it’s not interpreted by centreon engine…

Is it possible to do it?

 

here on my example the ALIASDB receive not value in centreon-engine….

i’ve got no value after @… althought the alias is fill on definition of the host…

 

hello

you cannot use a macro in the service/host config page as you screenshoted it.

Macro are used only in the “check” commands and are interpreted there before being executed by the shell

either :  input the correct name in the ALIASDB macro

or : modify/duplicate the command and change it so the “--connect” option take $HOSTALIAS$ instead of whatever there was.

(and if you duplicated, you would need to change the service so it uses the new command you just created)

 

the first option is the proper way, as it will allow you to keep using the host templates and plugin as they are updated by centreon, the second option is more risky as if centreon make change in the plugin, you will not get the updates or the command mail break

(apparently you don’t use the standard plugin, no idea what this “neopost” command is, so the 2nd option could work for you)


Hello,

Thank for Reply.

 

I used a free version of centreon and don’t know if we can use the plugins that are provides by the softs.

So i ‘ve created some personnal scripts that work with centreon.

For my issue, i found a better way, where i used $arg1$ with macro services in same time. And so

i can use my script by using $HOSTALIAS$ in $arg1$.

Regards,

 

 

 

 


Reply