Samhain IDS

The SAMHAIN HIDS is a very vastly used HIDS so i am guessing there should be a few interfaces provided in order to interact with the other processes. IF anyone has previously worked on it, please help me out as I need to set a register on generation of a failure message. The interface for setting the register is defined and I need to use it in my script to set the register. The only problem is how to receive the message from Samhain into the script.