[ZBX-19695] Trigger Prototype Editing not working. - Host "x" does not exist or you have no access to this host. Created: 2021 Jul 16  Updated: 2023 May 19  Resolved: 2021 Aug 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.4.2
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sebastian Assignee: Aleksey Volodin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 18, Zabbix 5.4.2


Attachments: PNG File Disk1.PNG     PNG File Error.PNG     PNG File Expression Constructor-Error.png     PNG File Trigger Prototypes.PNG     XML File compellent.xml     Text File debug.txt     GIF File gif.gif     PNG File image-2021-07-20-10-41-34-388.png     PNG File image-2021-07-21-23-59-00-349.png     PNG File image-2022-03-16-17-25-02-114.png     PNG File image-2022-03-16-17-27-30-911.png     PNG File image-2022-03-16-18-05-56-817.png     PNG File image-2022-03-16-18-06-18-085.png     PNG File success-1.png     PNG File success.png     PNG File template-compellent-problem.PNG     PNG File template-windows-problem.PNG     XML File windows-active.xml    

 Description   

Hello, 

I have noticed problem with editing trigger prototype. 

There is error visible: 

Incorrect trigger prototype expression. Host "Template_Dell_Compellent_ZBX_248" does not exist or you have no access to this host.

 

For Example I have used Compellent Template.

 

The problem looks that Zabbix is unable to recognize Template Name as Host user in Trigger Prototype Expression.

 

All changes are performed with account with Super Administrator Permissions.

 

Steps to reproduce:

  1.  I want to change name of the trigger ( simple change , just name, but other changes also does not work)
  2. Go to Template/ Discovery Rules / Select "Trigger Prototypes" 
  3. Try to edit any of Trigger Prototype.
  4. After Clicking Update Error is visible. 

I have also tried to export template, make changes in XML, and import, - the same result. 

Result:
See screenshot...

Expected:
Possibility to Edit trigger prototypes without errors.

 

 



 Comments   
Comment by Sebastian [ 2021 Jul 16 ]

Other Templates are also affected with this problem,  All Trigger Prototypes in all Templates are unavailable for editing. 

Comment by Aleksey Volodin [ 2021 Jul 17 ]

Hello Kendzens !

Thank you for reporting the issue, but we will need some extra details to eliminate the root cause of the problem.

Could you please login as Admin user and try again repeat steps to reproduce?

Comment by Sebastian [ 2021 Jul 18 ]

@Aleksey Volodin

Hello Aleksey, I have just tried with Admin account, 

The Result is the same. 

 

I have also found another Template, where Editing just works fine.  ( results are the sae for "Admin" and also personal administrative LDAP Account)

 

 

 

Is there anything worth checking to isolate the root cause of the issue?

 

Best Regards

Sebastian

Comment by Aleksey Volodin [ 2021 Jul 19 ]

Can you please export template, that you can not edit and attach it here?

Comment by Sebastian [ 2021 Jul 19 ]

Here are two example templates.

 

one for Compellent, and another for Windows. and also screenshots of positions causing errors. 

compellent.xmlwindows-active.xml

 

 

 

Comment by Sebastian [ 2021 Jul 20 ]

I have checked permissions and it looks like shown on image below. 

One of the group is "Templates" group and it is containing templates, 

Users that i have tested to edit templates have R/W permissions to all groups (including subgroups) 

 

And users have also assigned "Super admin role" Role. 

Comment by Aleksey Volodin [ 2021 Jul 20 ]

Can you please add Admin user and you other user what have problem to Debug user group, and then try to edit trigger prototype once again?

Press DEBUG button on page with error. Then attach log here as file please.

Comment by Aleksey Volodin [ 2021 Jul 21 ]

Possible some kind of - https://support.zabbix.com/browse/ZBX-15488

Comment by Sebastian [ 2021 Jul 22 ]
  • I have added user to debug enabled group
  • Following Error is visible now. 

  • Incorrect trigger prototype expression. Host "Template OS Windows - Active" does not exist or you have no access to this host. [trigger_prototypes.php:345 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTriggerPrototype->update() → CTriggerGeneral->validateUpdate() → CTriggerGeneral->populateHostIds() → CApiService::exception() in include/classes/api/services/CTriggerGeneral.php:589]

 

