Tech Tip - Auto Generation of Service Groups

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History
Then check the Status view for your new service groups. They will be there within a few seconds.

If you want to remove any of the groups you create in this way, just comment them out of the /usr/local/groundwork/sg_autocreate_servicegroups.conf file. They will be removed the next time you run the script. Be aware, however, that the agent ID and application type are associated with these groups in the database. If you overwrite these values in the config file, removing the groups with the script will no longer work, and you would need to remove them by modifying the database directly.

h2. Cleaning up and formalizing

If you want to *remove* any of the groups you create in this way, just comment them out of the /usr/local/groundwork/sg_autocreate_servicegroups.conf file. They will be removed the next time you run the script.
{note}The agent ID and application type are associated with these groups in the database. If you overwrite these values in the config file, removing the groups with the script will no longer work, and you would need to remove them by modifying the database directly. {note}

What if you want to run the script each time you commit changes to the configuration? That's where MonarchCallOut.pm comes in. Just copy the supplied version over /usr/local/groundwork/core/monarch/lib/MonarchCallOut.pm. Make sure it is still owned by user nagios when done:
{noformat}
!GW-mc.png!

h3. See also

The APIs we are using are all documented here:
dassMonarch
[dassMonarch|https://kb.groundworkopensource.com/display/DOC67/Perl+API+Monarch]
[Foundation REST API|https://kb.groundworkopensource.com/display/DOC71/RESTful+API+Documentation]

We hope you find this useful and informative. Thanks for reading!