manual:xml_export_import:screens

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
manual:xml_export_import:screens [2016/10/04 10:42]
martins-v created; screen export/import
manual:xml_export_import:screens [2020/08/06 08:24] (current)
martins-v export to yaml (ZBXNEXT-2754)
Line 16: Line 16:
  
 {{:​manual:​xml_export_import:​export_screens.png|}} {{:​manual:​xml_export_import:​export_screens.png|}}
 +
 +Depending on the selected format, screens are exported to a local file with a default name:
 +
 +  * //​zabbix_export_screens.yaml//​ - in YAML export (default option for export)
 +  * //​zabbix_export_screens.xml//​ - in XML export
 +  * //​zabbix_export_screens.json//​ - in JSON export
  
 === Importing === === Importing ===
Line 23: Line 29:
   * Go to: //​Monitoring//​ -> //Screens//   * Go to: //​Monitoring//​ -> //Screens//
   * Click on //Import// to the right    * Click on //Import// to the right 
-  * Mark the required options ​and click on //Import//+  ​* Select the import file 
 +  ​* Mark the required options ​in import rules 
 +  * Click on //Import//
  
 {{:​manual:​xml_export_import:​import_screens.png|}} {{:​manual:​xml_export_import:​import_screens.png|}}
 +
 +All mandatory input fields are marked with a red asterisk.
 +
 +A success or failure message of the import will be displayed in the frontend.
 +
 +Import rules:
 +
 +^Rule^Description^
 +|//Update existing// ​ |Existing screens will be updated with data taken from the import file. Otherwise they will not be updated. ​ |
 +|//Create new//      |The import will add new screens using data from the import file. Otherwise it will not add them.  |
 +
 +=== Export format ===
 +
 +Exporting a small screen with two graphs taking up the first row of the screen to YAML: 
 +
 +<code yaml>
 +---
 +zabbix_export:​
 +  version: "​5.0"​
 +  date: "​2020-08-06T08:​18:​59Z"​
 +  screens:
 +  - name: Zabbix server
 +    hsize: "​2"​
 +    vsize: "​1"​
 +    screen_items:​
 +    - resourcetype:​ "​0"​
 +      width: "​500"​
 +      height: "​100"​
 +      x: "​0"​
 +      "​y":​ "​0"​
 +      colspan: "​1"​
 +      rowspan: "​1"​
 +      elements: "​0"​
 +      valign: "​0"​
 +      halign: "​0"​
 +      style: "​0"​
 +      url: ""​
 +      dynamic: "​0"​
 +      sort_triggers:​ "​0"​
 +      resource:
 +        name: CPU jumps
 +        host: Zabbix server
 +      max_columns:​ "​3"​
 +      application:​ ""​
 +    - resourcetype:​ "​0"​
 +      width: "​500"​
 +      height: "​100"​
 +      x: "​1"​
 +      "​y":​ "​0"​
 +      colspan: "​1"​
 +      rowspan: "​1"​
 +      elements: "​0"​
 +      valign: "​0"​
 +      halign: "​0"​
 +      style: "​0"​
 +      url: ""​
 +      dynamic: "​0"​
 +      sort_triggers:​ "​0"​
 +      resource:
 +        name: CPU utilization
 +        host: Zabbix server
 +      max_columns:​ "​3"​
 +      application:​ ""​
 +...
 +</​code>​
 +
 +=== Element tags ===
 +
 +Element tag values are explained in the table below.
 +
 +^Element^Element property^Type^Range^Description^
 +|screens ​          ​| ​                    ​| ​ |  |  |
 +|                  |name                 ​|''​string'' ​ |  |Unique screen name.  |
 +|                  |hsize ​               |''​integer'' ​ |  |Horizontal size, number of columns. ​ |
 +|                  |vsize ​               |''​integer'' ​ |  |Vertical size, number of rows.  |
 +^  ^  ^  ^  ^  ^
 +|screen_items ​     |                     ​| ​ |  |  |
 +|                  |resourcetype ​        ​|''​integer'' ​ |0 - graph\\ 1 - simple graph\\ 2 - map\\ 3 - plain text\\ 4 - host info\\ 5 - trigger info\\ 6 - server info\\ 7 - clock\\ 9 - trigger overview\\ 10 - data overview\\ 11 - URL\\ 12 - history of actions\\ 13 - history of events\\ 14 - host group issues\\ 15 - problems by severity\\ 16 - host issues\\ 19 - simple graph prototype\\ 20 - graph prototype\\ ​ |Resource type.  |
 +|                  |width ​               |''​integer'' ​ |  |Width of the screen item (in pixels) if '​resourcetype'​ is 0, 1, 7, 11, 19 or 20.  |
 +|                  |height ​              ​|''​integer'' ​ |  |Height of the screen item (in pixels) if '​resourcetype'​ is 0, 1, 7, 11, 19 or 20.  |
 +|                  |x                    |''​integer'' ​ |  |X-coordinates of the screen item on the screen, from left to right.\\ '​0'​ means start from first column. ​ |
 +|                  |y                    |''​integer'' ​ |  |Y-coordinates of the screen item on the screen, from top to bottom.\\ '​0'​ means start from first row.  |
 +|                  |colspan ​             |''​integer'' ​ |  |Number of columns the screen item will span across. ​ |
 +|                  |rowspan ​             |''​integer'' ​ |  |Number or rows the screen item will span across. ​ |
 +|                  |elements ​            ​|''​integer'' ​ |  |Number of lines to display on the screen item if '​resourcetype'​ is 3, 12, 13, 14 or 16.  |
 +|                  |valign ​              ​|''​integer'' ​ |0 - middle (default)\\ 1 - top\\ 2 - bottom ​ |Vertical alignment. ​ |
 +|                  |halign ​              ​|''​integer'' ​ |0 - center (default)\\ 1 - left\\ 2 - right  |Horizontal alignment. ​ |
 +|                  |style ​               |''​integer'' ​ |0 - plain text\\ 1 - HTML  |Option of displaying screen item if '​resourcetype'​ is 3.  |
 +|:::               ​|::: ​                 |''​integer'' ​ |0 - local time\\ 1 - server time\\ 2 - host time  |Option of displaying screen item if '​resourcetype'​ is 7.  |
 +|:::               ​|::: ​                 |''​integer'' ​ |0 - horizontal\\ 1 - vertical ​ |Option of displaying screen item if '​resourcetype'​ is 4,5.  |
 +|:::               ​|::: ​                 |''​integer'' ​ |0 - left side\\ 1 - top  |Option of displaying screen item if '​resourcetype'​ is 9,10.  |
 +|                  |url                  |''​string'' ​ |  |Link URL if '​resourcetype'​ is 11.  |
 +|                  |dynamic ​             |''​integer'' ​ |0 - no\\ 1 - yes  |Make screen item dynamic if '​resourcetype'​ is 0, 1, 3, 19 or 20.  |
 +|                  |sort_triggers ​       |''​integer'' ​ |0 - last change (descending)\\ 1 - severity (descending)\\ 2 - host (ascending) ​ |Option to sort triggers by if '​resourcetype'​ is 14,​16. ​ |
 +|:::               ​|::: ​                 |''​integer'' ​ |3 - time (ascending)\\ 4 - time (descending)\\ 5 - type (ascending)\\ 6 - type (descending)\\ 7 - status (ascending)\\ 8 - status (descending)\\ 9 - retries left (ascending)\\ 10 - retries left (descending)\\ 11 - recipient (ascending)\\ 12 - recipient (descending) ​ |Option to sort triggers by if '​resourcetype'​ is 12.  |
 +|                  |max_columns ​         |''​integer'' ​ |  |In how many columns generated graphs should be displayed in the screen cell if '​resourcetype'​ is 19 or 20.\\ Useful when there are many LLD-generated graphs. ​ |
 +|                  |application ​         |''​string'' ​ |  |Filter by application name if '​resourcetype'​ is 9 or 10.  |
 +^  ^  ^  ^  ^  ^
 +|resource ​         |                     ​| ​ |  |  |
 +|                  |name                 ​|''​string'' ​ |  |Resource name.  |
 +|                  |host                 ​|''​string'' ​ |  |Resource host.  |