Event Log

MongoDB 4.4 is required to use Event Log.

Event Log is a screen where you can view, filter, and search SNMP Traps and MQTT messages received by the server from all agents and view state history of all objects.

  • SNMP

  • MQTT

  • State History

image
image
image

Event Log allows you to the following to the data:

Button/field Description

image

Suspend output – suspends new data displaying.

image

image

image

View selector that lets you switch between SNMP Traps, MQTT messages, and State History views.

image

Filter – filters data in the table. Every event type has its own filter.

image

Enable filter – enables/disables the data filter.

image

Message limit – limits the number of rows to show.

excel

Export Event Log with the current filters in the .xls format. Unavailable for SNMP Traps view.

View types

SNMP-Trap

Agent can receive SNMP-Traps and send data to the server. Event Log allows you to view, filter and search SNMP-Traps received by the server from all agents.

image

Rows are grouped automatically if the following fields of SNMP Traps are equal:

  • enterprise OID,

  • agent address,

  • additional OID to group data.

To learn more about mentioned fields and possibility to "link" SNMP Traps to objects refer to the SNMP Trap article.

Context menu

Context menu appears when you right click on any Event Log row.

image

It allows to:

  • assign the event to the responsible user,

  • delete any of the events (for example, fault event),

  • temporarily change the text of the event (for example, to add a comment to an accident).

Filter

The filter allows to select only the rows which correspond to set conditions.

image

Mathematical comparison operators are used for numeric values; textual operators are used for numeric and text values, case-insensitive.

The operators = and can also be used with text values, case-sensitive.

It is possible to use regular expressions with textual comparison operators such as matches.

The button image allows you to add another condition. The conditions are combined with logical AND.

To delete a condition, click the image button to the right of the condition.

MQTT messages

Server can receive messages from devices over the MQTT protocol. Event Log allows you to view and filter MQTT messages from topics specified in the MQTT sensor settings of the corresponding objects.

image
To learn more about MQTT-sensor configuration refer to the article MQTT-sensor.

Filter

The filter allows to select only the rows which correspond to set conditions.

image

Mathematical comparison operators are used for numeric values; textual operators are used for numeric and text values, case-insensitive.

The operators = and can also be used with text values, case-sensitive.

It is possible to use regular expressions with textual comparison operators such as matches.

The image button allows you to add another condition. The conditions are combined with logical AND.

To delete a condition click the image button to the right of the condition.

State history

Event Log implements functionality to view state history of all objects.

image

Filter

The filter allows to select only the rows which correspond to set condition.

Some advanced filter parameters are hidden in the interface and can only be set with the request parameters.
image

The fields From and To are for setting the time period during which the targeted events took place.

You can quickly set the time range with the following buttons:

image

The image button clears the corresponding field.

If you filter Event Log by class, tag or entity name (available only as a request parameter), the time period must be in the range, specified in the server configuration.

Request parameters

You can setup log filters and interface elements with request parameters.

Example of a request with parameters

http://<saymon-server>/event-log.html?type=mqtt&header=off&logo=on&pauseButton=on&typeSelect=on&filterSection=on&exportSection=on

Request parameters list:

Parameter Description

type

Log type that will be displayed by default. Can be changed after the page loads, if the type selector is enabled (typeSelect).

Possible values:

filter

Event Log filters. Depend on the selected log type. Learn more in the Filters section.

header

Whether to display the Event Log header, that contains filter controls.

  • on – enable header;

  • off – disable header. Also sets all other interface elements settings to off.

To overwrite a specific display setting – for example, disable all header elements apart from the logo – set it to on in the request parameters.

http://<saymon-server>/event-log.html?header=off&logo=on
Parameter order doesn’t matter.

logo

Whether to display the logo.

  • on – enable logo,

  • off – disable logo.

typeSelect

Whether to display the Event Log type selector (SNMP, MQTT, or State History).

  • on – enable selector,

  • off – disable selector.

filterSection