Upgraded to 5.4.3 - result is the same with visible error. 

Comment by Sebastian [ 2021 Jul 22 ]

debug.txtAnd also Debug file

Comment by Aleksey Volodin [ 2021 Jul 23 ]

Can you please specify do you using clean install Zabbix 5.4.2 or it was updated from previous version?

Comment by Sebastian [ 2021 Jul 23 ]

Hello,

I have installed version 4.0 and followed several upgrades,  4.0>4,4 ,4.4>5.0, 5.0>5.4

I know for sure triggger prototypes was editable on 5.0, I have created and modified many of them (templates) on version 5.0.

Problem with editing trigger prototypes appeared after upgrade to 5.4

Comment by Aleksey Volodin [ 2021 Jul 23 ]

Thank you for providing the requested information. We will need a bit of time to analyze and reproduce the issue, but will get back to you with an update at the earliest.

Comment by Sebastian [ 2021 Aug 02 ]

Hello, 

Could you please reopen this Issue?

Comment by Sebastian [ 2021 Aug 02 ]

I have found out new information:

Once I export template that cannot edit to XML, and next try to import the same template.  I got the same error.

 

It looks like some kind of permission issue. 

Is there any way to rewrite permissions?

 

 

Comment by Sebastian [ 2021 Aug 02 ]

Hello Aleksey,

Good news.

I was able to import provided template without issues. 

But, using new template is no solution for me. - too much environmental( and app teams requirements) tuning was done by me to current used templates. 

 

Hopefully I was able to fix my problem with Compellent Template:

Steps to fix :

  1. Export Problematic template
  2. Delete template from Zabbix
  3. Import exported file

 

and it is working fine I think

I have not tested all functions but now I can edit trigger prototypes. 

Assume there was some issues created in Zabbix database during upgrade to 5.4 

 

 

Comment by Sebastian [ 2021 Aug 02 ]

I was able to fix another template : Windows Active. 

 

Steps took to fix the template:

1.Rename Template to Windows Active2

2.Rename it Back to Windows Active

I think we can close as resolved.

Thank you for your time and your Support.

 

Comment by Dennis Whitney [ 2022 Mar 17 ]

Not sure why this was closed out as the work around is hacky at best.

In any case, I'm having the exact same issues mentioned in this issue. However, my template is brand new created in v5.4.11 and will not allow me to save a discovery template to a host if it has a trigger prototype. It errors out with the hostname that is already assigned to the template.

If I remove the template from said host and then try to add it back it will fail out with the same error referencing the same host (while on the host's config interface)

What information can I provide to help troubleshoot this?

Comment by Dennis Whitney [ 2022 Mar 17 ]

Comment by Dennis Whitney [ 2022 Mar 17 ]

Don't mean to continually spam this board but I'm playing around with this in my lab. Here is what I've observed so far.

 

Did not work:

  • Template will save with a trigger prototype if said template is not assigned.
  • If template is assigned to host and a trigger prototype added will fail.
  • Tried to rename template and name it back.
  • Tried to export template, delete and clear, import template.
  • Tried different hosts already registered before our 5.4.6-5.4.11 upgrade
  • Tried simple names with LDD macro in expression in prototype. My prototype does have a LDD macro in the name
  • Tried even more simple naming with zero LDD or user macros

 

Here is what did work:

  • Adding a brand new host and then adding same template was fine
  • Renaming the host's `name` field to something else and then back to the normal name allowed template to be added later

 

Not sure what changed exactly.

However, when trying to run some similar queries from the database I noticed that old hosts have some kind of hidden characters in the `host` field. After the host is renamed those hidden characters are gone. In the UI before I made a change there were no extra spaces or characters I could see there.

 

Before hostname rename:

After hostname rename

Comment by Dennis Whitney [ 2022 Aug 09 ]

This is still an issue in 6.2 and this ticket is still closed.

Comment by Evren Yurtesen [ 2023 May 19 ]

I also hit this with 6.0 LTS now...

Generated at Wed Jul 30 04:11:06 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.