[ZBX-22963] Export of templates does not include template dashboards Created: 2023 Jun 14  Updated: 2023 Jun 22

Status: Reopened
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 6.4.3
Fix Version/s: None

Type: Problem report Priority: Major
Reporter: Robin Roevens Assignee: Elina Kuzyutkina (Inactive)
Resolution: Unresolved Votes: 0
Labels: API, Export, template
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SUSE Linux Enterprise Server 15 SP4 - kernel 5.14.21-150400.24.63-default
Zabbix 6.4.3 from official repo's
PostgreSQL 15.1 + TimescaleDB 2.9.3
Apache 2.4.51 + php-fpm 7.4.33


Attachments: PNG File Zabbix_User_Group_Template_permissions.png     PNG File Zabbix_User_Role_Permissions_pt1.png     PNG File Zabbix_User_Role_Permissions_pt2.png     PNG File Zabbix_User_Role_Permissions_pt3.png     PNG File Zabbix_User_permissions.png     PNG File apache_by_zabbix_agent_dashboard_properties.png     PNG File apache_by_zabbix_agent_dashboards_view.png     File template_export_as_superadmin.json     File template_export_as_user.json    
Issue Links:
Duplicate
duplicates ZBX-19202 Host dashboard is unavailable for use... Closed

 Description   

I noticed, after upgrading from 6.2 to 6.4 that many templates we automatically export from zabbix using the api call configuration.export, no longer contain dashboards in the export files, while they still do have template dashboards defined within Zabbix.
Some templates still do export their dashboards and I do not find why some don't export their dashboards while others still do.

The export is normaly done with a read-only api user, but the problem remains exactly the same when using an admin api user. When I try the same with a super admin user, all dashboards seem to be included correctly in template exports.

When an export is done manually using the Zabbix web interface the problem is the same.

Steps to reproduce:

  1. Ensure you have a user with Read rights on all templates
  2. Ensure you have templates with dashboards defined
  3. Export all templates in any format

Result:

Some exported templates are missing a "dashboards" section while they do have one or more dashboard defined.

Expected:
All template dashboards defined in Zabbix are also present in the export files.



 Comments   
Comment by Robin Roevens [ 2023 Jun 14 ]

Add template export as returned by API call:

{
    "jsonrpc": "2.0",
    "method": "configuration.export",
    "params": {
        "format": "json",
        "prettyprint": false,
        "options": {
            "templates": [ 14419 ]
        }
    },
    "id": 1
} 

both as Read-only user and as SuperAdmin. Notice the dashboards section missing in the export as user.
See attached files: template_export_as_user.json and template_export_as_superadmin.json

Comment by Elina Kuzyutkina (Inactive) [ 2023 Jun 19 ]

Hi,
Please confirm (share the screenshots if possible) for read-only users role configuration and his access rights via groups

Regards, Elina

Comment by Robin Roevens [ 2023 Jun 19 ]

Added requested screenshots of User permissions:

 ,

User group permissions on template level

, User Role permissions.

Comment by Elina Kuzyutkina (Inactive) [ 2023 Jun 21 ]

I am sorry, one more question: please share dashboards configuration window. I am interested in Sharing parameters

Regards, Elina

Comment by Robin Roevens [ 2023 Jun 21 ]

Not sure what you mean? This is about dashboards included in templates (former screens) and in contrary to global dashboards, I don't find any sharing parameters for them ? For as far as I know I can't set dashboard specific permissions within a template ?
This is the overview of all dashboards within the template Apache by Zabbix agent:

And these are all settings I see for this one dashboard:

Am I missing something ?

And as you can see in template_export_as_user.json this dashboard is not exported when the template is exported as read-only user and in template_export_as_superadmin.json you see that this dashboard does get included when the template is exported by a superadmin user.

Generated at Sun Apr 06 16:41:08 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.