[ZBXNEXT-18] Send an alert after trigger being acknowledged Created: 2009 Feb 09 Updated: 2018 May 10 Resolved: 2018 Apr 26 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A), Frontend (F), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 3.4.0alpha1, 3.4 (plan) |
Type: | New Feature Request | Priority: | Critical |
Reporter: | Sol Arioto | Assignee: | Sergejs Paskevics |
Resolution: | Fixed | Votes: | 96 |
Labels: | acknowledges | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Environment: |
Centos, zabbix 1.6.1 |
Attachments: | ZBXNEXT-18-2.jpg ZBXNEXT-18-3.jpg ZBXNEXT-18.jpg multi_trigger_ack.png select_button.png zbxnext-18-clone2.jpg zbxnext-18-empty.jpg zbxnext-18.postman_collection.json zbxnext_31.png | ||||||||||||||||||||||||||||||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Sub-Tasks: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Team: | Team C | ||||||||||||||||||||||||||||||||||||||||||||||||
Sprint: | Sprint 4, Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 14, Sprint 30, Sprint 31, Sprint 32 | ||||||||||||||||||||||||||||||||||||||||||||||||
Story Points: | 28 |
Description |
Alexei,we need to have Email alert sent out to our team of Admins and Customers. letting them know that the triggered Alert has been acknowledged When acknowledged. i cant seem to effectively set this up in a manner of that when i acknowledge an alert no action takes place and no email is sent to the given group. how do i go about setting up an action to get this work correctly |
Comments |
Comment by Christopher Jones [ 2011 Oct 21 ] |
This one is major for us. We used Nagios for years, and anytime somebody does not see an email, they assume nobody is looking at the issue. |
Comment by Chris Kline [ 2011 Oct 21 ] |
I feel the same way as Chris. We also transitioned from Nagios and this feature is absolutely critical. |
Comment by Andy Goldschmidt [ 2011 Nov 09 ] |
please implement this. |
Comment by Oleksii Zagorskyi [ 2012 Feb 08 ] |
Linked issue |
Comment by Oleksii Zagorskyi [ 2012 Mar 14 ] |
Related forum thread http://www.zabbix.com/forum/showthread.php?t=20763 |
Comment by Robert Hau [ 2012 Jun 19 ] |
This is a must |
Comment by David Israel [ 2013 Mar 16 ] |
On the Media Types CONFIGURATION OF ACTIONS screen there needs to be an acknowledgement message checkbox and configuration as was done for recovery message. |
Comment by Aleksandra Fedorova [ 2014 May 30 ] |
Any updates on this? Acknowledge notifications would make the whole e-mail notifications feature twice more effective. |
Comment by Elvar [ 2014 Jun 16 ] |
Would really like to see this as well. |
Comment by AndreaConsadori [ 2014 Jul 14 ] |
I think in one of the main missing feature for co-working. |
Comment by Marc Schoechlin [ 2015 Jan 05 ] |
I also strongly welcome this because this :
There should be a separate message default template and separate operation template which is used to send the acknowledgment information. |
Comment by Philipp Jakubowski [ 2015 Jul 02 ] |
I can't believe this feature isn't implemented yet, since 6 years! This is such a downer to teamwork and teams working with on-call duty... |
Comment by AndreaConsadori [ 2016 Mar 23 ] |
still any update on this very usefoul feature request? maybe 3.2? |
Comment by Marc [ 2016 Mar 23 ] |
andrea.consadori, |
Comment by Sol Arioto [ 2016 Mar 23 ] |
THIS IS A DIRTY METHOD MOCKED UP TO SEND Acknowledgement EMAILS on save ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ CREATE?MODIFY ZABBIX /Include/ tr_email_ack.inc.php file NEED TO CREATE A NEW MEDIA TYPE AND USER in zabbix ------------------------------------------------------------------------------------ <?php function get_eventid_clock_by_triggerid($tr_ids){ else {$where .= "$tr_id,";} function get_media_smtp_server($media_desc) { $media_smtp_server = DBfetch(DBselect("SELECT smtp_server FROM media_type WHERE description='$media_desc';")); return $media_smtp_server['smtp_server']; }function get_media_smtp_email($media_desc) { $media_smtp_email = DBfetch(DBselect("SELECT smtp_email FROM media_type WHERE description='$media_desc';")); return $media_smtp_email['smtp_email']; }function get_media_smtp_ack_recipient($user_alias){ return $email_to_address; function send_email_ack($tr_id, $ev_id, $time_first, $time_ack, $severity, $NOC_name){ $res = get_hostname_and_ip_by_triggerid($tr_id); $mail_body = "<b>Comment:</b><br />".$_REQUEST['message']."<br /><br /> <b>Time Acknowledged:</b> [ ".date("Y-m-d g:i:s a", $time_ack)." ] <br /><br /> <b>Host:</b> $tr_hostname<br /> <span style=\"color: #3366ff;\">Hotline:</span>PHONE#</p>"; if(!$maint_mode) {mail($email_to_address,"RLABS Acknowledgement: $tr_hostname @ [$tr_ip] :: ".CTriggerHelper::expandDescriptionById($tr_id)."", $mail_body, $headers); }} |
Comment by Chrystian Martins [ 2016 May 02 ] |
I am using the version 3.0, don't have this "acknow.php" in my directory. |
Comment by Frank [ 2016 Jun 14 ] |
This would be very handy for our dashboard, since now it requires an additional process to query the acknowledges from the API instead of them being pushed directly to it. |
Comment by Ben Carter [ 2017 Feb 07 ] |
Can I just add my voice to this request. Really important feature in an on-call environment. |
Comment by Bobby Khaira [ 2017 Feb 17 ] |
I added my vote for this request (at the top of this page). I recently moved from Nagios to Zabbix, ACK notification is very much missed by our team. I hope more users vote for this feature and it gets implemented sooner. |
Comment by Marc [ 2017 Feb 17 ] |
bkhaira, the fastest way is (co-)sponsoring the development. Judging the log of this issue chances are not that bad that there are some co-sponsors already - asking for it does not cost a thing! |
Comment by Ben Carter [ 2017 Feb 22 ] |
@Marc I have been to that page and offered to co-sponsor. It's not appeared on the this yet, but hopefully others needing this will also co-sponsor. |
Comment by Alexander Sergunin (Inactive) [ 2017 Mar 10 ] |
Hi there, Just a bit of an update - there's a chance to get this feature implemented in Zabbix 3.4 in terms of sponsored development, but we will have to hurry We will try to update the development page as soon as possible. For now though, if you are interested in contributing towards this feature, please get in touch with the Zabbix Sales Team ([email protected]). Cheers, Alexander. |
Comment by Bobby Khaira [ 2017 Mar 29 ] |
@Alexander / Marc - I am happy to co-sponsor this development. I am hoping there are enough of us co-sponsoring to make it happen. I am in touch with [email protected] regarding this. Please make it happen |
Comment by Sergejs Paskevics [ 2017 May 17 ] |
wiper, Please review and test my changes for server side. Branche - svn://svn.zabbix.com/branches/dev/ZBXNEXT-18 wiper schema changes and database patch looks fine. |
Comment by Andris Zeila [ 2017 May 18 ] |
(1) [S] Task processing could be improved. This will also solve the theoretical situation when acknowledge tasks are not created in the order of acknowledgeids. When selecting task data in tm_process_acknowledgments() function the events table is not used and must be removed from join. s.paskevics RESOLVED in r68550, r68789 wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(2) [S] When expanding acknowledge macros in substitute_simple_macros() it would be better to first compare by macro name and only then do additional check for acknowledge macro type. s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(3) [S] There could be a situation when acknowledge is removed before acknowledge task is processed. In this case the selected eventid will be NULL. s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(4) [S] If acknowdledge-event pairs are processed in batches, it would make sense to rework get_event_info (or add another function) to support batch requests. s.paskevics RESOLVED in r68550. wiper Did some refactoring, please review r68713 s.paskevics Looks good, but I fixed another bug in r68789. s.paskevics Please check last changes in r68859. RESOLVED wiper The event condition precalculation was missing, please check my changes in r68900 s.paskevics CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(5) [S] process_escalations() @@ -2276,8 +2276,12 @@ /* Execute operations and recovery operations, mark changes in 'diffs' for batch saving in DB below. */ diff = escalation_create_diff(&escalation); - if (0 != escalation.r_eventid) + if (0 != escalation.acknowledgeid) { + escalation_acknowledge(&escalation, &action, &event); + } + else if (0 != escalation.r_eventid) + { if (0 == escalation.esc_step) escalation_execute(&escalation, &action, &event); @@ -2286,20 +2290,11 @@ else if (escalation.nextcheck <= now) { if (ESCALATION_STATUS_ACTIVE == escalation.status) - { - if (0 != escalation.acknowledgeid) - escalation_acknowledge(&escalation, &action, &event); - else - escalation_execute(&escalation, &action, &event); - } + escalation_execute(&escalation, &action, &event); else if (ESCALATION_STATUS_SLEEP == escalation.status) - { escalation.nextcheck = time(NULL) + SEC_PER_MIN; - } else - { THIS_SHOULD_NEVER_HAPPEN; - } } else { s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(6) [S] ACK.USERNAME macro should return user name + surname. In this case we might want also to rename it. One possibility could be ACK.USER.FULLNAME. s.paskevics I found and used zbx_user_string function that returns a username in the following format:name surname (alias). RESOLVED in r68550. wiper minor suggestion to use zbx_strdup instead of zbx_dsprintf when simply copying strings, please review r68682 s.paskevics CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(7) [S] In escalation_execute_acknowledge_operations() uninitalized mediatypeid is passed to add_sentusers_ack_msg() for acknowledge messages. And add_sentusers_ack_msg() tries to read it from database without selecting it. s.paskevics RESOLVED in r68550. wiper The mediatypeid was being selected from acknowledges, where it is not defined. Fixed in r68685, please review s.paskevics CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(8) [S] It's pointless to check acknowledge operation conditions - there are none (similar problem was found with recovery operations and s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(9) [S] Rather than passing DB_ACKNOWLEDGE to add_object_msg() function and then determine the macro type based on the ackowledge value, it would be better to pass the macro type to the add_object_msg() function instead ( s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 18 ] |
(10) [S] In execute_commands() the MACRO_TYPE_MESSAGE_ACK is used as bitmask. While macro types are defined in a way they could be used as bit masks, they are never used in that way - let's keep it that way. Also in the same funciton substitute_simple_macros() for global scripts is called without DB_ACKNOWLEDGE parameter. s.paskevics RESOLVED in r68550. wiper CLOSED |
Comment by Andris Zeila [ 2017 May 19 ] |
(11) [S] Please review minor fixes in r68307 s.paskevics Looks good. CLOSED. |
Comment by Gregory Chalenko [ 2017 May 24 ] |
(12) [F] Translation string changes. Strings added:
martins-v Correct grammar must be used:
The last one seems too long anyway. Also, "discussion" is not a word that should be used in the context of immediate problem solving. I would suggest "Notify all who left acknowledgement and comments". To begin with, specification should describe what exactly is meant by "Notify all who added acknowledgement and involved in discussion", because it is a new functionality and may be misunderstood. gcalenko RESOLVED r68769. Final changes:
iivs Strange... as of r69347 I have these strings:
And I don't have "No recipients for acknowledgement operation message." REOPENED gcalenko RESOLVED
iivs CLOSED |
Comment by Andris Zeila [ 2017 May 30 ] |
(13) [I] The default acknowledge operation message must be set in Zabbix default template. s.paskevics RESOLVED in r68706. wiper The default acknowledge operation message must be inmore readable and useful format: Problem: {TRIGGER.NAME} Message: User: {USER.FULLNAME} Time: {ACK.DATE} {ACK.TIME} Message: {ACK.MESSAGE} Status: {TRIGGER.STATUS} Or we might opt for less robotic and more human like message (still under discussion). s.paskevics RESOLVED in r69019, r69038. wiper Added CR symbols to database upgrade patch, please review r69040 s.paskevics CLOSED. |
Comment by Sergejs Paskevics [ 2017 May 31 ] |
(14) [F] Incorrect operations type: gcalenko RESOLVED r68769 iivs CLOSED |
Comment by Sergejs Paskevics [ 2017 Jun 01 ] |
(15) [F] Notification acknowledgement should not be displayed in the event details: gcalenko RESOLVED r68775 iivs CLOSED |
Comment by Sergejs Paskevics [ 2017 Jun 01 ] |
(16) [S] Incorrect counting the number of processed tasks in tm_process_tasks function. RESOLVED in r68754. wiper CLOSED |
Comment by Sergejs Paskevics [ 2017 Jun 01 ] |
(17) [S] Two identical filters were created in tm_process_acknowledgments function for SQL query, one must be removed. RESOLVED in r68764. wiper CLOSED |
Comment by Andris Zeila [ 2017 Jun 05 ] |
(19) [S] Fixed memory leaks in get_events_info() function. s.paskevics CLOSED |
Comment by Andris Zeila [ 2017 Jun 06 ] |
(20) [S] When processing batch of acknowledge tasks the order of acknowledge messages could have been lost. This fix will ensure correct order of messages generated by the same event acknowledgments. Supporting chronological order of acknowledgments from different events would require non-trivial changes in escalator and also in the new alert manager, not sure we should commit to it. RESOLVED in r68942 wiper The message order was clarified - only messages generated by the same event must be sent in the chronological order. This should be added to specification. s.paskevics RESOLVED. wiper CLOSED |
Comment by Andris Zeila [ 2017 Jun 07 ] |
(21) [S] It would be useful to include also acknowledgment date in time in acknowledgment operation message. This requires to support two new macros - {ACK.DATE}and {ACK.TIME}s.paskevics RESOLVED in r69009. wiper CLOSED |
Comment by Andris Zeila [ 2017 Jun 08 ] |
Server side tested |
Comment by Ivo Kurzemnieks [ 2017 Jun 08 ] |
(22) [S] I created an action with operation run remote command with command being "test". In event details it says "Failed. Process exited with code: 1.". OK, but then I added acknowledgement operation run remote command with commad "test2". It says "Executed", although I don't think there is such command. s.paskevics If the remote commands are created for execution on the agent side, the result will always be executed, because we use the key system.run with param - nowait. If we want to process this results, we need to create a new ZBXNEXT for it. iivs OK, so I understand that it works as it should. CLOSED |
Comment by Sergejs Paskevics [ 2017 Jun 19 ] |
(32) [D] gcalenko Don't forget update info about API. (https://www.zabbix.com/documentation/3.4/manual/api/reference/action) s.paskevics Sub-issue was moved in |
Comment by Andris Zeila [ 2017 Jul 24 ] |
(46) [S] Fixed few merging bugs in r70509, please review. s.paskevics Looks good. Please, check some changes r70547. wiper Thanks, CLOSED |
Comment by Andris Zeila [ 2017 Jul 24 ] |
(47) [?] Getting the following error in frontend when opening an action. Merging problem? Use of undefined constant ZBX_SCRIPT_TYPE_TELNET - assumed 'ZBX_SCRIPT_TYPE_TELNET' [actionconf.php:794 → CView->render() → include() → require_once() in include/views/js/configuration.action.edit.js.php:95] Use of undefined constant ZBX_SCRIPT_TYPE_TELNET - assumed 'ZBX_SCRIPT_TYPE_TELNET' [actionconf.php:794 → CView->render() → include() → require_once() in include/views/js/configuration.action.edit.js.php:542] gcalenko RESOLVED r70511 wiper CLOSED |
Comment by Andris Zeila [ 2017 Jul 25 ] |
Server side tested |
Comment by Sergejs Paskevics [ 2017 Jul 25 ] |
Implemented in 3.4.0alpha1 r70567 (trunk) |
Comment by Sergejs Paskevics [ 2017 Aug 01 ] |
Implemented in 3.4.0beta1 r70769 (trunk) |
Comment by Gregory Chalenko [ 2017 Aug 14 ] |
Fixed in: trunk r71221 |
Comment by Ben Carter [ 2017 Sep 01 ] |
I think you may have missed the point slightly on this feature. The point of sending an acknowledgement is to let other people, who have been notified of the problem, know that someone has acknowledged it (i.e. they have picked it up) and therefore others don't need to worry about it. See comment from 16th March 2013: “On the Media Types CONFIGURATION OF ACTIONS screen there needs to be As in, on recovery, you have the option: but on acknowledgement you only have: Imagine the scenario, you notify 5 admins, then in a further step you notify 5 more in escalation, then maybe 2 managers. If someone from any of that acknowledges the problem, you should be able to send that acknowledgement to everyone so they all know it's been picked up. This is impossible with the current options. What is needed is the option: |
Comment by Alexei Vladishev [ 2017 Sep 05 ] |
Ben, I appreciate your diplomatic note. We did miss the point completely! Initially the option was supposed to send messages also to those who received any messages before, but for some reason it was implemented differently. It will be addressed in one of 3.4.x ASAP - |