Fetching a reporting dashboard that has been setup on Kibana as an email attachment using a Watch

alerting

(Indiresh Ds) #1

Hi there,

I am trying to fetch the dashboard that is setup as an email attachment. I followed the instructions mentioned at https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html

But somehow, it seems like the "email_admin" tag does not work. Can this be done in any other way? Because I would really like to receive some very important dashboards as email alerts as it would eliminate the dependency of having to visit the portal every time I want to view the dashboard. Please find the below script that I have currently configured in order to achieve this.


{
"trigger" : {
"schedule": {
"interval": "1h"
}
},
"actions" : {
"email_admin" : {
"email": {
"to": "abc@abc.com",
"subject": "Error Monitoring Report",
"attachments" : {
"error_report.pdf" : {
"reporting" : {
"url": "https://<my_reporting_url>",
"retries":6,
"interval":"1s",
"auth":{
"basic":{
"username":"",//I tried entering my Kibana login credentials here. But clearly, I don't think that will work since "email_admin" //probably refers to an admin user. And I am not an admin user.
"password":""
}
}
}
}
}
}
}
}
}


(Bhavya R M) #2

Hi,

You need to configure the email address in elasticsearch.yml. Here are our docs:
https://www.elastic.co/guide/en/x-pack/6.1/actions-email.html#configuring-email

https://www.elastic.co/guide/en/x-pack/6.1/actions-email.html#configuring-email

Let me know if this doesn't help?

Thanks,
Bhavya


(Indiresh Ds) #3

Hello Bhavya,

Thank you so much for your response. :slight_smile:

My email address has been configured in elasticsearch.yml

I have already configured several other watches that are successfully returning log payload info as email alerts.

I was concerned about the role of the "email_admin" tag. But it looks like it has nothing to do with access permissions, etc. Like I guessed, if my email address is configured in elasticsearch.yml, I should be able to receive reports through email. Thank you once again for confirming this point. :slight_smile:

However, I would like to bring to your notice that I see an error saying "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" when I tried simulating the watch.

I did not want to pose this question earlier because I really wasn't sure whether this was the only factor responsible for failure. But now I think I am pretty sure. :slight_smile:

This obviously means that Kibana's self signed certificate is not being recognized by Watcher, right? And in order to resolve this and achieve generation of automated reports, I am supposed to ensure that justified certificate authorities are in place. Am I correct? I came to this conclusion after referring to the last couple of comments at https://github.com/elastic/kibana/issues/9783


(Bhavya R M) #4

Yep :). That's correct.

We have this blogpost https://www.elastic.co/blog/tls-elastic-stack-elasticsearch-kibana-logstash-filebeat for reference if you need help.

Thanks,
Bhavya


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.