The monitoring source is a fundamental element of the event management process. The main task of the Monitoring Source is to bind the Data Import mechanism to the API for receiving messages and the target table.
The monitoring source has the information about the following entities:
- the specified monitoring system.
- the data structure provided by the system.
Role required: admin.
To create a monitoring source, complete the steps below:
- Navigate to Monitoring and Event Management → Configuration → New Monitoring Source.
- Follow the instructions given on the page.
- When all the steps are completed, click Finish.
Step 1. Monitoring source name
You need to specify a unique monitoring source name. The name of the monitoring source will also be used in the title of the target table as follows: Name Target Messages.
Step 2. Data structure
You need to specify the data structure that you want to get from the monitoring source. You can use one of the available fields to enter data:
JSON – insert data in JSON format. Use Latin letters, {} , "" _ : symbols, and [0...9] numbers.
You cannot put numbers at the beginning of attribute names.
Attributes and keys – create attributes by entering them in the input field. Use Latin letters, the _ symbol, and [0...9] numbers. Attribute names can only begin with letters or the _ symbol.
You cannot create the same attributes.
When data is inserted in one of the fields, it is automatically transferred to the other field in the required format.
You can also edit and delete attributes. There are two ways to do this:
- Click to edit or to delete an attribute in the Attributes and keys area.
- Edit or delete data in the JSON area.
Select the attributes from the list on the right that will be used as composite keys.
You need to select at least one attribute from the list that will be used as the composite key to go to the next step.
Composite key
A composite key is a set of values of several attributes. These attributes are considered to be a unique identifier that precisely defines the object, the message about which is sent by the monitoring system. It can be an attribute with an ID or a combination of many attributes.
The role of the composite key
- After receiving a message from the monitoring system, the system forms a composite key from the values of those attributes that are specified as the Composite Key in the Monitoring Source.
- The system checks the generated composite key of the message for uniqueness against the records in the Composite Keys table that have the corresponding Monitoring Source value.
- The system generates a new record in the Composite Keys table if the composite key of the message is unique.
Step 3. Columns of a target table
In step 3, you need to create columns for the target table. To do this, complete the following steps:
- In the New column area, fill in the fields.
- Click Add.
- Repeat and create as many columns as you need.
- When all columns are created, click Next to go to the last step.
Field | Mandatory | Description |
---|---|---|
Column type | Y | Specify a column type. The column type specifies the type of the data stored. Depending on the type selected, additional fields may appear on the form (see below). For more information, refer to the Column Types article. |
Title | Y | Specify a column title displayed on the form. It should be meaningful and human-readable. |
Column name | Y | System column name. This field is populated automatically, depending on the title entered, but you can also edit it. Latin letters, [0..9] numbers, and the underscore symbol ( _ ) are allowed. |
Reference | Y | Specify a table whose records will be available for selection. The field appears when the List or Reference option is selected in the Column type field. |
Choice table | N | Reference to a table with options. The field appears when the Choice option is selected in the Column type field. |
Choice type | Y | Define whether the None option is applicable for the field. Available options:
If the Dropdown without --None-- is chosen, the Default value field becomes mandatory. The field appears when the Choice option is selected in the Column type field. |
Default value | Y/N | Specify a default value that will be populated automatically to the field when a new record is created. The field appears when the Choice option is selected in the Column type field. It becomes mandatory when the Dropdown without --None-- (specify a default value) type is chosen. |
Choice options | N | Create choice options for the column. Click and fill in the fields in the modal window that appears:
The field appears when the Choice option is selected in the Column type field. |
To change the values of the created column or delete it, complete the steps below:
- Click its title in the Added columns area. The form will appear on the left.
- Make changes and click Save, or click Delete to delete the column.
- To close the form without any changes, click in the top right corner of the area.
Step 4. Field mapping
Set the field mapping to define the correlation between fields of the monitoring source and fields of the target table.
To do this, complete the following steps:
- Click the element in one of the areas. The chosen element is highlighted.
- In the opposite area, click the corresponding element.
As a result, the formed pair is highlighted in green, a connecting line runs between the elements. The pair is sorted to the bottom of the element list.
To disconnect the elements, click .
Add, edit, and delete a script
You can add a script to the connected field pair, so that the record object of the monitoring source is taken as an argument and returns the value to put into the target table field.
To add a script, complete the following steps:
- Click to open the modal window.
- Enter the script using the SimpleOne Server-Side API.
- Click Add.
When there is a script for a pair of fields, the icon becomes green .
To open the edit window with the script specified, click . Make changes and click Save, or click Delete to delete the script.
Results
As a result:
- The Monitoring Source record is created. The field values are populated automatically with the values specified during the setup.
- The endpoint in the API Actions (sys_api_action) table is created. The endpoint link is generated, you can copy it by clicking .
- The Import Source record is created. It contains the import text in JSON format inserted in step 2.
- The Target Table is created. The table contains columns that were created in step 3.
- The field mapping between the fields of the monitoring source and the target table is set.
- According to the data import mechanism, an intermediate table and mapping rules are created.
For further setup, you need to create Monitoring Rules, Event Rules, and Event Actions.