The SignifAI Community Hub

Welcome to the SignifAI Community Hub.
This is the place for you to find something new, express your thoughts, share and collaborate with other people. You'll find comprehensive guides and documentation to help you start working with SignifAI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Zabbix

Integrating with Zabbix monitoring system

Integrating with Zabbix

Zabbix is a popular open-source monitoring solution. Its strengths lie in distributed collection of metrics by agents through various methods (supporting IPMI, SNMP, JMX via a Java proxy/gateway, and running commands directly from a Zabbix agent), automatic host discovery, triggering actions based on rules evaluated over gathered metrics and composing graphs using those metrics. When integrated with SignifAI, it is a strong complementary component to other integrations in the system, shedding light on the specific points of the system that may be contributing to service problems or outages.

Installation

This document assumes you've followed the directions here (for Zabbix 2.2 or 2.4+) or here (for Zabbix 3.4) for a CentOS 7 installation.

Determine where your AlertScriptsPath is. By default on the CentOS 7/Zabbix installation, it's in /usr/lib/zabbix/alertscripts. Copy the send_signifai.py script from https://github.com/signifai/notify-signifai-zabbix directly into that directory and chmod 0755 it.

Configuration

There are three main phases required in configuration to allow Zabbix to send triggered alerts to SignifAI:

  1. The media type must be configured. This is essentially a transport that allows events to be sent to SignifAI.
  2. A user (and its corresponding user group for permissions) must be configured to provide an endpoint for notifications — that is, the user is defined to specify where on the media to send the notification. Due to size constraints in Zabbix, the API key cannot actually be specified in the user proper, so that is done in the action template instead (next phase).
  3. An action must be defined to allow our user (and thus the SignifAI system) to actually receive notifications; the action also specifies the format of Zabbix’s notification, which will be set to allow SignifAI to parse it.

From here, this walkthrough includes separate instructions for Zabbix 2.2 and 3.4. Click here to jump to the 3.4 instructions.

Instructions for Zabbix 2.2

1. Creating the media type

  1. Enter the Administration page from the top navigation bar
  2. Click "Media types" from the bar just under the top tabs of the screen. You should be presented with a screen like this:

Click the "Create media type" button on the far right side of the screen under the History bar. You should be presented with a form allowing you to configure a media type.

  1. Enter "signifai" as the name
  2. Change "Type" to "Script"
  3. Set "Script name" to send_signifai.py
  4. Zabbix 3.4 ONLY: Click the “Add” link at the bottom of the “Script Parameters” table three times to create three text boxes. Set those textboxes (in this order) to {ALERT.SENDTO}, {ALERT.SUBJECT}, and {ALERT.MESSAGE}.
  5. Make sure Enabled is checked.

The page should now look like this:

Click the save button.

2. Creating the SignifAI user and user group
While still in the Administration section, click into the Users subsection. You should get a screen like this:

Click the "Create user group" button on the far right side of the screen, just to the right of the selection box saying "User groups". You should be presented with a page allowing you to configure a user group.

Set the “group name” to signifai, don’t add any users, ensure that Frontend access is set to Disabled and that the “Enabled” checkbox is checked. When you’re done, it should look like this:

You are now ready to set Permissions, so click into that tab.

Click the "Add" button underneath the list box in the Read only column. You will be presented with a popup listing items access can be granted to. Check everything in the popup. SignifAI must have at least read permissions to get notifications. When you’re done, it should look like this:

Click the Save button at the bottom of the page to save the changes.

Now, change the "User groups" in the selection box on the right to "Users". Zabbix should dynamically change the screen and you will see:

Click the “Create user” button to the right of the selection box where Users was selected. Set the Alias to “signifai”, choose a strong password and fill the password fields with it, and set the language to English (en_US). Next, click the Add button to the right of the Groups list box to start the process of adding the signifai user to the signifai group (and permissions). You should be presented with a pop-up with a list of groups with check-boxes next to them. Check the signifai group’s box. It should look like this:

Click Select. The signifai group should be added to the list box. When this is done, the user page should look like this:

Now, we need to add the signifai media to our signifai user so we can get notifications on it. Click on the “Media” tab above the form. The page should change to this:

Click the “Add” link under the media list (which should say “No media found.”) You should be presented with a popup allowing configuration of new media. Change the “Type” to “signifai”, put “signifai” in the “Send to” box, and ensure all the checkboxes are checked and that the media is enabled. When you’re finished with the popup, it should look like this:

Click the Add button to add it. The signifai user’s media page should now look like this:

Now that you’ve filled out all the details for the signifai user and hooked it up to the signifai media, click the Save button at the bottom of the page.

3. Adding the reporting action
Retrieve your SignifAI REST API key from https://app.signifai.io/sensor/rest.

