Closed andreaconsadoriw closed 4 years ago
Thank you very much for building this Martin. I'd also like to be able to schedule weekly/monthly reports by email.
Hi, for a quick, really dirty solution check my repository, no enough time to write down any doc... https://github.com/jamaisx/zabbix-pdf-report
Has anyone been able to create the reports automatically and send them by email?
When calling the script via localhost it doesn't require authentication and uses credentials from the config file instead. So generate the pdf with a curl call and send it.
curl -L -s -o /tmp/report.pdf "http://localhost/zabbix-pdf-report/createpdf.php?ReportType=hostgroup&TriggersOn=yes&GroupID=42&ReportRange=last&timePeriod=Week"
echo "Zabbix report" | mail -s "Zabbix report" -a "From: zabbix@example.org" -A /tmp/report.pdf recipient@example.org
That's all.
I can confirm that the curl solution works fine. I usually install the report to /report,so depending on how you install it, the URL needs some adjustment, but you should probably get the request from access_log anyway and adapt to curl after that.
When calling the script via localhost it doesn't require authentication and uses credentials from the config file instead. So generate the pdf with a curl call and send it.
curl -L -s -o /tmp/report.pdf "http://localhost/zabbix-pdf-report/createpdf.php?ReportType=hostgroup&TriggersOn=yes&GroupID=42&ReportRange=last&timePeriod=Week" echo "Zabbix report" | mail -s "Zabbix report" -a "From: zabbix@example.org" -A /tmp/report.pdf recipient@example.org
That's all.
Hey sir , please when i place this script and cron , report still dosent sent automatically any modifications?
When calling the script via localhost it doesn't require authentication and uses credentials from the config file instead. So generate the pdf with a curl call and send it.
curl -L -s -o /tmp/report.pdf "http://localhost/zabbix-pdf-report/createpdf.php?ReportType=hostgroup&TriggersOn=yes&GroupID=42&ReportRange=last&timePeriod=Week" echo "Zabbix report" | mail -s "Zabbix report" -a "From: zabbix@example.org" -A /tmp/report.pdf recipient@example.org
That's all.
Hey sir , please when i place this script and cron , report still dosent sent automatically any modifications?
Sorry, can't help you without knowing anything about your setup. Maybe this helps you. If not, feel free to ask a question on SF.
it's possible to create a scheduled report and send it via tools like swaks?