4 Replies Latest reply on Aug 2, 2017 11:26 AM by Zac Woodall

    How to Join data_alerts and background_jobs? And...

    Egor Larin

      Hello admins!

       

      Checking new tables for data_alerts and data_alerts_recipients and overall functionality of Data Driven Alerts in TS v 10.3.1.

      I have 3 alerts - one is one time alert and two frequent alerts (as frequently as possible)

      Discussion points:

      1. How to Join data_alerts table and background_jobs? Tried via schedules - but somehow schedule_id in null for all of my 3 alerts. Any other field to join? ANSWERED - args field has data_alert id! Matt Coles
      2. Why is Last Triggered field empty? I'm receiving updates every hour. Last Sent from data_alerts_recipients is populated correctly and = Updated At from data_alerts
      3. Why does TS send notifications every hour? I thought it will send based on TS config - dataAlerts.checkIntervalInMinutes=15 min by default. Somehow it has 60 as default value in workgroup.yml (upgraded from 10.0.6). Which value do you have in your config by default?
      4. Is [Notification Interval In Minutes]=dataAlerts.checkIntervalInMinutes? If such why is it 0 for frequent alerts and 2,147,483,647 for One time alert. If not - how can we control it?
      5. Why does TS still checking conditions for One Time alert? I think it should quit from the queue of checking once we received it. One think here - it is still in the list because someone can change the frequency to 1 hour for example. Am I right?
        If you change the Alert that should be done for One time (in my case I was changing just the name of it) - Tabelau Server will re-check and resend it to subscriber.
      6. Creation and changes for Alerts will go via non-backgrounder workers - All Alerts will be executed on backgrounder node.
      7. What is avg consumption for CPU/MEM for heavy checks? I can see Priority is 10 for Alerts and Job Duration is around 3min. I have just one worksheet with plain line and sum(Number of Records) as axis. What will happened with production heavy reports? If someone can share any prod numbers that would be great.
      8. What is exactly happening when Alert check is processing? Does TS opens that workbook xml to find the answer for that axis? Or is it doing extra computations? Did anyone go via logs?

      Would love to hear any comments on that topic!

       

      BR,

      Egor

        • 1. Re: How to Join data_alerts and background_jobs? And...
          Vijay Baliga

          Hello Egor,

           

          2) The columns last_triggered, schedule_id, and data_condition in the data_alerts table are obsolete and have been removed in the next version.

          3) The default value of dataAlerts.checkIntervalInMinutes is 60. If you change it to N, frequent alerts will be sent every N minutes (provided the threshold condition has been met). Is that not what you are seeing?

          4) "Frequently", "Once" etc are derived from notification_interval_in_minutes. If the value is 2,147,483,647 and you wait for 2,147,483,647 minutes (or 4,085 years), you will actually get the alert again, even though the UI says "Once" :-). If the value is N, backgrounder ignores the alert for the greater of checkIntervalInMinutes and N minutes after checking it.

          5) One Time alerts are checked regularly because new recipients could have been added. If none have been added, the check ends very quickly; it is almost a no-op. Also, like you said, someone could have changed the frequency to 1 hour. It is by design that we check the alert again for all recipients if something about the alert changes (threshold, name, etc). The owner can choose to delete it if it mustn't be evaluated again.

          6) Creation and changes to alerts are done by vizportal. Evaluation of alerts and sending emails is done by backgrounders.

          7) We don't have numbers to share, but the backgrounder loads the workbook in memory and checks to see if the threshold has been met. If you have a slow loading workbook, this can take time. If you have a very simple workbook and a single recipient, 3 minutes sounds too long. I have seen alerts being evaluated in 30 seconds.

          8) The same computation that happens when you open a workbook in Tableau Server happens when an alert is checked.

           

          Let me know if something is not clear or if you have more questions.

          1 of 1 people found this helpful
          • 2. Re: How to Join data_alerts and background_jobs? And...
            Egor Larin

            Hey Vijay Baliga.

             

            Thank you for your reply. Let me clarify something.

            3) Based on that doc tabadmin set options the default values is 15 min. Does it mean the docs are incorrect and should be fixed?

            4) Ok, dataAlerts.checkIntervalInMinutes is 60 and we have 5 models for Alerts

            1. Once (skip it)
            2. As frequently as possible (based on dataAlerts.checkIntervalInMinutes=60 min)
            3. Hourly at most - Every hour
            4. Daily at most - Every day
            5. Weekly at most - Every week

            Does it mean that for 2-5 notification_interval_in_minutes will be that?

            1. 2,147,483,647 min
            2. 60 min
            3. 60 min
            4. 1440 min
            5. 10080 min

            7) My bad - I have 3 sec, not 3 min.

            • 3. Re: How to Join data_alerts and background_jobs? And...
              Vijay Baliga

              Hello Egor,

               

              3) You are right! I will get it fixed.

              4) You are right about notification_interval_in_minutes, except for "as frequently as possible". In that case, the value will be 0. The actual notification interval will be maximum(0, dataAlerts.checkIntervalInMinutes), which in your case will be 60 minutes. If you change dataAlerts.checkIntervalInMinutes to 10 minutes, then the actual notification interval will be 10 minutes.

               

              Note that if the backgrounder is overloaded, you may get your "hourly at most" alert after more than an hour. The words "at most" are key.

               

              Thanks,

              Vijay

              • 4. Re: How to Join data_alerts and background_jobs? And...
                Zac Woodall

                A detail worth mentioning may be that the "check" and the "send" intervals behave in pretty different ways.

                 

                "Check" is a server level configuration.  All alerts on live data sources get checked at the same time.

                "Send" is a per-alert user setting which governs email frequency.

                 

                The vast majority of processing load created by alerts (not tasks, but time) is spent in running the Viz to check the condition and send the mail.

                Tableau Server tries to optimize workloads to avoid doing this if an email will not be sent.  For example:

                * A 'once' alert has already sent to all its current recipients

                * A 'daily' alert was sent to all its current recipients < 24 hrs ago

                 

                In addition, alerts created on extract based data sources only run the Viz and check the condition when the Extract completes a refresh (because otherwise the data and therefore alert state hasn't changed). 

                1 of 1 people found this helpful