Understanding Macro definitions.

757    Asked by CaroleThom in Devops , Asked on Dec 29, 2019
Answered by Carole Thom

Using Macros makes Nagios very flexible and enhances its ability.

In simple coding language Macros can be defined as variables which are replaced by its corresponding values when commands get executed.

  These variables or macros can be defined in Macros tables along with its n corresponding values within the Macros tables, and then these variables can be used globally within Nagios config. or command based arguments.

Below is the example for host address macros -:


When the command will get executed, the macos $HOST ADDRESS$ will be replaced by its value, i.e. 



Your Answer

Interviews

Parent Categories