1 2 Previous Next 18 Replies Latest reply on Oct 18, 2016 8:03 AM by Matt Coles Branched to a new discussion.

    Example: Email users whose extracts fail to refresh

    Matt Coles

       

      UPDATE: Tableau 10.0 has a feature that may render this example obsolete for you. Check out a side-by-side comparison of the two methods in this response

       

       

      One of the most asked-for email alerts that VizAlerts can accomplish is to notify owners of data extracts that fail to refresh for whatever reason on Tableau Server. There are a lot of different approaches to doing this. Toby Erkson's Alerts Alerter is another great example.

       

      In this ready-to-use example, we'll use an Advanced Alert to send one email to every user if one or more of their extracts failed to refresh. If multiple items of theirs failed within a single hour, they'll all be consolidated into a single HTML table in the email. Inside the email we provide hyperlinks that will assist the user in taking the appropriate action to resolve the issue. Here is an example of the email that is sent.

       

      Example+Email.png

       

      It's worth noting that the "Extract Refresh History" link directs the user to the second tab of the alert workbook itself, and allows the user to see data on their own extract refreshes by virtue of a Data Source filter based on their Tableau Server username. They will need Interactor permissions (ideally) to the viz see this information. If this functionality isn't desired, simply change the Include Extract History Link value to False.

       

       

      Steps To Deploy:

      1. Open attached workbook in Tableau Desktop (you'll need 9.0 or higher)
      2. When prompted to run Custom SQL, click "Yes"
      3. If prompted to sign in to your Tableau Server, go ahead and do so.
      4. When prompted for database credentials, click "Edit Connection"
      5. Set the server name to your Tableau Server PostgreSQL Repository host, and the password to whatever you set that password to be on your server
      6. Go to the Extract Failure Alert sheet and set:
        1. The Tableau Server Name parameter to your Tableau Server Name
        2. Admin Email to whatever email address the Tableau Server administrator uses.
        3. Timezone Offset from UTC (Hours) to the right offset for your timezone from UTC (this ensures correct dates are shown in the email)
        4. If you are publishing the workbook to a non-Default site, edit the field Item Hyperlink - Extract History so that the site name is added to the URL.
      7. Publish the workbook to your Tableau Server. Ensure the Authentication is set to "Embedded Credentials".
      8. Subscribe to it on an hourly VizAlerts schedule that runs on the hour. Emails will only be sent to you at this point. Take this opportunity to identify what errors and content your users will want to see, and which are going to be unhelpful. Adjust filters accordingly.
      9. Once you're satisfied with the results, change the Test Mode parameter to False. This will start emailing the actual owners, and optionally) cc-ing the Administrator.

      Someday, I'd love to start mapping common errors out to a "Suggested Action" for each failure, so that this can become even more self-service. That's still a ways out yet, though.

       

       

      Let me know if you have any questions! Hope this is helpful.

       

      thanks,

      Matt

        • 1. Re: Example: Email users whose extracts fail to refresh
          Matt Coles

          Switched the default for including the Extract History link in emails to "false" based on feedback from Toby Erkson. For multi-site deployments, that link can be challenging to keep working. I also set a Comment on the parameter in question to clarify how to use it.

           

          Lastly, I updated the Steps to Deploy above to make sure Admins take the time to assess which alerts are helpful and which aren't, and filter them out accordingly.

           

          Thanks Toby!

          3 of 3 people found this helpful
          • 2. Re: Example: Email users whose extracts fail to refresh
            Matt Coles

            Published a new version with the following changes:

             

             

            1. Fixed an issue where Datasources were not being reported
            2. Links for downloading workbooks did not work due to including the "#" character in the URL. Fixed that.
            3. Adding instructions to set the Timezone parameter.
            4. Changed relative date filter to "Last Hour", which will eliminate duplicate emails and still run in a timely fashion if scheduled for an hourly schedule that runs at the 15-minute mark.
            5. Added Schedule information for each workbook and datasource. This is helpful if you wish to adjust the failure email frequency based on the schedule. For example, in my environment, if I notify everyone each time one of their extracts fail, I will spam people who have hourly extracts running that fail fairly regularly. For now I am only notifying people signed up for a Daily schedule. I plan on tweaking things for people whose extracts are scheduled more frequently than that, perhaps by setting a threshold of it needing to fail two consecutive times before the email goes out, or perhaps with a time-based threshold.
            1 of 1 people found this helpful
            • 3. Re: Example: Email users whose extracts fail to refresh
              Matt Coles

              6. Fixed a problem with the Hyperlink calcs that caused blank HTML tables in the emails.

              1 of 1 people found this helpful
              • 4. Re: Example: Email users whose extracts fail to refresh
                Matt Coles

                7. I added a 9.3 version of the workbook, since in 9.3 the data in the "datasources" table contains a lot of versioning records that need to be excluded.

                8. The 9.3 version also simplifies the user permissions component of the query. In order for this to work, you must enter the user name of the Admin in order to actually see the data. Feel free to tweak the calc as you like to include other individuals or groups.

                1 of 1 people found this helpful
                • 5. Re: Example: Email users whose extracts fail to refresh
                  Todd Schnack

                  Hi Matt. Thank you for taking the time to post the workbooks and share your knowledge! We are on 9.2.7 and are multi-site, so I started with the ExtractFailureAlerts.twb. There were a few changes I had to make to the workbook, and I wanted to run them by you:

                  1. To make the URL link in the email's Name column work (Item Hyperlink - Default Page), I changed the ELSE row in "Item Hyperlink - Root URL" from ELSE 't/' + [Site Name] to ELSE 'site/' + [Site Name] + '/'.
                  2. I removed the Download link (Item Hyperlink - Download) from "Email Body" because, even if the link format is correct, all that appears in the browser is a blank page. Any ideas on why it wouldn't be working for me?
                  3. I have started mapping commonly-seen extract errors to suggested actions/online references. When I am done with my first draft, would you be interested in seeing that?
                  • 6. Re: Example: Email users whose extracts fail to refresh
                    Matt Coles

                    Todd, likewise! Thanks for sharing the site correction. I'm spoiled in not having multiple sites to administrate, so even if I try my best to remember they exist, I don't get to test my work much on them.

                     

                    So the problem is that the Download link uses the old-school method of downloading a twb/tds, because Server 9+ actually still uses it as well:

                     

                    http://servername/t/site/workbooks/myworkbook.twb

                     

                    That means that changing the Root URL broke your download links, because I was being lazy with "Item Hyperlink - Root URL (v8)"...it just uses "Item Hyperlink - Root URL" and replaces "#/" with the empty string. So to fix both things, I added your correction to the "Item Hyperlink - Root URL", then calculated the v8 one properly.

                     

                    Regarding mapping extract errors to suggested actions / references: yes! yes! a thousand times yes! I've started doing the same, but only for errors that really don't seem clear, or need some additional info. I only have about six so far. I think some may always be custom, because you may have specific procedures for things, or you may need to tell the user the name of your Run-As account so that they can set up file share permissions properly on the XLSX they're extracting. But getting a mapping built out would be really great, thank you!

                     

                     

                    I converted this to a Document, which will keep version history, updated the attachments, and renamed the ExtractFailureAlerts.twb to ExtractFailureAlerts-92.twb as I realized it was not working on my 9.1 server since I added Schedule information. I don't really want to maintain versions for 9.1, 9.2, and 9.3, so 9.1 orgs--get upgraded already!

                     

                    thanks again Todd!

                    1 of 1 people found this helpful
                    • 7. Re: Example: Email users whose extracts fail to refresh
                      Matt Coles

                      Okay, "converting to a document" actually seems to mean "copy to a new document", which loses the entire discussion . So I deleted the document and I guess I'll just stick with this Discussion (it's now been updated with the right attachments and updated instructions).

                      • 8. Re: Example: Email users whose extracts fail to refresh
                        Zach Krzyzanowski

                        I'd like to use this alert for Slack notifications using https://ifttt.com/recipes

                         

                        Basically, if I send an email to trigger@recipe.ifttt.com  tagged #failed in the subject line from VizAlerts, then post a message to a Slack channel.  The problem is if I change the subject line at all, failing extracts are no longer marked.

                         

                        Is there a way to change the subject line it outgoing emails from this workbook?

                        • 9. Re: Example: Email users whose extracts fail to refresh
                          Matt Coles

                          Yes. Edit the calc " Email Subject *" and substitute your own method for deriving the Subject. Do not replace it with another "Subject" field; VizAlerts relies on the field names to map your data to specific properties of the email.

                          • 10. Re: Example: Email users whose extracts fail to refresh
                            Matt Coles

                            So folks, Tableau 10.0 is out now, and it includes a feature for emailing users whose extracts fail to refresh! Huzzah! For those of you who've used this example alert to solve this problem yourselves, but are looking to upgrade to 10.0, you might be wondering...should I keep the existing VizAlert? Or just go with the new feature? Here's a reply to help you consider what avenue you might wish to pursue.

                             

                            VizAlertTableau 10 Feature
                            Timing is delayed from when extract actually fails--at best, it's at least 15 minutes late.Alert is on time, sent when the extract refresh actually fails
                            You must maintain the alert through schema changes due to upgrades, server migrations, and the like.Let Tableau do the work!
                            Unless you prettied up the sorry HTML table I built, the emails aren't easy on the eyes.Tableau branded and formatted emails
                            Current iteration of this example workbook has no knowledge of the new feature for automatically disabling extract refreshes after N concurrent failures.Will inform users that this is the Nth concurrent failure, and that their content's refresh will be disabled after M concurrent failures.
                            Have I mentioned VizAlerts is not officially supported? That's right, it still isn't!Our critically-acclaimed support staff is ready to help you with any issue you might encounter with Tableau products!
                            Users will get an email whether they like it or not (admin controls this).Users may opt-out of all extract refresh failure emails themselves (but cannot pick and choose which)
                            Consolidates several failures into a single email (this can be changed, however).One email per extract refresh failure

                            Content is customizable:

                            • Add details on how to resolve particular failures for your own environment
                            • Add additional hyperlinks or embed different vizzes to help users "see and understand" their own problems
                            Content is not customizable

                            Recipients are customizable:

                            • CC another user for specific extracts, in case one is on vacation
                            • CC the Administrator(s) if you like, for visibility into who might be having problems
                            Recipients are not customizable

                            Send condition is customizable:

                            • In our case, we send alert emails any time an extract on a daily schedule fails, but if it refreshes more frequently than that, we only alert for two concurrent failures or more. This prevents spam.
                            Send condition is not customizable.

                             

                             

                             

                            I hope that helps you make a choice on whether to go with VizAlerts for this feature, or stick with the new feature that 10.0 offers. If you can get away with it, I recommend sticking with the standard feature! It's one less thing for you to manage.

                            2 of 2 people found this helpful
                            • 11. Re: Example: Email users whose extracts fail to refresh
                              abdelmajid elmounjid

                              Hi Matt,

                               

                              I am experiencing an issue with the Daily Extract Failures, do you think the steps that you have provided above will work on my case:

                              "We have a site that is called “CustomServerAdmin”, one of the workbooks in that site is called “ Daily Extract Failures”. that does generate all the extract errors that generated in the server. It does generate the errors from “background tasks for extracts” in the server.

                              Based on that workbook we get the information of (the Extract name, the owner name, and also the site name)

                              And from that we have to email each one of those owners and ask them to take a look at their extract and fix it. However, that demands too much time.

                              We are looking to come up with a new idea of creating an extract table that can include ( User Name, Extract Name, the type of errors) and automatically whenever there is an error of extract we want it to send an email to the users."

                               

                              i really appreciate that,

                              Thank you

                              1. A.Majid
                              • 12. Re: Example: Email users whose extracts fail to refresh
                                Matt Coles

                                Hey Abdelmajid. Yes, that's exactly the scenario the Advanced Alert defined in this workbook was built to solve. You don't need to create any tables in any database to set up who does and doesn't receive emails--simply filter in or out those you do or do not want to receive emails in the sheet, if you like. Keep in mind that you'll need to get VizAlerts set up and running against your Server instance before the workbook above will send any emails.

                                • 14. Re: Example: Email users whose extracts fail to refresh
                                  abdelmajid elmounjid

                                  Hi Matt,

                                   

                                  is there any video that demonstrate the whole process?

                                   

                                  Thanks

                                  1 2 Previous Next