11 Host availability

Description

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

Parameters

The following parameters are supported for the Host availability widget.

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

Note: To configure multiple host groups, create a dashboard widget field object for each host group.
Interface type0interface_type0 - None;
1 - Zabbix agent;
2 - SNMP;
3 - IPMI;
4 - JMX.

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

Note: To configure multiple values, create a dashboard widget field object for each value.
Layout0layout0 - (default) Horizontal;
1 - Vertical.
Show hosts in maintenance0maintenance0 - (default) Disabled;
1 - Enabled.

Examples

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

Configuring a Host availability widget

Configure a Host availability widget that displays availability information (in a vertical layout) for hosts in host group “4” with “Zabbix agent” and “SNMP” interfaces configured.

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": "hostavail",
  13. "name": "Host availability",
  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. "type": 0,
  27. "name": "interface_type",
  28. "value": 1
  29. },
  30. {
  31. "type": 0,
  32. "name": "interface_type",
  33. "value": 2
  34. },
  35. {
  36. "type": 0,
  37. "name": "layout",
  38. "value": 1
  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