Ad Widget
Collapse
Zabbix Dynamic PDF Report Generation
Collapse
X
-
the same here... the pdf is generating well but no graph in it.
When I look the apache errors.log, I can see this :
PHP Warning: unlink(zabbix_cookie_2282.txt): No such file or directory in /var/www/zabbix/custom_pages/generatereport.php on line 44, referer: [...]/custom_pages/pdfform.php
PHP Warning: unlink(zabbix_cookie_2279.txt): No such file or directory in /var/www/zabbix/custom_pages/generatereport.php on line 44, referer: [...]/custom_pages/pdfform.php
PHP Warning: unlink(zabbix_cookie_2295.txt): No such file or directory in /var/www/zabbix/custom_pages/generatereport.php on line 44, referer: [...]/custom_pages/pdfform.php
PHP Warning: unlink(zabbix_cookie_2281.txt): No such file or directory in /var/www/zabbix/custom_pages/generatereport.php on line 44, referer: [...]/custom_pages/pdfform.php
PHP Notice: getimagesize(): Read error! in /var/www/zabbix/custom_pages/class.ezpdf.php on line 1319, referer: [...]/custom_pages/pdfform.php
PHP Notice: getimagesize(): Read error! in /var/www/zabbix/custom_pages/class.ezpdf.php on line 1319, referer: [...]/custom_pages/pdfform.php
PHP Notice: getimagesize(): Read error! in /var/www/zabbix/custom_pages/class.ezpdf.php on line 1319, referer: [...]/custom_pages/pdfform.php
PHP Notice: getimagesize(): Read error! in /var/www/zabbix/custom_pages/class.ezpdf.php on line 1319, referer: [...]/custom_pages/pdfform.php
Any hints ?Comment
-
other way for the reports
Hi Boe,
would you have any ways for the report? I need this report to complete my Zabbix.
Thanks very much!!
Comment
-
Documentation
Hello,
I much appreciate this feature
however I'm uncertain how to use it.
I have Zabbix v2.2 running under Ubuntu 14.04 and I got to the point of generating the sample PDF report just fine, no errors whatsoever.
How should I be adding the stuff I want to my report form? It would be great some sort of readme file describing how to actually build the reports.
Any help will be very appreciated.
EDIT:
Concretely, the problem I was running into was that I'd like see just an "ALL" option when choosing the hosts to generate the report from and that no graph would be added to the report.
It turns out that this is a common issue associated with versions 2.0 and on. If anyone is having that same trouble, please consider checking out post #65 in this thread by user "yso" at page 7. That completely nailed it for me, just don't forget to restart apache service after you do the suggested changes.Comment
-
same problem
Hi Eddriks, what do you mean by that? I have the same problems. I don;t know why. Could you help me?
on apache error log :
Undefined variable: offset in /usr/share/zabbix/custom_pages/class.ezpdf.php on line 1392
Undefined variable: temp in /usr/share/zabbix/custom_pages/class.ezpdf.php on line 1416
Thank you,Last edited by budiman; 15-08-2014, 10:30.Comment
-
Same problem whereHi Eddriks, what do you mean by that? I have the same problems. I don;t know why. Could you help me?
on apache error log :
Undefined variable: offset in /usr/share/zabbix/custom_pages/class.ezpdf.php on line 1392
Undefined variable: temp in /usr/share/zabbix/custom_pages/class.ezpdf.php on line 1416
Thank you,
[Tue Aug 26 09:32:29 2014] [error] [client 192.168.1.10] PHP Notice: Undefined variable: temp in /var/www/html/zabbix/report/class.ezpdf.php on line 1416, referer: http://xxxxx.xxxxx.com.br/report/pdfform.php
[Tue Aug 26 09:32:29 2014] [error] [client 192.168.1.10] PHP Notice: Undefined variable: offset in /var/www/html/zabbix/report/class.ezpdf.php on line 1392, referer: http://xxxxx.xxxxx.com.br/report/pdfform.phpComment
-
-
Hi, i have one problem :-)
my zabbix version is 2.0.8
Apache log:
[Fri Aug 29 12:07:59 2014] [error] [client 10.0.37.138] PHP Fatal error: Call to undefined function json_encode() in /usr/share/zabbix/zabbix_report_generation/ZabbixAPI.class.php on line 220, referer: http://172.25.1.13/zabbix/screens.ph...de08de93b86d2a
<?php
//CONFIGURABLE
# zabbix server info(user must have API access)
$z_server = 'http://172.25.1.13/zabbix/';
$z_user = 'admin';
$z_pass = 'password';
# tmp_images directory path
$z_img_path = '/usr/share/zabbix/zabbix_report_generation/tmp_images/';
# should be the tail of the URL
$pdf_location = $z_server ."zabbix_report_generation/pdf.php";
# paper settings
$paper_format = 'LETTER'; // formats supported: 4A0, 2A0, A0 -> A10, B0 -> B10, C0 -> C10, RA0 -> RA4, SRA0 -> SRA4, LETTER, LEGAL, EXECUTIVE, FOLIO
$paper_oreintation = 'portrait'; // formats supported: portrait / landscape
# time zone
$timezone = 'EST';
//DO NOT CHANGE BELOW THIS LINE
$z_tmp_cookies = "";
$z_url_index = $z_server ."index.php";
$z_url_graph = $z_server ."chart2.php";
$z_url_api = $z_server ."api_jsonrpc.php";
//$z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Enter";
$z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Sign in";
$data = './data.txt';
?>Comment
-
Dynamic PDF Generator rewritten - v0.5
I've rewritten most of the code for the Dynamic PDF Generator to suit me better. I have not done much changes with the code that do the actual PDF generation.
Maybe someone else will find this modified version useful as well.
I don't use this through a screen since the screen refreshes, and some larger reports may take a while to generate.
I just install this under the web-folder as "report". You may need to adjust some parameters in config.inc.php, in particular:
$z_server = 'http://your-zabbix-server-address/zabbix/';
$z_user = 'Admin';
$z_pass = 'ChangePassword';
$company_name = 'Zabbix'; // Used in PDF Report
The index page now is a bit more loaded with Javascript - mostly Jquery to help with typeable selector, calendar, hiding/displaying fields based on radio buttons.
Changes (that I can remember
:
* inc/: Moved included files to its own folder
* js/ : Created javascript (jquery) files in its own folder
* css/: Moved css files to its own folder. Added some of Zabbix CSS to
these.
* index.php: Rewrote all of "pdfform.php" and created it as just index.php.
* index.php: Allows reporting on group. Uses GroupID and HostID from
Zabbix API (not name).
* index.php: Uses Jquery (javascript) for many of the functions on the index page.
* index.php: Uses Jquery Calendar to select range for custom timeframe
* index.php: Uses Jquery Selector2 where you can search in the select
box. Good for installations with many groups/hosts.
* createpdf.php: Merged and rewrote code for pdf.php and
generatedreport.php.
* createpdf.php: Stores created reports in reports subdirectory. Does
* createpdf.php: Added some sanitization with filter_input on some
_GET variables. Need to implement on more.
* inc/index.functions.php: Moved some common function in index.php to
an included file
* inc/createpdf.functions.php: Moved common function from createpdf.php
Download:
Comment
-
I've rewritten most of the code for the Dynamic PDF Generator to suit me better. I have not done much changes with the code that do the actual PDF generation.
Maybe someone else will find this modified version useful as well.
I don't use this through a screen since the screen refreshes, and some larger reports may take a while to generate.
I just install this under the web-folder as "report". You may need to adjust some parameters in config.inc.php, in particular:
$z_server = 'http://your-zabbix-server-address/zabbix/';
$z_user = 'Admin';
$z_pass = 'ChangePassword';
$company_name = 'Zabbix'; // Used in PDF Report
The index page now is a bit more loaded with Javascript - mostly Jquery to help with typeable selector, calendar, hiding/displaying fields based on radio buttons.
Changes (that I can remember
:
* inc/: Moved included files to its own folder
* js/ : Created javascript (jquery) files in its own folder
* css/: Moved css files to its own folder. Added some of Zabbix CSS to
these.
* index.php: Rewrote all of "pdfform.php" and created it as just index.php.
* index.php: Allows reporting on group. Uses GroupID and HostID from
Zabbix API (not name).
* index.php: Uses Jquery (javascript) for many of the functions on the index page.
* index.php: Uses Jquery Calendar to select range for custom timeframe
* index.php: Uses Jquery Selector2 where you can search in the select
box. Good for installations with many groups/hosts.
* createpdf.php: Merged and rewrote code for pdf.php and
generatedreport.php.
* createpdf.php: Stores created reports in reports subdirectory. Does
* createpdf.php: Added some sanitization with filter_input on some
_GET variables. Need to implement on more.
* inc/index.functions.php: Moved some common function in index.php to
an included file
* inc/createpdf.functions.php: Moved common function from createpdf.php
Download:
https://www.dropbox.com/s/sfhw8gy0dr...t.v05.zip?dl=0
Great customization.. I willl test this in more detail next week. You think it is also possible to genereate a SLA report for the uptime of websites?
SmikaComment
-
Hello all
I implement this package https://www.dropbox.com/s/sfhw8gy0dr...t.v05.zip?dl=0 to my zabbix version 2.2.6 and I click generate I see something this, screen in attachment. Below I share my config.inc.php:
<?php
//CONFIGURABLE
# zabbix server info(user must have API access)
$z_server = 'http://192.168.175.245/zabbix/';
$z_user = 'Admin';
$z_pass = 'zabbix';
# Temporary directory for storing pdf data and graphs - must exist
$z_tmp_path = './tmp';
# Directory for storing PDF reports
$pdf_report_dir = './reports';
# Root URL to reports
$pdf_report_url = $z_server ."report/reports";
# paper settings
$paper_format = 'A4'; // formats supported: 4A0, 2A0, A0 -> A10, B0 -> B10, C0 -> C10, RA0 -> RA4, SRA0 -> SRA4, LETTER, LEGAL, EXECUTIVE, FOLIO
$paper_orientation = 'portrait'; // formats supported: portrait / landscape
# time zone - see http://php.net/manual/en/timezones.php
$timezone = 'Europe/Oslo';
# Logo used in PDF - may be empty
# TODO: Specify image size!
$pdf_logo = './images/zabbix.png';
$company_name = 'Zabbix';
//DO NOT CHANGE BELOW THIS LINE
$z_tmp_cookies = "/tmp/";
$z_url_index = $z_server ."index.php";
$z_url_graph = $z_server ."chart2.php";
$z_url_api = $z_server ."api_jsonrpc.php";
$z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&autologin=1&enter=Sign+in";
?>Comment
-
Can you check if a file was actually written to the reports sub-dir?Hello all
I implement this package https://www.dropbox.com/s/sfhw8gy0dr...t.v05.zip?dl=0 to my zabbix version 2.2.6 and I click generate I see something this, screen in attachment. Below I share my config.inc.php:
....
It may be that the web-server user do not have permission to write to this folder.
I gave this folder these permissions (on RHEL, where webserver user is apache):
chgrp apache reports
chmod 775 reports
I'll remember to update the install-instructions with this info.Comment
-
I think an SLA-report would be a bit different than this report. A different report probably have to be written.
This reporting only adds all graphs on a host/hostgroup to a PDF-report.Comment
-
Problem
Hi.
I'm also having trouble. Below the Apache log.
Can help me ?[Fri Oct 17 21:26:25 2014] [error] [client 172.16.0.4] PHP Warning: Creating default object from empty value in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 122
[Fri Oct 17 21:26:25 2014] [error] [client 172.16.0.4] PHP Fatal error: Call to undefined function curl_init() in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 322
[Fri Oct 17 21:34:06 2014] [error] [client 172.16.0.4] PHP Warning: Creating default object from empty value in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 122
[Fri Oct 17 21:34:06 2014] [error] [client 172.16.0.4] PHP Fatal error: Call to undefined function curl_init() in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 322
[Fri Oct 17 21:34:15 2014] [error] [client 172.16.0.4] PHP Warning: Creating default object from empty value in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 122, referer: http://172.16.0.8/zabbix/screenedit....te&screenid=20
[Fri Oct 17 21:34:15 2014] [error] [client 172.16.0.4] PHP Fatal error: Call to undefined function curl_init() in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 322, referer: http://172.16.0.8/zabbix/screenedit....te&screenid=20Comment
Comment