sentinl: puppeteer error when running reports
System Details
Versions
Type | Version |
---|---|
Kibana | 6.5.1 |
Elasticsearc | 6.5.1 |
Server OS | CentOS 7 in a container |
Browser | chrome |
Original Install Method
- Release pkg link
- Gulp
- Source
- Other:
Bug Details
Bug Description
we have created a report to run every day at midnight and report via email the screenshot of a dashboard.
when we run the report manually, it is executed but console reports an error related to executing puppeteer. Logs are below
Steps to Reproduce
- setup report
- manually executed report
Expected Behavior
report executed and snapshot delivered via email
Full Watcher JSON
{
"actions": {
"Report_screenshot_2837ef95-38a7-470d-8e9c-30d6bc58ee52": {
"name": "Report screenshot",
"throttle_period": "15m",
"report": {
"auth": {
"mode": "basic",
"active": false
},
"priority": "low",
"stateless": false,
"body": "You can find the screenshot in the attachment.",
"save": true,
"snapshot": {
"res": "1920x1080",
"url": "http://<hidden>/goto/c4fb613c62c653e149c994925e03a865",
"params": {
"delay": 30000,
"crop": "false"
},
"type": "png",
"name": "Daily dashboard (dev-cluster)"
},
"to": "hidden@abc.def",
"from": "hidden@abc.def",
"subject": "Dev dashboard"
}
}
},
"input": {
"search": {
"request": {
"index": [
"*"
],
"body": {
"query": {
"bool": {
"filter": {
"range": {
"@timestamp": {
"gte": "now-24h/h",
"lte": "now/h",
"format": "epoch_millis"
}
}
}
}
},
"size": 0,
"aggs": {
"dateAgg": {
"date_histogram": {
"field": "@timestamp",
"time_zone": "Europe/Amsterdam",
"interval": "1h",
"min_doc_count": 1
}
}
}
}
}
}
},
"condition": {
"script": {
"script": "payload.aggregations.dateAgg.buckets.some(b => b.doc_count>=0)"
}
},
"trigger": {
"schedule": {
"later": "at 23:59"
}
},
"disable": false,
"report": false,
"title": "Daily dashboard (dev cluster)",
"wizard": {
"chart_query_params": {
"queryType": "count",
"scheduleType": "human",
"over": {
"type": "all docs"
},
"last": {
"unit": "hours",
"n": 24
},
"interval": {
"unit": "hours",
"n": 1
},
"timezoneName": "Europe/Amsterdam",
"threshold": {
"n": 0,
"direction": "above eq"
},
"timeField": "@timestamp"
}
},
"save_payload": false,
"spy": false,
"impersonate": false
}
Kibana logs and/or server output (attached if relevant)
{"type":"log","@timestamp":"2018-12-11T13:07:40Z","tags":["info","Sentinl","watcher_handler"],"pid":14,"message":"executing"}
{"type":"log","@timestamp":"2018-12-11T13:07:40Z","tags":["warning","Sentinl","watcher_handler"],"pid":14,"message":"Siren federate: \"elasticsearch.plugins\" is not available when running from kibana: Error: Unknown config key: investigate_core.clusterplugins"}
{"type":"log","@timestamp":"2018-12-11T13:07:42Z","tags":["info","Sentinl","watcher_handler"],"pid":14,"message":"successfully applied condition"}
{"type":"log","@timestamp":"2018-12-11T13:07:42Z","tags":["info","Sentinl","report"],"pid":14,"message":"Daily dashboard (dev cluster), executing report by \"puppeteer\""}
{"type":"log","@timestamp":"2018-12-11T13:07:42Z","tags":["info","Sentinl","report"],"pid":14,"message":"Daily dashboard (dev cluster), browser: \"/opt/ipt/kibana-6.5.1/plugins/sentinl/node_modules/puppeteer/.local-chromium/linux-564778/chrome-linux/chrome\""}
{"type":"log","@timestamp":"2018-12-11T13:07:42Z","tags":["info","Sentinl","watcher_handler"],"pid":14,"message":"successfuly executed"}
{"type":"response","@timestamp":"2018-12-11T13:07:40Z","tags":[],"pid":14,"method":"post","statusCode":200,"req":{"url":"/api/sentinl/watcher/_execute","method":"post","headers":{"host":"10.221.3.107","content-length":"1372","accept":"application/json, text/plain, */*","origin":"http://10.221.3.107","kbn-version":"6.5.1","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://10.221.3.107/logging/app/sentinl","accept-encoding":"gzip, deflate","accept-language":"en-GB,en;q=0.9,it-IT;q=0.8,it;q=0.7,en-US;q=0.6","dnt":"1","forwarded":"for=10.221.124.7;proto=http","x-forwarded-proto":"https","x-forwarded-for":"10.221.124.7","connection":"close"},"remoteAddress":"10.0.0.11","userAgent":"10.0.0.11","referer":"http://10.221.3.107/logging/app/sentinl"},"res":{"statusCode":200,"responseTime":1541,"contentLength":9},"message":"POST /api/sentinl/watcher/_execute 200 1541ms - 9.0B"}
{"type":"log","@timestamp":"2018-12-11T13:07:42Z","tags":["error","Sentinl"],"pid":14,"message":"Daily dashboard (dev cluster): report action : execute : run 'puppeteer' report : puppeteer work: ActionError: puppeteer work\n at puppeteerReport (/opt/ipt/kibana-6.5.1/plugins/sentinl/server/lib/actions/report/puppeteer.js:113:13)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)"}
Any additional information
other actions involving sending email or reporting to console work OK. the porblem seems confined to only running the puppeteer work
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 31 (14 by maintainers)
Commits related to this issue
- Make report executable, fix report bugs, catch errors (#638) * Set 2 engines for report: horseman and puppeteer. Set authentication per watcher. * Make horseman default engine for report. * Puppete... — committed to rpatil524/sentinl by sergibondarenko 6 years ago
- Make report executable, fix report bugs, catch errors (#638) (#639) * Make report executable, fix report bugs, catch errors (#638) * Set 2 engines for report: horseman and puppeteer. Set authentic... — committed to rpatil524/sentinl by sergibondarenko 6 years ago
Hello - much better now in all fronts except that now PNGs are cropped.
I mean - some dashboards that in PDF are rendered over multiple pages, when done in PNG, only the first page is set.