* [DOCS] Updates to thee Reporting docs * Adds the main sharing page * Final changes * Changed configuring-reporting link to secure-reporting * Updates from meeting with Tim and Larry * Moves reporting and sharing content above ML * Update docs/setup/configuring-reporting.asciidoc Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * Review comments from Tim and Larry * Fixes broken links * Fixes redirect * Fixes broken link from ES docs * Adds metadata to changed pages * Review comments Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
55 lines
2.1 KiB
Text
55 lines
2.1 KiB
Text
To configure a watch to email reports, use the `reporting` attachment type in an `email` action. For more information, refer to {ref}/actions-email.html#configuring-email[Configuring email accounts].
|
|
|
|
For example, the following watch generates a PDF report and emails the report every hour:
|
|
|
|
[source,js]
|
|
---------------------------------------------------------
|
|
PUT _watcher/watch/error_report
|
|
{
|
|
"trigger" : {
|
|
"schedule": {
|
|
"interval": "1h"
|
|
}
|
|
},
|
|
"actions" : {
|
|
"email_admin" : { <1>
|
|
"email": {
|
|
"to": "'Recipient Name <recipient@example.com>'",
|
|
"subject": "Error Monitoring Report",
|
|
"attachments" : {
|
|
"error_report.pdf" : {
|
|
"reporting" : {
|
|
"url": "http://0.0.0.0:5601/api/reporting/generate/printablePdf?jobParams=...", <2>
|
|
"retries":40, <3>
|
|
"interval":"15s", <4>
|
|
"auth":{ <5>
|
|
"basic":{
|
|
"username":"elastic",
|
|
"password":"changeme"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
---------------------------------------------------------
|
|
// CONSOLE
|
|
|
|
<1> Configure at least one email account to enable Watcher to send email. For more information, refer to {ref}/actions-email.html#configuring-email[Configuring email accounts].
|
|
<2> An example POST URL. You can copy and paste the URL for any report.
|
|
<3> Optional, default is `40`.
|
|
<4> Optional, default is `15s`.
|
|
<5> User credentials for a user with permission to access {kib} and the {report-features}. For more information, refer to <<secure-reporting>>.
|
|
|
|
[NOTE]
|
|
====
|
|
*Reporting* is integrated with Watcher only as an email attachment type.
|
|
|
|
The report generation URL might contain date-math expressions that cause the watch to fail with a `parse_exception`. To avoid a failed watch, remove curly braces `{` `}` from date-math expressions and URL-encode characters.
|
|
For example, `...(range:(%27@timestamp%27:(gte:now-15m%2Fd,lte:now%2Fd))))...`
|
|
|
|
For more information about configuring watches, refer to {ref}/how-watcher-works.html[How Watcher works].
|
|
====
|