1. Introduction Python script that monitors Abiquo API and notifies new events through email based on rules. Rules are stored in a SQLite database, which is queried by Notifier. This script works with Abiquo 2.3 and Abiquo 2.4 API 2. Configuration * Install the required python libraries: python-dateutil python-pycurl pytz * Edit notifier.cfg and set correct values. More information at: http://wiki.abiquo.com/display/ABI23/Abiquo+Events+Notifier * Initialize rules database ./init_rules_db.py 3. Basic example * Create a rule that monitor VAPP_CREATE and VAPP_DELETE actions performed by user mmorata, and notify it to user sgirones. Note that user sgirones must have a valid email. # ./add_rule.py --user sgirones --action VAPP_CREATE,VAPP_DELETE --owner mmorata * Verify rules are correctly created: # ./list_rules.py -------------------------------------------------- User: sgirones Actions: ['VAPP_CREATE', 'VAPP_DELETE'] Owners: ['mmorata'] -------------------------------------------------- * Run the Events Notifier # ./main.py & 4. Rule's examples * Notify all users when their deploys/undeploys have finished: # ./add_rule.py -u all -a VAPP_POWERON,VAPP_POWEROFF * Notify cloud admin user all criticals: # ./add_rule.py -u sgirones -s CRITICAL 4. Final notes * Add rules while Notifier is running is ALLOWED. It will load rules every time it analizes events. * Valid actions are those listed by: http://wiki.abiquo.com/display/ABI23/Events+View#EventsView-TheActionsTable * Valid severity levels are those listed by: http://wiki.abiquo.com/display/ABI23/Events+View#EventsView-TheSeverityTable