15 Plain text

Description

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

Parameters

The following parameters are supported for the Plain text 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.
Items
(required)
4itemidsItem ID.

Note: To configure multiple items, create a dashboard widget field object for each item.
Items location0style0 - (default) Left;
1 - Top.
Show lines0show_linesValid values range from 1-100.

Default: 25.
Show text as HTML0show_as_html0 - (default) Disabled;
1 - Enabled.
Enable host selection0dynamic0 - (default) Disabled;
1 - Enabled.

Examples

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

Configuring a Plain text widget

Configure a Plain text widget that displays latest data for items “42269” and “42253”. In addition, configure the item names to be located at the top of the data columns, and only 15 lines of data to be displayed.

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": "plaintext",
  13. "name": "Plain text",
  14. "x": 0,
  15. "y": 0,
  16. "width": 6,
  17. "height": 3,
  18. "view_mode": 0,
  19. "fields": [
  20. {
  21. "type": 4,
  22. "name": "itemids",
  23. "value": 42269
  24. },
  25. {
  26. "type": 4,
  27. "name": "itemids",
  28. "value": 42253
  29. },
  30. {
  31. "type": 0,
  32. "name": "style",
  33. "value": 1
  34. },
  35. {
  36. "type": 0,
  37. "name": "show_lines",
  38. "value": 15
  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