martinm76 / zabbix-pdf-report

Reporting tool in PHP for the Zabbix Monitoring Platform. Rather versatile reporting on hosts and host groups.
https://www.zabbix.com/forum/zabbix-cookbook/25368-zabbix-dynamic-pdf-report-generation?filter_time=time_lastmonth
GNU General Public License v3.0
52 stars 55 forks source link

zabbix pdf generation using curl command #10

Closed Pranesh1114 closed 4 years ago

Pranesh1114 commented 4 years ago

how to generate zabbix dynamic pdf report via curl command

martinm76 commented 4 years ago

You can do something like this: curl -L -o ZabbixServer.pdf 'http://localhost/report/createpdf.php?ReportType=host&HostID=10084&GroupID=&GraphsOn=yes&ItemGraphsOn=yes&TriggersOn=yes&ItemsOn=yes&TrendsOn=yes&mygraphs2=%23%28Ping%7CCPU+load%7CCPU+usage%7CCPU+util%7Cprocessor%7CDisk+space%7CSwap%7CEthernet%7CMemory+usage%7C%5ETraffic+on+%7Ctraffic+on+eth%29%23&myitems2=%23%28Utilization+of%7Cfarm+connection%7CAverage+Latency%7CNumber+of+processes%7CCache+%25+Hit%29%23&ReportRange=last&timePeriod=Week&startdate=&starttime=&enddate=&endtime=' ^-> That is ONE line.

Get the request you want from the access_log and set the filename after -o to what you want the report to be called. You need to add either http://localhost or https://localhost to the URL, assuming you have installed the report in /report from the base URL of the webserver.