I'm experiencing an issue with x-pack 5.0.0 alpha 3. I've set up an email action in XPack Watcher to send an email with a PDF attachment of a report as follows:
I get the following error message when I check the status of the watch:
"actions": [
{
"id": "send_email",
"type": "email",
"status": "failure",
"reason": "Unable to get attachment of type [http] with id [my_report.pdf] in watch [scorecard_4] aborting watch execution"
}
]
Same here. I wonder if it is possible to generate & attach report to email action.
I noticed that the response to reporting/generate contains an id which is the reporting job id. The job id can then be concatenated to http://localhost:5601/api/reporting/jobs/download/ to form a url to download the report.
Suppose the id is iqjdo57d0726f7fb244dxvgp, the url will be http://localhost:5601/api/reporting/jobs/download/iqjdo57d0726f7fb244dxvgp. This works fine if I open this link in any browser but when I try to attach it in the email action as the url for the request it corrupts pdf...
I think that the download from reporting/jobs/download fails during email action because of authentication. Disabling X-Pack security fixed the issue.
I will try to modify the request in the email action to contain auth (Authentication related HTTP headers. Currently, only basic authentication is supported.)
right now, there is no synchronous downloading of that PDF, you can just trigger its creation. This will come very soon though, so that watcher will be able to download the PDF directly and attach it to an email.
Thank you for your quick response. One question though (actually two) - any chance that soon is 5 GA release?
The second question - is it possible to download that PDF when Security (Shield) enabled? When Security is off, I am able to specify the report's url in the email action in http in request and everything works like a charm. When Security is on it doesn't work. I tried adding basic authentication by adding the auth to the request (similar to WebHook examples) but it didn't help either.
there will be beta releases before GA, so this will take some more time. And yes, it will be possible to download PDFs with security enabled. All we need is the ability to download the PDF in sync from Kibana, which will be released with the next test version of the Elastic Stack.
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.