You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

1 Action log

Description

These parameters and the possible property values for the respective dashboard widget field objects allow to configure the Action log widget in dashboard.create and dashboard.update methods.

Widget fields properties are not validated during the creation or update of a dashboard. This allows users to modify built-in widgets and create custom widgets, but also introduces the risk of creating or updating widgets incorrectly. To ensure the successful creation or update of the Action log widget, please refer to the parameter behavior outlined in the tables below.

Parameters

The following parameters are supported for the Action log widget.

Parameter type name value
Refresh interval 0 rf_rate 0 - No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - (default) 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - 15 minutes.
Recipients 11 userids.0 User ID.

Note: To configure multiple users, create a dashboard widget field object for each user with an incremented number in the property name.
Actions 12 actionids.0 Action ID.

Note: To configure multiple actions, create a dashboard widget field object for each action with an incremented number in the property name.
Media types 13 mediatypeids.0 Media type ID.

Note: To configure multiple media types, create a dashboard widget field object for each media type with an incremented number in the property name.
Status 0 statuses.0 0 - In progress;
1 - Sent/Executed;
2 - Failed.

Note: To configure multiple values, create a dashboard widget field object for each value with an incremented number in the property name.
Search string 1 message Any string value.
Time period
Time period 1 time_period._reference DASHBOARD._timeperiod - set the Time period selector as the data source.
ABCDE._timeperiod - set a compatible widget (Graph, Graph (classic) or Graph prototype with its Reference parameter set to "ABCDE") as the data source.

Default: DASHBOARD._timeperiod

Alternatively, you can set the time period only in the From and To parameters.
From 1 time_period.from Valid time string in absolute (YYYY-MM-DD hh:mm:ss) or relative time syntax (now, now/d, now/w-1w, etc.).

Parameter behavior:
- supported if Time period is not set
To 1 time_period.to Valid time string in absolute (YYYY-MM-DD hh:mm:ss) or relative time syntax (now, now/d, now/w-1w, etc.).

Parameter behavior:
- supported if Time period is not set
Sort entries by 0 sort_triggers 3 - Time (ascending);
4 - (default) Time (descending);
5 - Type (ascending);
6 - Type (descending);
7 - Status (ascending);
8 - Status (descending);
11 - Recipient (ascending);
12 - Recipient (descending).
Show lines 0 show_lines Possible values range from 1-100.

Default: 25.

Examples

The following examples aim to only describe the configuration of the dashboard widget field objects for the Action log widget. For more information on configuring a dashboard, see dashboard.create.

Configuring an Action log widget

Configure an Action log widget that displays 10 entries of action operation details, sorted by time (in ascending order). In addition, display details only for those action operations that attempted to send an email to user "1", but were unsuccessful.

Request:

{
           "jsonrpc": "2.0",
           "method": "dashboard.create",
           "params": {
               "name": "My dashboard",
               "display_period": 30,
               "auto_start": 1,
               "pages": [
                   {
                       "widgets": [
                           {
                               "type": "actionlog",
                               "name": "Action log",
                               "x": 0,
                               "y": 0,
                               "width": 12,
                               "height": 5,
                               "view_mode": 0,
                               "fields": [
                                   {
                                       "type": 0,
                                       "name": "show_lines",
                                       "value": 10
                                   },
                                   {
                                       "type": 0,
                                       "name": "sort_triggers",
                                       "value": 3
                                   },
                                   {
                                       "type": 11,
                                       "name": "userids.0",
                                       "value": 1
                                   },
                                   {
                                       "type": 13,
                                       "name": "mediatypeids.0",
                                       "value": 1
                                   },
                                   {
                                       "type": 0,
                                       "name": "statuses.0",
                                       "value": 2
                                   }
                               ]
                           }
                       ]
                   }
               ],
               "userGroups": [
                   {
                       "usrgrpid": 7,
                       "permission": 2
                   }
               ],
               "users": [
                   {
                       "userid": 1,
                       "permission": 3
                   }
               ]
           },
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "dashboardids": [
                   "3"
               ]
           },
           "id": 1
       }

See also