Hey Jegan! Thanks for trying it out.
It looks like you're running it from c:\ as your working directory? By default, the config values point to relative paths to point the code to the logs, ops, and config folders. So it'll be looking for c:\config to get the vizalerts.yaml file. Easily fixed, however. If you've copied the files to C:\Documents\VizAlerts, you should set the working directory in line 2 as shown--then I expect you'll get past this error:
c: cd c:\documents\vizalerts python vizalerts.py
Let me know if that helps!
(edit: fixed typo "config" not "conf")
Thanks Matt. That worked. I get a -1 for the trusted ticket. I'm running this on the Tableau server instance. I'm reading your common errors section to debug.
1 of 1 people found this helpful
Good ol' -1. You gotta love it. If you're running VizAlerts against a standalone test Server instance, and it's running on the Tableau Server host itself, I recommend setting the trusted host to "localhost" via tabadmin:
tabadmin set wgserver.trusted_hosts localhost tabadmin configure tabadmin restart
then use the following settings in your config (substitute your username for "mcoles"...also this assumes you're using local authentication, and not Active Directory):
It worked! I had qualified the username with the domain id. Turns out I was using local authentication. I removed the domain and it is all good now. On to the next step.
Glad to hear it! Let me know how it goes!
I'm having trouble with the Subscriptions. I have opened a ticket with Tableau. I will be back testing as soon as that is resolved.
What's the problem? It's highly likely I've hit it before and can help.
I get an error that is similar to this quick fix issue - Error "javax.mail.MessagingException: [EOF]" Sending Subscriptions | Tableau Software
I have made sure the port is correct and the mail server works from other applications like SSIS.
Okay, couple things just to ensure we're not barking up the wrong tree here:
1. Subscriptions Schedules in Tableau Server that you set up for VizAlerts need to be disabled. Therefore, Tableau Server should not be sending any subscriptions out for those schedules at all.
2. If you are having issues setting up your SMTP server for VizAlerts, I highly recommend using a free little tool called PaperCut, which emulates an SMTP server on whatever machine you run it on. So you could install that on the same machine you set up VizAlerts on, and edit vizalerts.yaml so that the smtp settings are as follows:
What that does for you is intercepts all the mail that VizAlerts would be sending, and shows it in a nice little UI. So that's an easy way to test VizAlerts (just by yourself) without having to worry about connecting to a real SMTP server that will really send mail. I'm so in love with this little app that I'm going to add instructions for how to use it for testing to a Quickstart guide soon.
The subscription schedule for the alerts is disabled. I loaded PaperCut and ran the test. There were no emails received. Here is the log -
2015-10-07 12:41:53 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2015-10-07.log
2015-10-07 12:41:53 - [DEBUG] - trusted_ticket_test - testing trusted ticket: ,<snipped>, None
2015-10-07 12:41:53 - [DEBUG] - get_trusted_ticket - Generating trusted ticket.
Request details: Server: <snipped>, Site: , Username: <snipped>, Url: <snipped>, Postdata: username=<snipped>.
2015-10-07 12:41:53 - [DEBUG] - get_trusted_ticket - Got ticket: PACNCar78kubsQ7ecoVgDgZW
2015-10-07 12:41:53 - [DEBUG] - trusted_ticket_test - Generated test trusted ticket. Value is: PACNCar78kubsQ7ecoVgDgZW
2015-10-07 12:41:53 - [DEBUG] - get_views - PostgreSQL repository returned 1 rows
2015-10-07 12:41:53 - [INFO] - main - Processing a total of 0 views
Things look like they are working as expected. The python script is meant to be running continually (every minute via Scheduled Task, as mentioned in the install_guide.docx file). The way it works is, when you run it initially, it grabs a list of all the alerts from Tableau Server and marks the time that they should next be run. Each time the script runs thereafter, it checks the time it collected the first time around, and checks to see if it’s been passed. If it has, it triggers the alert test.
You can force it to test a specific alert view that you own by adding the comment "test_alert" to it, then running the vizalerts.py script twice (one to pick up that a test was requested, the next to actually fire it off).
If that works, try running vizalerts.py manually sometime after your alert was scheduled to fire off. For example, if you have an Hourly schedule set up to run on the hour, run vizalerts.py again any time after 1:00pm. You should see log output indicating that it is exporting the CSV data from the view--that tells you that it's doing what it should be doing.
Again, this script is meant to be run continually every minute--that is the only way it will send alerts on time.
Ah I get it. I ran the vizalerts.py again after 15 mins and it generated the email. Works great! I'll test the Advanced options next. Thank you.