This is a translation of the original English documentation page. Help us make it better.

19 SLA report

Description

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

Parameters

The following parameters are supported for the SLA report widget.

Parameter type name value
Refresh interval 0 rf_rate 0 - (default) No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - 15 minutes.
SLA
(required)
10 slaid SLA ID.
Service 9 serviceid Service ID.
Show periods 0 show_periods Valid values range from 1-100.

Default: 20.
From 1 date_from Valid date string in format YYYY-MM-DD.
Relative dates with modifiers d, w, M, y (e.g. now, now/d, now/w-1w, etc.) are supported.
To 1 date_to Valid date string in format YYYY-MM-DD.
Relative dates with modifiers d, w, M, y (e.g. now, now/d, now/w-1w, etc.) are supported.

次の例は、SLA reportウィジェットのダッシュボードウィジェットフィールドオブジェクトの設定を説明することだけを目的としています。 ダッシュボードの設定の詳細については、dashboard.createを参照してください。

Configuring an SLA report widget

Configure an SLA report widget that displays the SLA report for SLA "4" service "2" for the period of last 30 days.

Request:

{
           "jsonrpc": "2.0",
           "method": "dashboard.create",
           "params": {
               "name": "My dashboard",
               "display_period": 30,
               "auto_start": 1,
               "pages": [
                   {
                       "widgets": [
                           {
                               "type": "slareport",
                               "name": "SLA report",
                               "x": 0,
                               "y": 0,
                               "width": 12,
                               "height": 5,
                               "view_mode": 0,
                               "fields": [
                                   {
                                       "type": 10,
                                       "name": "slaid",
                                       "value": 4
                                   },
                                   {
                                       "type": 9,
                                       "name": "serviceid",
                                       "value": 2
                                   },
                                   {
                                       "type": 1,
                                       "name": "date_from",
                                       "value": "now-30d"
                                   },
                                   {
                                       "type": 1,
                                       "name": "date_to",
                                       "value": "now"
                                   }
                               ]
                           }
                       ]
                   }
               ],
               "userGroups": [
                   {
                       "usrgrpid": 7,
                       "permission": 2
                   }
               ],
               "users": [
                   {
                       "userid": 1,
                       "permission": 3
                   }
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

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

参照