Please read https://www.zabbix.org/wiki/Docs/action_simulator for an introduction to the action simulator! It describes use cases, lists known limitations and reveals design plans. ############################## Sep 8th 2016: v5.2.0 NOTE: Zabbix 3.0.4 has minified CSS files. This was reported and I expect this to be a temporary state. This version of the Action simulator needs to add to the CSS files and of course it won't fit the minified CSS files. Please patch the CSS files manually, based on the conflicts. Sorry for the inconvenience! Greatly improved release for 3.0, as presented at the Zabbix Conference 2016 in Riga. This release supports expression-based action conditions, features a redesign of the action condition debugging table, as well as some bug fixes: Features/Improvements: * Expression-based action conditions are now evaluated. This also called for a debugging table re-design; It was ugly in the first place! The new design has a pseudo-sections for each action. The conditions are visually represented in the section heading and should allows to quickly understand why a match came into place or not. It should also work well for colour-blind users. * Most conditions are now mapped to human-readable values * The button to access the popup is now shown for disabled triggers too. It has a different appearence to make it more obvious. The column and button also have different labels now. * The columns of the remote command and notifications table better blend into the Zabbix interface better now and are less bloated. * The error field for notifications now contains a box with a mouseover Bugfixes: * Triggers from templates are now treated properly in "trigger" conditions * Adapt time formats in tables to the action audit log; round now() to minutes * Don't refresh the page * Correct step/step-config order in commands table * Actions are sorted alphabetically in the debugging table now; That's at least _some_ sorting! Known issues: * There is no mapping for "trigger" matches -- still raw ids * If you delete the trigger while its popup is open, a refresh will fail awfully * Plus what is stated for 5.1.4 ############################## Jun 28th 2016: v5.1.4 First release for 3.0 -- Thanks to Mikhail Okhotin ("bios") for doing much of the work here! This release is pretty much covers the same features and design as the previous 5.1 versions. What is most important, it can _not_ yet evaluate expression-based action conditions yet. It will however show this in the bottom table, stating this by saying "Not supported". But this release also comes with a couple of minor improvement and bug fixes: * The column orders in the notification and remote commands table now better match one another. This should allow for easier reading. The notification table column "operation" is now a bit clearer in what it says and also states the group name, if a message is sent for being part of a user group. * Properly close any other calendar, when another one is opened. Previously, an old calendar could remain open under certain circumstances. * Improve the message boxes, giving information about escalations that go "too far", either in terms of total steps per action, or in that an event was already resolved, but escalation would have continued. This used to be one message per action, which was place-consuming and didn't contain much information either. The message now contains the respective action names and the resolvment timestamp, where appropriate. The maximum allowed number of steps is a constant now, which makes it slightly more elegant to adapt to your desires (ACTIONSIM_STEP_LIMIT, ACTIONSIM_HOURS_TO_RESOLVED). * While calculating correctly, the bottom table claimed to match the _current_ time/date against the time period condition, even if a different time than "now" was set. * Moved up the Re-evaluate and Close button to the top, where I expect them to make more sense. Known issues: * The button alignment is ugly; It's just about the CSS class it gets. ############################## Jan 1st 2015: v5.1.3 * Previously, escalations would continue, no matter the issue was resolved in the meantime * Previously, the same operation step length was used for different operations, no matter it was overridden or not * The warnings about escalations being stopped are now appearing in proper numbers and with more helpful content * Actions are now ordered by name in all tables; Disabled actions are still at the bottom * A typo in processing the acknowledgement timestamp caused an error; However, acks are still not considered in th simulation, due to confusion about the way they behave ony my side * The time column now uses the same format as in last 20 issues ############################## Jun 24th 2014: v5.1.2 * Multiple user media period settings are now treated properly and also don't lead to multiple table rows on mismatches * The message() function is used to note progress or errors instead of an almost impossible to see echo * Simple error handling for event timestamps in the API class * Remove the useless function checkTimePeriodString() ############################## Feb 14th 2014: v5.1.1 5.1.1 is only available for 2.2. No further work on 2.0 is planned for now. * Non-super-admins saw an error message on Configuration/Triggers * Resolve clicking "Re-evaluate" would throw an error if "Acknowledged at" was blank Both corrections are courtesy of Corey Shaw. ############################## Dec 9th 2013: No function changes, fit 2.2.1 Nov 21st 2013: A draft 5.1 version for Zabbix 2.2 is available Nov 20th 2013: v5.1 * Escalation periods are now calculated correctly when operation steps override it; They shall always override the action default * Only the first period in a period string was processed before. This could lead to false negatives on both action conditions and notifications * Speed-up: Escalation for non-matching actions was also processed in error Also seems to remove min(): Array must contain at least one element [include/classes/actions/ActionSimulation.php:595] ############################## Sep 12th 2013: v5.0c * Solve the issue acutally promised in v5.0b * Remove hard-coded time limit and replace it with a hard-coded step limit The default duration in the form will still be 2 hours, but it's not capped * Add line wrapping to the "Actual value" column on the action debug table * Comparison with NULL resulted in shifted columns in the action debug table ############################## Sep 11th 2013: v5.0b * Solve the recurring issue of callback functions in older PHP version, that was originally solved in v4.4 ############################## Sep 7th 2013: v5.0a This version is mostly a rewrite to API classes and a view file. Furthermore, it introduces the following: * API method action.run() * Escalation support (experimental) * Working forms for setting the assumed time of event state changes (Hardcoded time-span limit) * Primitive support for maintenance * Re-arranged columns * Colored debugging output Open issues: * Acknowledgement is not respected yet * No proper sorting of results yet * Acknowledgement form field can cause a mktime() error message. You can safely ignore this message. ############################## Mar 22nd 2013: v4.4 This patch was tested to apply to the following 2.0 versions: Without warnings: 2.0.5, 2.0.6 Bug fixes: * The action simulator failed to work with PHP < 5.3, due to the use of closures * Output was shifted in notification mismatch table if notified user was disabled ############################## Feb 18th 2013: v4.3 Bug fixes: * Solve error in debug table for un-templated triggers and action condition = template $condition['actualvalue'] was uninitialized for triggers that only belong to a host and are not templated. This became evident, if an action was set up, that checked for the trigger belonging to a specific template. This resulted in missing debug output for the actual value of the trigger and 2 error messages per condition occurence. ############################## Feb 17th 2013: v4.2 This patch was tested to apply to various 2.0 versions: Without warnings: 2.0.4, 2.0.5 With offset warnings: 2.0.2, 2.0.3 Those should be harmless. Bug fixes: * Show the "Actions" column to Super Admins only * Only show the "Actions" column if triggers in the list belong to at least one real host (not just a template) ############################## Feb 17th 2013: v4.1 Bug fixes: * "Undefined index: min [popup_action.php:621]" Other database backends than PostgreSQL potentially used different key names in the result, as it was not explicitly set. This resulted in failure. * Disabled triggers show no "Actions?" link in the trigger list. While this is on purpose, the last table cell was not rendered. An empty cell is rendered now. Thanks to mg-mg and gertjan for helping with these issues! ############################## Jan 17th 2013: v4 Application: Being in your frontend directory, please run: patch -p1 < /path/to/action_simv4.patch Improvements: * Handles remote commands * Time constraints now work as action condition and for user media but only use the current time yet * Template condition now works for discovered triggers * Show operation description for messaging instead of "User" or "Group" * Improve debugging output for host group and maintenance condition * Added time and escalation step columns in preparation for escalation handling * Label non-operational UI elements "NI" -- Not implemented Bug fixes: * Actions without conditions no longer cause errors in debugging * Show templateids instead of triggerids in template condition debugging Regression: * Maintenance checkbox can't be unchecked, but it might disappear anyway ############################## Jan 13th 2013: v3.2 Bug fixes: * Operation debugging now covers all reasons properly, besides time; Previously, system-wide deactivation and user deactivation didn't work right * Situations, where "all media" was set in an operation, but no media type was defined for the user/s in question, no longer lead to an error message ############################## Jan 7th 2013: v3.1 Bug fixes: * Action debugging table shows list of item applications instead of causing an error * Items without applications set no longer cause and error in the same place * Operation debugging gave wrong media types for disabled user media * Operation debugging output is now more useful ############################## Jan 2th 2013: v3 Version 2 had serious flaws that made it unusable in most situations: * Application conditions with the equal operator were false positive * Only one operation was processed per user or user group, thus not listing all notifications * Evaluation code for AND/OR didn't work correctly Other improvements: * Collapsable debugging table for operations - Aims to answer why a specific notification is not sent, while the expected action matches - Not every possible problem is covered yet * Collapsable debugging table for action conditions - Aims to answer why a specific action does not match - No useful information for host groups yet - Plus sign is not operational yet * Re-evaluate button and maintenance checkbox operational * Added form elements for time (not operational yet) * Dependency line is hidden, if empty * Host name and trigger severity are shown - Known bugs * An action without action conditions causes a missing iteration index in the debugging table ############################## Dec 25th 2012: v2 The next milestone is reached. The simulator now shows which users are notified and by which means, in the case of a given trigger. Conditions on trigger value, time period and maintenance status are now treated as if they matched. The code is terrible and inefficient, but it seems to work well, from what I saw so far. - Additional limitations to the below: * Only works for notifications; shows no remote commands * Doesn't handle escalation properly It probably shows every escalation step. I haven't tested it. * Temporal constraints for user media are ignored Have fun! ############################## Dec 22th 2012: v1 - Known limitations and bugs * Only works properly as Super Admin, due to permission restrictions in action.get * Probably doesn't work correctly with node setups * Discovered items are not properly dealt with * Re-evaluate button, time field and maintenance checkbox don't work * The following action conditions are not supported yet: - Trigger value - Maintenance status - Time period * Link should not show up for template triggers