Hello Everyone,
I have configured the watcher to send email with dashboard preview attachment as PDF or PNG, it generate the report (can be found in Kibana report) and send the email. But somehow the email attachment get broken with error "Failed to load pdf document". Not sure if there is any formatting issue in here. Can somebody help....
PUT _watcher/watch/demo_report_8
{
"trigger" : {
"schedule": {
"interval": "1h"
}
},
"actions" : {
"email_admin" : {
"email" : {
"to": "abc@abc.com",
"cc": "xyz@abc.com",
"subject": "Monitoring Report",
"body" : "{{ctx.payload.hits.total}} Metricbeat Report",
"attachments" : {
"Metricbeat.png" : {
"http" : {
"content_type" : "image/png",
"request" : {
"method": "POST",
"headers": {
"kbn-xsrf": "reporting"
},
"read_timeout": "300s",
"auth":{
"basic":{
"username":"elastic",
"password":"******"
}
},
"url": "http://0.0.0.0:5601/api/reporting/generate/dashboard/Metricbeat-system-overview-ecs?_g=(time:(from:now-1d%2Fd,mode:quick,to:now-1d%2Fd))&sync"
}
}
}
}
}
}
}
}