Hi Alex,
Thank you for the reply now i tried another elk machine
Iam trying to schedule a automatic report using watcher and I got email with pdf attachment ,but when is open it says fail to load and the same visualization ,i created a manual report using generated pdf and after some time it loads in to saved objects and I downloaded pdf and able to view the pdf ,
I used
PUT xpack/watcher/watch/cstest_report
{
"trigger" : {
"schedule": {
"interval": "1d"
}
},
"actions" : {
"email_admin" : {
"email": {
"to": "xx@xx",
"subject": "cs test report",
"attachments" : {
"cs_report.pdf" : {
"http" : {
"content_type" : "application/pdf",
"request" : {
"method": "POST",
"scheme": "http",
"headers": {
"kbn-xsrf": "reporting"
},
"auth": {
"basic": {
"username": "elastic",
"password": "xxxx"
}
},
"read_timeout": "300s",
"url": "http://localhost:5601/api/reporting/generate/dashboard/24dfe340-5742-11e7-ab3b-e7e9f2dfdcf8?_g=(refreshInterval:(display:Off,pause:!f,section:0,value:0),time:(from:now%2Fd,mode:quick,to:now%2Fd))&"
}
}
}
}
}
}
}
}
and I want to execute it so i used
POST xpack/watcher/watch/cstest_report/_execute
{
"record_execution": true
}
it will not even take time to load it comes immediately with
{
"id": "cstest_report_2f6a378f-a0ab-4de2-956c-131e6b4b6fbf-2017-06-29T13:38:04.278Z",
"watch_record": {
"watch_id": "cs_test_report",
"state": "executed",
"_status": {
"state": {
"active": true,
"timestamp": "2017-06-29T13:37:59.068Z"
},
"last_checked": "2017-06-29T13:38:04.278Z",
"last_met_condition": "2017-06-29T13:38:04.278Z",
"actions": {
"email_admin": {
"ack": {
"timestamp": "2017-06-29T13:38:04.278Z",
"state": "ackable"
},
"last_execution": {
"timestamp": "2017-06-29T13:38:04.278Z",
"successful": true
},
"last_successful_execution": {
"timestamp": "2017-06-29T13:38:04.278Z",
"successful": true
}
}
}
},
"trigger_event": {
"type": "manual",
"triggered_time": "2017-06-29T13:38:04.278Z",
"manual": {
"schedule": {
"scheduled_time": "2017-06-29T13:38:04.278Z"
}
}
},
"input": {
"none": {}
},
"condition": {
"always": {}
},
"result": {
"execution_time": "2017-06-29T13:38:04.278Z",
"execution_duration": 254,
"input": {
"type": "none",
"status": "success",
"payload": {}
},
"condition": {
"type": "always",
"status": "success",
"met": true
},
"actions": [
{
"id": "email_admin",
"type": "email",
"status": "success",
"email": {
"account": "standard_account",
"message": {
"id": "cs_test_report_2f6a378f-a0ab-4de2-956c-131e6b4b6fbf-2017-06-29T13:38:04.278Z",
"from": "xx@xx",
"sent_date": "2017-06-29T13:38:04.383Z",
"to": [
"xx@xx"
],
"subject": "cs test report"
}
}
}
]
},
"messages": []
}
}
I will receive an email and if i try to open it will say fail to load it , but if i go to saved objects i have all the list of generated automatic reports but I dont want to download it from kibana I want it to view from email.
Please help me to fix this issue.
Thanks in advance,
Raj