[ZBX-13732] Cannot disable linked template items through parent template if host assigned Created: 2018 Apr 11  Updated: 2024 Apr 10  Resolved: 2018 Jun 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.4.8, 3.4.9
Fix Version/s: 3.4.12rc1, 4.0 (plan)

Type: Problem report Priority: Major
Reporter: Aigars Kadikis Assignee: Andrejs Griščenko
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File cannot-disable-linked-template-items-if-host-assigned.mp4     PNG File cannot-disable-linked-template-items-if-host-assigned.png     Text File result.log    
Issue Links:
Duplicate
is duplicated by ZBX-14516 Error while update discovery rule in ... Closed
is duplicated by ZBX-14443 Cannot update item - Cannot find host... Closed
Team: Team B
Team: Team B
Sprint: Sprint 35, Sprint 36, Sprint 37
Story Points: 1

 Description   

Steps to reproduce:
1) Create template "test" and link existing "Template Module ICMP ping" to it.
2) Assign "test" template to host.
3) Go to "test" template and disable item which actually belongs to linked template.
(see video)

Result:
See result.log

Expected:
It would be nice for ability to disable linked template items through parent template if there is existing hosts already assigned to template.

Some good news: it is possible to disable linked template item through parent template if there is no hosts assigned to template.



 Comments   
Comment by richlv [ 2018 Apr 11 ]

error message for easier searching :

Undefined index: type [items.php:1024 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CItem->update() → CItem->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1024]
    Undefined index: type [items.php:1024 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CItem->update() → CItem->inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:1025]
    array_key_exists(): The first argument should be either a string or an integer [items.php:1024 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CItem->update() → CItem->inherit() → CItemGeneral->prepareInheritedItems() → CItemGeneral::findInterfaceForItem() → array_key_exists() in include/classes/api/services/CItemGeneral.php:696]
    Cannot find host interface on "Zabbix Server" for item key "icmpping".
Comment by Aymeric Alibert [ 2018 Jun 06 ]

We are getting the same issue since our migration to Zabbix 3.4.8. We can't make changes to discovery or enable/disable items from templates anymore.

We have to make all our changes at host level. Which is almost impossible when you have hundreds of hosts using the same template.

Is there any know workaround until this is fixed?

Thanks,

Aymeric

 

Comment by richlv [ 2018 Jun 06 ]

While the information on which version introduced the regression is missing, you can try the 3.4.7 frontend. You don't have to do full downgrade - just place that version of the frontend in another directory and point it at the same DB; then you can use this older version purely for the enabling/disabling purpose.

If some other version introduced the problem, you can step back in 3.4.x versions until you find one that works for you; the easiest way to do so might be from svn.

Comment by Aymeric Alibert [ 2018 Jun 07 ]

Thanks for the suggestion, I think I still have an archive of our 3.4.6 frontend.  I will fire it up on one of our box and see if that helps.

Thanks again,

 

Aymeric

Comment by Andrejs Griščenko [ 2018 Jun 19 ]

(1) No translation strings changes.

iivs CLOSED

Comment by Andrejs Griščenko [ 2018 Jun 29 ]

FIxed in 3.4.12rc1 r82379

Generated at Fri Apr 19 14:14:07 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.