On-Demand macros
Add comment »
Centreon 2
, Development
, Macro
, Nagios 3
We all know that macros in Nagios 2 are very convenient, $HOSTADDRESS$, $HOSTNAME$ etc... with Nagios 3, it's even better! On-Demand macros are macros defined by the user. In Nagios 2, you can do the same thing with the $USERx$ macro but it is applied to all your hosts and services, whereas on-demand macros are applied to specific resources.
This is what it looks like on Centreon 2, that you should see in the next beta release:
A new "Macro" tab has been added to the host and services configuration pages, and the '+' button allows you to add as many macros as you want. Even though the macro looks simple on the screenshot, the actual content of the configuration file is more like this:
define host{
host_name Centreon-Server
use generic-host
alias Monitoring Server
address 127.0.0.1
_MACADDRESS 00-2F-3C-17-98-3B
}
And the macro has to be called using the following syntax : $_HOSTMACADDRESS$
You can already imagine all the generic stuff you can do with your commands thanks to these macros 
More information about macros can be found here

Comments
No comment for the moment.
Add comment