Send emails with PDF Dashboard

Hello,

I read the documentation about sending email with PDF dashboard in the attachment >>> Automatically generate reports | Kibana Guide [8.9] | Elastic

I wanted to create my own watcher. My Kibana version is 7.17.8

Manually generating PDF reports works.
I read that URL should be URL for printable dashboard:

So I copied POST URL from dashboard:

Problem is that my watcher has this alert:

My watcher looks like this. Please, how can I fix it? :slight_smile:

{
  "trigger": {
    "schedule": {
      "interval": "3m"
    }
  },
  "input": {
    "none": {}
  },
  "condition": {
    "always": {}
  },
  "actions": {
    "send_email": {
      "email": {
        "profile": "standard",
        "attachments": {
          "xxx.pdf": {
            "reporting": {
              "url": "https://xxxxx.cz/api/reporting/generate/printablePdfV2?jobParams=h%3A%21f%2CviewMode%3Aview%29%2Cversion%3A%277.17.8%27%29%29%2CobjectType%3Adashboard%2Ctitle%3A%27GSK%20SQL%20DWH%27%2Cversion%3A%277.17.8%27%29",
              "retries": 40,
              "interval": "15s",
              "auth": {
                "basic": {
                  "username": "elastic",
                  "password": "::es_redacted::"
                }
              }
            }
          }
        },
        "to": [
          "katerina.xx@xx.cz"
        ],
        "subject": "YX"
      }
    }
  }
}

Thank you,

Regards,
Katerina

Hi @hofrichterovak,

My hunch is you need "xpack.http.ssl.certificate_authorities" configured in elasticsearch.yml file of all the nodes in your cluster. See here for more information on that specific setting.

Hello,

I added this "xpack.http.ssl.certificate_authorities" , but it shows me still the same mistake.
Please, where can be problem?

Here is my security configuration:

----------------------------------Xpack----------------------------------------

xpack.http.ssl.certificate_authorities: certs/ca.pem

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
#xpack.security.transport.ssl.verification_mode: none
xpack.security.transport.ssl.verification_mode: full

xpack.security.transport.ssl.key: certs/xx.key
xpack.security.transport.ssl.certificate: certs/xy.crt
xpack.security.transport.ssl.certificate_authorities: certs/ca.crt

xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.certificate_authorities: certs/ca.crt
xpack.security.http.ssl.key: certs/xx.key
xpack.security.http.ssl.certificate: certs/xy.crt

##############
"actions": [
{
"id": "send_email",
"type": "email",
"status": "failure",
"error": {
"root_cause": [
{
"type": "s_s_l_handshake_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
}
],
"type": "s_s_l_handshake_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
"caused_by": {
"type": "validator_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
"caused_by": {
"type": "sun_cert_path_builder_exception",
"reason": "unable to find valid certification path to requested target"
}
}
}
}
]
},

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