This page reviews externals and how to enable, search, create, and add.
The Externals feature enables you to add your own configuration data that is not related to Nagios but can be useful when integrating other tools. When externals are enabled, you can add this data to host and service profiles, which can then be applied to instantiated host and service definitions.
You can then execute the Build Externals command, which will call a user written program in MonarchExternals.pm. The user program can process the externals data associated with the host and service definitions in monarch. For example, the externals data can be used to generate a configuration update for another monitoring tool based on monarch changes. This is an advanced feature that requires some knowledge of Perl to modify MonarchExternals.pm.
- To enable externals within GroundWork Monitor, select Configuration > Control and check the Enable Externals box.
- Select Save. You are then able to define, add, and execute externals using the Services, Profiles, and Hosts configuration tabs.
Figure: Enable Externals
Additionally, you have the ability to search for service and host externals. When externals are enabled the Search Service Externals and the Search Host Externals options will be available under Services and Hosts.
- Select Configuration > Services, and Search service externals.
- Enter any part of an external name to search.
Figure: Search Externals
- To create a host or service external, select Configuration > Hosts or Services.
- Select Host Externals (or Service Externals) and select New.
- Enter a Name, and Detail for the external and Add and Continue, you will then see the new external listed under Modify.
Figure: Creating Externals
You can then add host externals in the host detail, service externals in service detail, and externals within the host profile page.
Figure: Adding Externals
When externals files are built, they have to be placed somewhere in the filesystem. That location is specified in a top-level Monarch Group used for that purpose. Each of the hosts which you wish to create externals for must be belong to such a Monarch Group. The Build folder for the Monarch Group specifies where the created externals files are to be placed. The Nagios etc folder field for the Monarch Group must be left blank.
Another function of the Monarch Group in this regard is that it manages the definitions of macro substitutions that may be made into externals definitions when the externals files are built. Complex setups can be defined by further refinement using Monarch Group sub-groups; when a host belongs to both a group and one of its sub-groups, the macro definitions in sub-groups take precedence over similar definitions in their parent groups.
In the current standard version of the MonarchExternals.pm scripting, externals will not be generated for a given host if the host has only host-service externals attached, and no host externals. This may change in a future release.
- To build the full set of externals files associated with hosts in configuration groups, first select Control from the Configuration menu options.
- Then select Build Externals, which will execute the code in MonarchExternals.pm. The standard version of this module will analyze the hosts in each group and subgroup, analyze the group/subgroup hierarchies, collect together the host and service externals for each host, and perform macro substitution on those externals. For each such host, if the result is different from the prior content of the externals file (if any), a new copy of the externals file will be written out. Finally, old externals files which were previously in the filesystem but are no longer specified by the current configuration will be removed. Statistics on the analysis and actions will be printed on-screen so you have some idea of what transpired.
Figure: Build Externals