Ad Widget

Collapse

Custom Action Condition Calculations Not Saving Properly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dbq-andersons
    Junior Member
    • Apr 2023
    • 11

    #1

    Custom Action Condition Calculations Not Saving Properly

    Good Day,

    Still learning my way around Zabbix and am running into something regarding Trigger Action Custom Calculation Expressions (Zabbix 6.4.1 on Redhat Enterprise Linux 8.6)

    A little background: Our current XYMon environment is configured to delay notification for 30 minutes for certain CPU-related items on certain servers during a certain time-range.

    I believe I have duplicated those alerts with this Action Configuration: If any of the three triggers in question fire on either of the two listed host groups between 0000 and 0500, run two operations (e-mail upon detection and page 30 minutes later if the item is still active). Did a little testing on this logic and it seems to be working.

    Click image for larger version

Name:	2023-05-08_090012.jpg
Views:	225
Size:	61.3 KB
ID:	464153

    Now I am now looking to configure the rest of the alerting during that timeframe so anything else fires a page immediately across those two host groups and their parent groups (anything with the notify-dba tag equaling yes). Based on my limited logic ability, I think this should work:

    Click image for larger version

Name:	2023-05-08_090846.jpg
Views:	222
Size:	64.7 KB
ID:	464154

    However, when I click update to save/close the action and then re-edit the action, everything is scrambled as shown below. Conditions end up with different letters assigned and the custom logic is different and all messed up (technical term).

    Click image for larger version

Name:	2023-05-08_090917.jpg
Views:	225
Size:	69.7 KB
ID:	464155

    I dug through the documentation (https://www.zabbix.com/documentation...ion/conditions) and other forum posts and can't find anything like this issue. Is this expected behavior? Am I asking too much with my logic? Is my logic flawed and Zabbix is trying to correct it for me?

    Thanks,

    Bill Anderson​
    Attached Files
  • Chris Morgan
    Junior Member
    • Jun 2022
    • 4

    #2
    I am having the same problem with the Trigger Action that uses a custom expression.

    After entering my 4 conditions and saving the Action the displayed labels for my conditions show as B, C, D and A. I then entered a Custom expression as "(B or C) and D and A". After I update the Action the custom expression is changed to "(A or B)" and C and D" but the labels and the order of the Conditions shown are not changed and still list as B, C, D and A.

    I feel that this may be an display issue on the page since the condition still seems to be working as it should if the expression was "(B or C) and D and A" even though the Custom expression is showing "(A or B) and C and D". The displayed Custom expression would match the order of the conditions if the Label was always A, B, C, and D.

    Click image for larger version

Name:	image.png
Views:	214
Size:	31.3 KB
ID:	466539

    Comment

    • Chris Morgan
      Junior Member
      • Jun 2022
      • 4

      #3
      The Custom expression worked from when I first entered the Conditions and Custom expression but once I tried to update the Custom Expression to match the Condition Labels the action became out of sync with the reality of the labels and failed. I changed from a Custom Expression to an "And/Or" Type of calculation and the Action is now working as expected.

      The Action > Type of calculation "Custom expression" is broken and needs to be looked at as will rearrange the order and labels to something you are not expecting if you edit the calculation value "(A or B) and C and D" after your Action has been saved.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Have you tried to submit a bug report to https://support.zabbix.com/browse/ZBX ? Or at least searched for similar cases? You seem to have pretty clear cases here....

        Comment

        • Semiadmin
          Senior Member
          • Oct 2014
          • 1625

          #5
          Note that using "And" calculation is disallowed between several triggers when they are selected as a Trigger= condition. Actions can only be executed based on the event of one trigger.

          Comment

          Working...