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.

Parametertypenamevalue
Refresh interval0rf_rate0 - (default) No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - 15 minutes.
SLA
(required)
10slaidSLA ID.
Service9serviceidService ID.
Show periods0show_periodsValid values range from 1-100.

Default: 20.
From1date_fromValid 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.
To1date_toValid 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.

Examples

The following examples aim to only describe the configuration of the dashboard widget field objects for the SLA report widget. For more information on configuring a dashboard, see 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:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "dashboard.create",
  4. "params": {
  5. "name": "My dashboard",
  6. "display_period": 30,
  7. "auto_start": 1,
  8. "pages": [
  9. {
  10. "widgets": [
  11. {
  12. "type": "slareport",
  13. "name": "SLA report",
  14. "x": 0,
  15. "y": 0,
  16. "width": 12,
  17. "height": 5,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 10,
  22. "name": "slaid",
  23. "value": 4
  24. },
  25. {
  26. "type": 9,
  27. "name": "serviceid",
  28. "value": 2
  29. },
  30. {
  31. "type": 1,
  32. "name": "date_from",
  33. "value": "now-30d"
  34. },
  35. {
  36. "type": 1,
  37. "name": "date_to",
  38. "value": "now"
  39. }
  40. ]
  41. }
  42. ]
  43. }
  44. ],
  45. "userGroups": [
  46. {
  47. "usrgrpid": 7,
  48. "permission": 2
  49. }
  50. ],
  51. "users": [
  52. {
  53. "userid": 1,
  54. "permission": 3
  55. }
  56. ]
  57. },
  58. "id": 1
  59. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "dashboardids": [
  5. "3"
  6. ]
  7. },
  8. "id": 1
  9. }

See also