SignifAI uses Bugsnag to monitor the operation of the script. To enable this functionality, install the Bugsnag Python module using pip install bugsnag and add the notification key provided by SignifAI support using the -b flag.

Please contact support@signifai.io to receive a dedicated BugSnag key.
Notice that all of the reported exceptions information will be hosted as a dedicated private project in bugsnag to protect privacy.

Back in Zabbix, enter the Configuration page from the top navigation and click into the "Actions" sub-section (it usually winds up being just under the Administration tab). The screen should then look like this:

Ensure "Event source" on the right side of the screen is set to "Triggers", and then click the "Create Action" button above it. It will take you to a CONFIGURATION OF ACTIONS screen. Make these changes from this screen:

  1. Set Name to "Notify SignifAI", Default Subject to your bugsnag key (SignifAI will provide this to you), and Default Message to the following:
TRIGGER.DESCRIPTION: {TRIGGER.DESCRIPTION}
TRIGGER.ID: {TRIGGER.ID}
TRIGGER.NAME: {TRIGGER.NAME}
TRIGGER.NSEVERITY: {TRIGGER.NSEVERITY}
HOST.NAME: {HOST.NAME}
TRIGGER.STATUS: {TRIGGER.STATUS}
TRIGGER.EXPRESSION: {TRIGGER.EXPRESSION}
EVENT.DATE: {EVENT.DATE}
EVENT.TIME: {EVENT.TIME}
_API_KEY: <YOUR API KEY>
  1. Check the Recovery message checkbox, set Recovery subject to the bugsnag key as well and set Recovery message to the following:
TRIGGER.DESCRIPTION: {TRIGGER.DESCRIPTION}
TRIGGER.ID: {TRIGGER.ID}
TRIGGER.NAME: {TRIGGER.NAME}
TRIGGER.NSEVERITY: {TRIGGER.NSEVERITY}
HOST.NAME: {HOST.NAME}
TRIGGER.STATUS: {TRIGGER.STATUS}
TRIGGER.EXPRESSION: {TRIGGER.EXPRESSION}
EVENT.DATE: {EVENT.RECOVERY.DATE}
EVENT.TIME: {EVENT.RECOVERY.TIME}
_API_KEY: <YOUR API KEY>
  1. Ensure "Enabled" is checked

When this is complete, this screen should look like this:

Next, verify the Conditions. They should be “Maintenance status not in Maintenance” and “Trigger value = PROBLEM”. The screen should look like:

Now, click into the Operations tab. It should start out empty:

Click the New link beneath the empty list. It should expand into a box allowing you to configure the current operation. Leave the “From” step at 1, but change the “To” step to 0 (to allow notifications forever), and leave the Operation type as “Send message”. Add a user to the operation by clicking the “Add” link to the bottom of the “Send to Users” box — it should present you with a pop-up, check the box next to “signifai” and click Select. The pop-up should look like this just before clicking Select:

Once you’ve selected the user, the operations box should look like this:

Click the Add button in the lower left hand corner of the Operation details box, and the operations tab should now look like this:

Click the Save button at the bottom of the page to save the change.

You should now be set up to send your triggered alerts to SignifAI.

Instructions for Zabbix 3.4

Configuration

1. Creating the media type

  1. Enter the Administration page from the top navigation bar
  2. Click "Media types" from the bar just under the top tabs of the screen. You should be presented with a screen like this:
Zabbix 3.4

Zabbix 3.4

Click the "Create media type" button on the far right side of the screen under the subsection bar. You should be presented with a form allowing you to configure a media type.

  1. Enter "signifai" as the name
  2. Change "Type" to "Script"
  3. Set "Script name" to send_signifai.py
  4. Click the “Add” link at the bottom of the “Script Parameters” table three times to create three text boxes. Set those textboxes (in this order) to {ALERT.SENDTO}, {ALERT.SUBJECT}, and {ALERT.MESSAGE}.
  5. Make sure Enabled is checked.

The page should now look like this:

Click the Add button to save the new media type.

2. Creating the SignifAI user and user group

While still in the Administration section, click into the User Groups subsection. You should get a screen like this:

Click the "Create user group" button on the far right side of the screen, just to the right of the selection box saying "User groups". You should be presented with a page allowing you to configure a user group.

Set the “group name” to signifai, don’t add any users, ensure that Frontend access is set to Disabled and that the “Enabled” checkbox is checked. When you’re done, it should look like this:

You are now ready to set Permissions, so click into that tab.

Click the "Read” button to the right of the groups box (saying “type here to search”), and then click “Select”. You will be presented with a popup listing items access can be granted to. Check everything in the popup, like so:

Click Select to save the groups selected and dismiss the popup, then check the “Include subgroups” box beneath the list of host groups. When you’re done, it should look like this:

