24 Web monitoring

Description

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

Parameters

The following parameters are supported for the Web monitoring 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.
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 hosts in maintenance0maintenance0 - Disabled;
1 - (default) Enabled.

Examples

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

Configuring a Web monitoring widget

Configure a Web monitoring widget that displays a status summary of the active web monitoring scenarios for host group “4”.

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": "web",
  13. "name": "Web monitoring",
  14. "x": 0,
  15. "y": 0,
  16. "width": 6,
  17. "height": 3,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 2,
  22. "name": "groupids",
  23. "value": 4
  24. }
  25. ]
  26. }
  27. ]
  28. }
  29. ],
  30. "userGroups": [
  31. {
  32. "usrgrpid": 7,
  33. "permission": 2
  34. }
  35. ],
  36. "users": [
  37. {
  38. "userid": 1,
  39. "permission": 3
  40. }
  41. ]
  42. },
  43. "id": 1
  44. }

Response:

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

See also