[ZBXNEXT-551] Display a message when action is disabled automatically when we delete something it references Created: 2010 Nov 04  Updated: 2024 Feb 01

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 1.8.2, 1.8.3, 1.8.4, 2.0.0
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: Simon Assignee: Unassigned
Resolution: Unresolved Votes: 21
Labels: actions, conditions, consistency, unsquashable, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBXNEXT-7079 Add a warning on a Frontend object de... Closed
is duplicated by ZBXNEXT-1697 Notifications when deleting objects u... Closed
is duplicated by ZBXNEXT-1948 Issue a warning when deleting a trigg... Closed
is duplicated by ZBXNEXT-8982 Host group deleteing causes trigger a... Closed
is duplicated by ZBX-16687 Action is deactivated if hostgroup is... Closed
is duplicated by ZBX-10863 action disable auto at zabbix 3.0.3 Closed
is duplicated by ZBX-22477 No info in Audit log from System user... Closed

 Description   

If we delete a 'hostgroup' which is in an 'action', then the 'action' is disabled automatically. It's not stupid but i wasn't expecting this.
It would be nice to display a little message "action nameofaction is disabled" on the web interface when this happens.

ZBXNEXT-105 lists many more cases



 Comments   
Comment by richlv [ 2013 Dec 17 ]

(1) also templates should be handled the same way

Comment by richlv [ 2013 Dec 17 ]

(2) also hosts should be handled the same way

Comment by richlv [ 2013 Dec 17 ]

(3) also triggers should be handled the same way

Comment by richlv [ 2013 Dec 17 ]

ZBX-7202 deals with a possibility to leave an action w/o any operations

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 31 ]

Just displaying a message may not be the best approach, because when deleting stuff in bulk, it may easily get lost in other messages.

Comment by richlv [ 2014 Mar 18 ]

ZBX-7948 asks for this to be documented for now

Comment by richlv [ 2014 Mar 18 ]

as for the message, ideally i'd like to see a separate confirmation page or popup, showing which actions are affected by the current deletion

Comment by Oleksii Zagorskyi [ 2015 Oct 08 ]

it's even worse for actions with custom expressions, see ZBX-9943

Comment by richlv [ 2016 Apr 03 ]

this seems to be more nasty than i thought initially. it might be a good idea to check your actions and see whether any important ones haven't been silently disabled

Comment by richlv [ 2016 Apr 15 ]

there was some interest on IRC in monitoring an important action by ID, and alerting if it suddenly gets disabled. a quick example on how that could be achieved (probably from cron) at https://github.com/whosgonna/Zabbix-Tiny.pm/blob/master/examples/example_check_action_by_id.pl

Comment by Oleksii Zagorskyi [ 2019 Mar 21 ]

Sad thing that it does NOT log to audit log too. (host group deletion, used in a condition).

Interesting that an audit message "Action disabled due to deletion of user." will be actually logged.
It happens if you delete an user/usergroup which was only one used in single operation of action.

UPDATE on 2023-10-26, using version 6.4.5.
Now frontend does not allow to delete such a user or a user group and produces error like:

User "udel" is used in "Report problems to Zabbix administrators del" action.

It happens also if the user/group is not the only recipient in the action, which is weird actually is wrong behavior.

Comment by dimir [ 2019 Sep 27 ]

Showing something in frontend wouldn't help when using API. I suggest not allowing to delete something that is referenced in action condition.

Comment by Oleksii Zagorskyi [ 2023 Oct 26 ]

Just confirming that using version 6.4.5 a host deletion silently disables the action and does not leave any sign in audit log too.

Comment by Michael Wery [ 2024 Feb 01 ]

As stated in ZBXNEXT-8982 it would be nice if :

  1. The deleted condition (host group, host, trigger, etc...) is the last remaining => Message appears indicating that it is still in use and the parent item must be deleted prior.
  2. There are other remaining conditions => Action remains enabled and a message appears indicating that the condition was used in this or that action.
Comment by dimir [ 2024 Feb 01 ]

There is already a reference check in the API:

https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/ui/include/classes/api/services/CHostGroup.php#459

All that needs to be done is instead of disabling an action return an error.

Thanks to gcalenko for checking it.

Comment by dimir [ 2024 Feb 01 ]

Related issue: ZBX-23760

Generated at Thu Apr 25 10:20:35 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.