[TOC]
Nacoma can run hooks at certain actions. Currently, only 'save' hooks are implemented, although others may come along later if needed.
The hooks in the save hook directory are executed after the configuration files are flushed from database and Nagios has verified them.
The first argument to the hook is the username of the person pressing the 'save' button.
The second argument is the full name of the person, taken from the contact with the contact_name of the user performing the action. If no contact can be found, the second argument will be a nul string.
The hooks get fed the changelog entries, accumulated since the user last imported the configuration files (undo) or flushed them from database to files (save).
The format of the strings it gets fed is as follows (lines are broken here for readability):
object_id='<int>'\tuser='<string>'\tpre_name='<string>'\tpost_name='<string>'\ \tpre='k1=v1;k2=v2;kn=vn'\tpost='k1=v1;k2=v2;kn=vn'
Legend:
There is no need to use this hook capability to save the changelog, as that's taken care of by Nacoma anyway.