I use version 5.6.5 of the ELK stack, running under docker.
I have a watch that is supposed to run once per month on the 1st of the month and send an email with a PDF report attached containing stats for the previous month.
When I simulate the watch via the Kibana UI, it works and I receive an email with an attachment that contains the correct dashboard data.
However, when the watch triggers on the 1st of the month, I receive no email and the only log entry I can find is in my kibana.log, telling me "statusCode": 500".
I've diffed the kibana log entries for the successful manual report generation and the failed automagic watcher generation and apart from the status code and time stamp/duration, they are identical.
Where do I go next to try and find out what is causing this 500 error on the automagic run?
I think the PDF link you provided may not be the correct one. The documentation shows a direct link to the dashboard, where as you are calling the generatePDF URL. Can you try to specify the dashboard, like done in the docs linking to the dashboard?
The URL reported in the error is only the path; the full URL is the one I copied from the Dashboard > Reporting > Generation URL. The rest of the URL is parsed by the watch config and ends up in "params": { "jobParams" } in the config (it's in the pastebin).
The job only errors when it's run by a watch on the timer, when I kick it off manual via Simulate (with identical settings) it works fine.
Is there anything we can improve our docs on, so that this is more obvious you should use the reporting action for this task? Would love to get some feedback here, so others dont fall into the same trap.
I'm not 100% sure - I originally set up this watch a good 6 months ago or so. I found an example on the ES docs site and customised that, but I cannot for the life of me find that example again :-/
Probably the easiest way to stop the trap is to add a little validator on the watch save form; make it pop up an error that mentions "Use reporting instead". From there a docs search should've probably seen me sorted
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.