Whether to display a filter window.

  • on – enable "Filter" button,

  • off – disable "Filter" button.

paramsSection

Whether to display parameter section of the header (Message limit for SNMP Trap log).

  • on – enable section

  • off – disable section.

exportSection

Whether to display the log export button.

  • on – enable button,

  • off – disable button.

pauseButton

Whether to display the pause button (image)

  • on – enable button,

  • off – disable button.

hideColumns

Allows you to hide columns from tables. Possible values are listed in the Table columns IDs.

This parameter also applies to the table export. Exported tables don’t include hidden columns.

Filters

Event Log allows you to specify filters in the request parameters as well as the "Filter" menu.

Filters set up in the user interface are not applied to the request in the address bar automatically. However, filters set in the request parameters are shown in the "Filter" menu, where they can be adjusted.
http://<saymon-server>/event-log.html?filter=<filter>
Filtered request can contain other request parameters.

MQTT message log and SNMP traps log support filtering by multiple variables at the same time. To do so, pass a list of filters in the filter parameters:

Request that returns an MQTT log filtered by MQTT topic and MQTT message body
http://<saymon-server>/event-log.html?type=mqtt&filter=[{"name":"payload.topic","value":{"_ct":"2"}}, {"name":"payload.message","value":{"_ct":"message text"}}]

You can pass filters by multiple variables in the state history log request as well, but all filters apart from the first one will be ignored.

State history filter

Example of the filtered request:

http://<saymon-server>/event-log.html?filter={"stateId":[1,3],"from":1599469080000,"to":1694077090252}

Filter supports the following parameters:

Parameter Description

from

Start of the time range (Unix time, in milliseconds).

to

End of the time range (Unix time, in milliseconds).

stateId

State ID or a list of state IDs.

classId

Class ID or a list of class IDs.

tagId

Tag ID or a list of tag IDs.

entityId

Object/link ID or a list of object/link IDs. Hidden in the interface.

entityType

Entity type ID (1 – object, 2 – link). Hidden in the interface.

entityName

Filters entities by the partial match of their name. Hidden in the interface.

MQTT messages filters

Example of the filtered MQTT messages request:

http://<saymon-server>/event-log.html?filter=[{"name":"payload.topic","value":{"_ct":"2"}}]
Parameter Description

name

Name of the variable that is used for filtering. MQTT messages have the following variables:

  • payload.topic – MQTT message topic;

  • payload.message – MQTT message body.

value

Value filter of the specified variable in the following format:

"value":{<operator>:<value>}

Supported operators:

  • _ct – Contains;

  • _nct – Does not contain;

  • _eq – Equal;

  • _neq – Not equal;

  • _m – Matches.

SNMP traps filters

Example of the filtered SNMP traps request:

http://<saymon-server>/event-log.html?filter=[{"name":"payload.text","value":{"_ct":"34"}}]
Parameter Description

name

Name of the variable that is used for filtering. SNMP traps have the following variables:

  • payload.trapOid

  • payload.text

  • payload.senderAddress

value

Value filter of the specified variable in the following format:

"value":{<operator>:<value>}

Supported operators:

  • _ct – Contains;

  • _nct – Does not contain;

  • _eq – Equal;

  • _neq – Not equal;

  • _m – Matches.

Table columns IDs

Incorrect or non-existing column IDs are ignored.

List of column IDs for the State history table:

  • time (Time)

  • object (Object)

  • state (State)

  • reason (Reason)

  • data (Data/Description)

  • comment (Comment)

List of column IDs for the SNMP-Trap table:

  • count (Count)

  • timestamp (Time)

  • level (Severity)

  • entitylink (Object on scheme)

  • payloadsenderaddress (Sender address)

  • payloadtrapoid (Trap OID)

  • payloadtext (Text)

  • payloadbindings (Data)

  • assignee (Assignee)

List of column IDs for the MQTT messages table:

  • entity (Object/link)

  • topic (Topic)

  • message (Message)