How do I get check definitions so they apply across many hosts?

WAS THIS PAGE HELPFUL? Leave Feedback

Q: How do I get check definitions so they apply across many hosts?

A: My monitoring-check definitions need to be written in a generic form so they apply across many hosts. But then how do I get them automatically customized for each particular host? Host and service externals can reference several different types of macros, and have those references be expanded when the externals files are built. Macros are currently expanded in the following order:

  • Nagios user-resource macros (the macros named as USER1 through USER32 in the Configuration > Control > Nagios resource macros screen).
  • Monarch configuration group macros (created in the Configuration > Groups > Macros screen, and associated with groups and possibly redefined in the Configuration > Groups > Groups> groupname > Detail > Macros screen). Since a host can be a member of multiple configuration groups arranged in parent-group/sub-group hierarchies, a standard order has to be defined in which such macros are applied. The rule is that Monarch configuration group macros are substituted in ascending order from subgroups to parent groups associated with the given host. This allows the most-specific value of a given macro (generally associated with a subgroup) to be used in preference to a more-general value of the same macro name (generally associated with a parent group, and used as a default value).
  • Certain standard macros: HOSTNAME, HOSTADDRESS, and HOSTALIAS.

    In all of these cases, the macro references are recognized by the presence of both leading and trailing $ characters around the macro names. So they would appear in your raw externals as references such as shown below. Lots of capabilities can be enabled and customized via this mechanism. GroundWork Professional Services can be engaged to help with complex requirements.

    $USER32$
    $MYGROUPMACRO$
    $HOSTADDRESS$

Labels

gdma gdma Delete
check check Delete
hosts hosts Delete
definitions definitions Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.