Introducing Programmable Button Actions

2021-01-07

Introducing Programmable Button Actions

Opmantek has long believed that Operational Process Automation is one of the foundational pillars that a successful network management strategy is built upon. One key piece to this is to ensure that actions are undertaken in a consistent manner each time, there should be no variance from what is outlined as the standard protocol. opEvents has introduced programmable button actions that help assist organisations in replicating troubleshooting actions and escalation procedures further solidifying opEvents as a technical service desk.

The buttons use the same pipeline as scripts in EventActions but now operators have the ability to manually kick off an action for an event. One of the most common actions will be to create a ticket in your issue tracking system, in our case we will create a Jira Ticket.

Configuration

To start create the following file in omk/conf/table_schemas/opEvents_action-buttons.json This must be valid JSON schema or the buttons will fail to render. You should see an error in opEvents.log if this is the case.  { “description”: “Example Events Button Action”, “label”: “Create Ticket”, “fa_icon”: “fas fa-jira”, “script”: “create_ticket”, “tags”: “ticket” }  Then add the following policy in omk/conf/EventActions.json|.nmisthat triggersshow_button.tag() EventActions.json “policy”: { “5”: { “IF”: “event.any”, “THEN”: “show_button.ticket()”, “BREAK”: “true” }, } & EventActions.nmis %hash = ( ‘policy’ => { ‘5’ => { IF => ‘event.any’, THEN => ‘show_button.create_ticket()’, BREAK => ‘true’ }, } ); These are the supported keys and how the change operation and look of the button.

KeyTypeRequiredDescription
scriptStringYesName of the script defined in EventActions.json
labelStringYesLabel which the button will display to the user
descriptionStringoptionalTool-tip help text to be displayed when you mouse over the button
tagsarraystringoptionalIf no tags are defined the button will show on all events, if tags are defined the button will only show on events which have been tagged with show_button.tag_name()
run_oncebooleanoptionalIf set to true the button will look for script.script_name key on the event, if found the button will disable itself. This allows manual actions to only be triggered once. Will not influence any defined EventActions.json operations.
fa_iconstringoptionalIcon to be displayed from the Font Awesome library shipped with opEvents example: “fas fa-table-tennis” Icons here.
classstringoptionalDefine a css class to colour the button, see Notes on Button Classes below to see a list of supported types.

Notes on Font Awesome

In opEvents-3.2.2 we are shipping the library 5.12.1 In opEvents-2.6.1 we are shipping the library 5.8.2