Click the “Add” link just underneath the “Include subgroups” checkbox (NOT the button yet) to add the permissions, then click the blue Add button.

Now, enter the Users subsection by clicking the link to the right of User groups in the subsection bar near the top of the screen. It should look like this:

Click the blue “Create user” button near the upper right corner of the screen to be taken to the create user page. Set the Alias to “signifai”, choose a strong password and fill the password fields with it, and set the language to English (en_US). Next, type the word “signifai” into the Groups list and hit enter — a box with an “X” should appear around the word “signifai”. Set the Language to “English (en_US)”. When you’re done, the page should look like this:

Now, we need to add the signifai media to our signifai user so we can get notifications on it. Click on the “Media” tab above the form. The page should change to this:

Click the “Add” link under the media list. You should be presented with a popup allowing configuration of new media. Change the “Type” to “signifai”, put “signifai” in the “Send to” box, and ensure all the checkboxes are checked and that the media is enabled. When you’re finished with the popup, it should look like this:

Click the blue Add button to add it. The signifai user’s media page should now look like this:

Now that you’ve filled out all the details for the signifai user and hooked it up to the signifai media, click the blue Add button at the bottom of the page.

3. Adding the reporting action
Retrieve your SignifAI REST API key from https://app.signifai.io/sensor/rest.

SignifAI uses Bugsnag to monitor the operation of the script. To enable this functionality, install the Bugsnag Python module using pip install bugsnag and add the notification key provided by SignifAI support using the -b flag.

Please contact support@signifai.io to receive a dedicated BugSnag key.
Notice that all of the reported exceptions information will be hosted as a dedicated private project in bugsnag to protect privacy.

Back in Zabbix, click the Configuration link at the top of the screen and click into the "Actions" sub-section (it usually winds up being just under the Reports link). The screen should then look like this:

Ensure "Event source" near the upper right corner of the screen is set to "Triggers", and then click the "Create Action" button to its right. It will take you to the Create Action screen, starting you in the Action tab. In this tab, simply set the Name to “Notify SignifAI”. When you’re done, it will look like this:

Click into the Operations tab, now. Set Default Subject to your bugsnag key (SignifAI will provide this to you), and Default Message to the following:

TRIGGER.DESCRIPTION: {TRIGGER.DESCRIPTION}
TRIGGER.ID: {TRIGGER.ID}
TRIGGER.NAME: {TRIGGER.NAME}
TRIGGER.NSEVERITY: {TRIGGER.NSEVERITY}
HOST.NAME: {HOST.NAME}
TRIGGER.STATUS: {TRIGGER.STATUS}
TRIGGER.EXPRESSION: {TRIGGER.EXPRESSION}
EVENT.DATE: {EVENT.DATE}
EVENT.TIME: {EVENT.TIME}
_API_KEY: <YOUR API KEY>

When the templates are filled out, the top half of the page should look like this:

Now we have to create the operation for this step. Click the “New” link in the Operations table and it will expand into a form prompting for input about the operation. Set the second (rightmost) textbox for “Steps” to 0 (allowing this operation to run indefinitely), leave Step duration at 0 and Operation type at Send message. Click the “Add” link at the bottom of the “Send to users” table to get a pop-up with a list of potential users to send the notification to; check the box next to “signifai” so that the pop-up looks like this:

Click Select to save the user and dismiss the popup. Make sure Default message is checked as well. When you’re done, the new operation box should look like this:

Click the Add link at the bottom of the Operation details box (not the blue add button yet) and proceed to the Recovery Operations tab.

Set Recovery subject to the bugsnag key as well and set Recovery message to the following:

		TRIGGER.DESCRIPTION: {TRIGGER.DESCRIPTION}
    TRIGGER.ID: {TRIGGER.ID}
    TRIGGER.NAME: {TRIGGER.NAME}
    TRIGGER.NSEVERITY: {TRIGGER.NSEVERITY}
    HOST.NAME: {HOST.NAME}
    TRIGGER.STATUS: {TRIGGER.STATUS}
    TRIGGER.EXPRESSION: {TRIGGER.EXPRESSION}
    EVENT.DATE: {EVENT.RECOVERY.DATE}
    EVENT.TIME: {EVENT.RECOVERY.TIME}
    _API_KEY: <YOUR API KEY>

The top half of the recovery operations screen should now look like this:

Repeat the instructions above for adding an operation to hook SignifAI up to the recovery notifications for a trigger — when finished, the operation detail should look like this:

Click the Add link as before, and then click the blue Add button at the bottom of the page.

You should now be set up to send your triggered alerts to SignifAI.

Need help with the integration?

Contact us at: support@signifai.io and we will be happy to help.

Zabbix

Integrating with Zabbix monitoring system