Well, it is not really optimized for running unattended (via mail), but it should be doable. You need to configure at least $z_server, $z_user and $z_pass with values that match your setup. I have my reports outside the main zabbix directory at the root level of the WWW. If you have yours somewhere else, you need to adjust $pdf_report_url.
You probably also want to set $user_login = 0, so you won't be prompted for login details, if you are going the mail route.
Then you should be able to do something like this:
# wget -O report.pdf "http://zabbix.domain.org/report/createpdf.php?ReportType=host&HostID=10401&graphs= Graphs&triggers=Triggers&ReportRange=last&timePeri od=Day"
--2015-03-23 16:02:09-- http://zabbix.domain.org/report/crea...timePeriod=Day
...
Sted: ./reports/BKidm01.pdf [omdirigeret]
--2015-03-23 16:02:16-- http://zabbix.domain.org/report/reports/BKidm01.pdf
Connecting to zabbix.domain.org|xx.xx.xx.xx|:80... forbundet.
HTTP forespørgsel sendt, afventer svar... 200 OK
Længde: 286499 (280K) [application/pdf]
Saving to: `report.pdf'
100%[================================================== ================================================== ================================================== ==============================================>] 286.499 --.-K/s in 0s
2015-03-23 16:02:16 (577 MB/s) - `report.pdf' saved [286499/286499]
Naturally you need to replace zabbix.domain.org with the path that fits your environment and HostID with the ID matching the machine you want a report for (or the hostgroup ID, etc.)
Then you need to mail the PDF after that, usually something like this:
mail -s "PDF report for ZZZZ" -a report.pdf [email protected] <<EOF
Please find attached your PDF report for ZZZZ
EOF
You probably also want to set $user_login = 0, so you won't be prompted for login details, if you are going the mail route.
Then you should be able to do something like this:
# wget -O report.pdf "http://zabbix.domain.org/report/createpdf.php?ReportType=host&HostID=10401&graphs= Graphs&triggers=Triggers&ReportRange=last&timePeri od=Day"
--2015-03-23 16:02:09-- http://zabbix.domain.org/report/crea...timePeriod=Day
...
Sted: ./reports/BKidm01.pdf [omdirigeret]
--2015-03-23 16:02:16-- http://zabbix.domain.org/report/reports/BKidm01.pdf
Connecting to zabbix.domain.org|xx.xx.xx.xx|:80... forbundet.
HTTP forespørgsel sendt, afventer svar... 200 OK
Længde: 286499 (280K) [application/pdf]
Saving to: `report.pdf'
100%[================================================== ================================================== ================================================== ==============================================>] 286.499 --.-K/s in 0s
2015-03-23 16:02:16 (577 MB/s) - `report.pdf' saved [286499/286499]
Naturally you need to replace zabbix.domain.org with the path that fits your environment and HostID with the ID matching the machine you want a report for (or the hostgroup ID, etc.)
Then you need to mail the PDF after that, usually something like this:
mail -s "PDF report for ZZZZ" -a report.pdf [email protected] <<EOF
Please find attached your PDF report for ZZZZ
EOF
Comment