Ad Widget

Collapse

Alerts with custom number of steps and message deduplication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • db100
    Member
    • Feb 2023
    • 61

    #1

    Alerts with custom number of steps and message deduplication

    Hi,

    I am testing the case in zabbix where different users "belong to the same email group", meaning they share the same email address, even though they belong to different user groups. Example:

    * User 1 belongs to Maintenance group (User group) A and B
    * User 2 belongs to Maintenance group (User group) B and C

    Because it is not possible (AFAIK) in Zabbix to define Medias on a user group basis, but only on a per-user basis, i need to use at least 4 email addresses in the case above:
    • User 1
      • Group A -> media I
      • Group B -> media II
    • User 2
      • Group B -> media III
      • Group C -> media IV
    Now, because media II and media III refer to the same "Maintenance group", they get to use the same email address, so basically media II = media III.

    Question 1: Now when an alert triggers on Group B: is there a way to prevent sending out 2 email duplicates ? is it possible to deduplicate messages on media II and III since they have same email address ?

    Question 2: (unrelated): Is it possible to have a conditional step duration and number of steps based on event properties ? example:Action A + Event 1 -> (Step duration = 2h, Steps 1-3) // Action A + Event 2 -> (Step duration = 1d, Steps 1-7) ?

    thanks a lot!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Why have 2 medias for one group?

    Comment

    • db100
      Member
      • Feb 2023
      • 61

      #3
      Originally posted by cyber
      Why have 2 medias for one group?
      thats the thing, i have 2 users that belong to the same group, but the "group" cannot have its own email.

      So imagine this scenario:

      * The group is called "Data center Maintenance" and has email "[email protected]"
      * User A is available from monday to wednesday and User B from tuesday to friday

      this means that on tuesday and wednesday one needs to deduplicate emails going to [email protected]

      any other ideas how to model this otherwise?​

      Comment

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

        #4
        I would not bother with sending to each user .. create a fake user "support" and assign that email to it. Send emails 24/7...:P
        It is a group email after all, Those users receive it anyway, whatever day it is, just have to limit how many times you send...
        Last edited by cyber; 29-03-2023, 13:52.

        Comment

        • db100
          Member
          • Feb 2023
          • 61

          #5
          thanks for the reply, first of all.

          by looking at your answer i understand that there is no way to achieve deduplication in zabbix notifications. is this correct?

          the things is that in my setup i cannot use the approach you are suggesting, just because users are not defined "manually" within zabbix, but are integrated from external sources (such as LDAP). therefore the model you are suggesting is not fitting with the external one, unfortunately.

          also any hint on the second part of my post?

          > Question 2: (unrelated): Is it possible to have a conditional step duration and number of steps based on event properties ? example:Action A + Event 1 -> (Step duration = 2h, Steps 1-3) // Action A + Event 2 -> (Step duration = 1d, Steps 1-7) ?​

          Comment

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

            #6
            My userbase is also synced from outside, but it does not mean, I cannot have local users .. Sometimes needs justify the means..
            But yes, you cannot do such dedup ..

            q2, I guess you need 2 actions... similar in nature, just conditions and steps are different ... Maybe something based on tags or ... something.

            Comment

            • db100
              Member
              • Feb 2023
              • 61

              #7
              > q2, I guess you need 2 actions... similar in nature, just conditions and steps are different ... Maybe something based on tags or ... something.

              alright, so basically i need N actions and then a logic to switch between them. again, not so nice, but maybe in the future there will be autodiscovery for actions as well ...

              > But yes, you cannot do such dedup ..

              do you think it is worth it to leave this post around for a while and see if anyone has come up with any solution? or is there just no way to achieve this, 100% sure ?

              Comment

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

                #8
                Its too late for me.. brain just wont work any more...:P Something here doesn't sit with me... either you have not told everything (and I fail to ask correct questions) or I am overlooking something obvious and have forgotten things, as I have not configured actions for a long time...

                Comment

                Working...