16 Problem hosts

Description

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

Parameters

The following parameters are supported for the Problem hosts 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.
Host groups2groupidsHost group ID.

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

Note: To exclude 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.
Problem1problemProblem event name (case insensitive, full name or part of it).
Severity0severities0 - Not classified;
1 - Information;
2 - Warning;
3 - Average;
4 - High;
5 - Disaster.

Default: 1, 2, 3, 4, 5 (all enabled).

Note: To configure multiple values, create a dashboard widget field object for each value.
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 Tag name 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 Operator required if configuring Tags.
Tag value1tags.value.0Any string value.

Parameter Tag value required if configuring Tags.
Show suppressed problems0show_suppressed0 - (default) Disabled;
1 - Enabled.
Hide groups without problems0hide_empty_groups0 - (default) Disabled;
1 - Enabled.
Problem display0ext_ack0 - (default) All;
1 - Unacknowledged only;
2 - Separated.

Examples

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

Configuring a Problem hosts widget

Configure a Problem hosts widget that displays hosts from host groups “2” and “4” that have problems with a name that includes the string “CPU” and that have the following severities: “Warning”, “Average”, “High”, “Disaster”.

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": "problemhosts",
  13. "name": "Problem hosts",
  14. "x": 0,
  15. "y": 0,
  16. "width": 12,
  17. "height": 5,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 2,
  22. "name": "groupids",
  23. "value": 2
  24. },
  25. {
  26. "type": 2,
  27. "name": "groupids",
  28. "value": 4
  29. },
  30. {
  31. "type": 1,
  32. "name": "problem",
  33. "value": "cpu"
  34. },
  35. {
  36. "type": 0,
  37. "name": "severities",
  38. "value": 2
  39. },
  40. {
  41. "type": 0,
  42. "name": "severities",
  43. "value": 3
  44. },
  45. {
  46. "type": 0,
  47. "name": "severities",
  48. "value": 4
  49. },
  50. {
  51. "type": 0,
  52. "name": "severities",
  53. "value": 5
  54. }
  55. ]
  56. }
  57. ]
  58. }
  59. ],
  60. "userGroups": [
  61. {
  62. "usrgrpid": 7,
  63. "permission": 2
  64. }
  65. ],
  66. "users": [
  67. {
  68. "userid": 1,
  69. "permission": 3
  70. }
  71. ]
  72. },
  73. "id": 1
  74. }

Response:

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

See also