22 Trigger overview

Description

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

Parameters

The following parameters are supported for the Trigger Overview widget.

Parametertypenamevalue
Refresh interval0rf_rate0 - No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - (default) 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - 15 minutes.
Show0show1 - (default) Recent problems;
2 - Any;
3 - Problems.
Host groups2groupidsHost group ID.

Note: To configure multiple host groups, create a dashboard widget field object for each host group.
Hosts3hostidsHost ID.

Note: To configure multiple hosts, create a dashboard widget field object for each host. For multiple hosts, the parameter Host groups must either be not configured at all or configured with at least one host group that the configured hosts belong to.
Tags (the number in the property name (e.g. tags.tag.0) references tag order in the tag evaluation list)
Evaluation type0evaltype0 - (default) And/Or;
2 - Or.
Tag name1tags.tag.0Any string value.

Parameter behavior:
- required if configuring Tags
Operator0tags.operator.00 - Contains;
1 - Equals;
2 - Does not contain;
3 - Does not equal;
4 - Exists;
5 - Does not exist.

Parameter behavior:
- required if configuring Tags
Tag value1tags.value.0Any string value.

Parameter behavior:
- required if configuring Tags
Show suppressed problems0show_suppressed0 - (default) Disabled;
1 - Enabled.
Hosts location0style0 - (default) Left;
1 - Top.

Examples

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

Configuring a Trigger overview widget

Configure a Trigger overview widget that displays trigger states for all host groups that have triggers with a tag that has the name “scope” and contains value “availability”.

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": "trigover",
  13. "name": "Trigger overview",
  14. "x": 0,
  15. "y": 0,
  16. "width": 12,
  17. "height": 5,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 1,
  22. "name": "tags.tag.0",
  23. "value": "scope"
  24. },
  25. {
  26. "type": 0,
  27. "name": "tags.operator.0",
  28. "value": 0
  29. },
  30. {
  31. "type": 1,
  32. "name": "tags.value.0",
  33. "value": "availability"
  34. }
  35. ]
  36. }
  37. ]
  38. }
  39. ],
  40. "userGroups": [
  41. {
  42. "usrgrpid": 7,
  43. "permission": 2
  44. }
  45. ],
  46. "users": [
  47. {
  48. "userid": 1,
  49. "permission": 3
  50. }
  51. ]
  52. },
  53. "id": 1
  54. }

Response:

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

See also