Ad Widget

Collapse

Cannot import template - wrong dashboard width

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StormScorpion
    Junior Member
    • Feb 2024
    • 22

    #1

    Cannot import template - wrong dashboard width

    Hi,

    I try to adopt my custom templates regarding the changes on the official 7.0 templates. So I use a diff between the latest Zabbix template ans my templates and modify my templates when there are changes than seems worth it.
    So I changed some dashboard/widget settings from the default template. Only my template and item names are different, all other dashboard settings are the same.

    When I import the template into Zabbix it tells me:
    Invalid parameter "/1/pages/1/widgets/1/width": value must be one of 1-72.
    The template.yml width is set to 36, the Zabbix preview shows with 108. Why? Where comes this width from? Tested with Zabbix 7.0.3.

    Template code in template.yml:
    Code:
          dashboards:
            - uuid: 1d688ac169c7404c900054194012da3f
              name: 'Oracle Performance'
              pages:
                - widgets:
                    - type: graph
                      width: '36'
                      height: '5'
                      fields:
                        - type: GRAPH
                          name: graphid.0
                          value:
                            host: my_oracle_by_zabbix_agent_2
                            name: 'Oracle: Cache Hit Ratios'
                        - type: STRING
                          name: reference
                          value: AAAAA
                    - type: graph
                      'y': '5'
                      width: '36'
                      height: '5'
                      fields:
                        - type: GRAPH
                          name: graphid.0
                          value:
                            host: my_oracle_by_zabbix_agent_2
                            name: 'Oracle: Physical Read\Write Rate'
                        - type: STRING
                          name: reference
                          value: AAAAC
    Template code shown by Zabbix during import:
    Code:
    dashboards:
    
    + name: 'Oracle Performance'
    
    + pages:
    
    + - widgets:
    
    + - type: graph
    
    + width: '108'
    
    + height: '5'
    
    + fields:
    
    + - type: GRAPH
    
    + name: graphid.0
    
    + value:
    
    + host: xxx_oracle_by_zabbix_agent_2
    
    + name: 'Oracle: Cache Hit Ratios'
    
    + - type: STRING
    
    + name: reference
    
    + value: AAAAA
    
    + - type: STRING
    
    + name: reference
    
    + value: AAAAA
    
    + - type: graph
    
    + 'y': '5'
    
    + width: '108'
    
    + height: '5'
    
    + fields:
    
    + - type: GRAPH
    
    + name: graphid.0
    
    + value:
    
    + host: xxx_oracle_by_zabbix_agent_2
    
    + name: 'Oracle: Physical Read\Write Rate'
    
    + - type: STRING
    
    + name: reference
    
    + value: AAAAC
    
    + - type: STRING
    
    + name: reference
    
    + value: AAAAB
    ​
  • Answer selected by StormScorpion at 20-08-2024, 09:29.
    StormScorpion
    Junior Member
    • Feb 2024
    • 22

    Works with
    Code:
    zabbix_export:
      version: '7.0'
    ​

    Comment

    • StormScorpion
      Junior Member
      • Feb 2024
      • 22

      #2
      Works with
      Code:
      zabbix_export:
        version: '7.0'
      ​

      Comment

      Working...