Giter VIP home page Giter VIP logo

martinm76 / zabbix-pdf-report Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 55.0 918 KB

Reporting tool in PHP for the Zabbix Monitoring Platform. Rather versatile reporting on hosts and host groups.

Home Page: https://www.zabbix.com/forum/zabbix-cookbook/25368-zabbix-dynamic-pdf-report-generation?filter_time=time_lastmonth

License: GNU General Public License v3.0

PHP 35.03% CSS 15.96% Shell 0.19% JavaScript 43.22% Smarty 4.52% HTML 1.09%

zabbix-pdf-report's People

Contributors

chrisleekr avatar gopalraha avatar ironbishop avatar martinm76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zabbix-pdf-report's Issues

Working on Zabbix7 and PHP 8.3?

I'm using Oracle Linux version 9.4 as my Operating System, version 7.0 of Zabbix with Nginx, which requires a PHP version higher than 8.0, in my case, I'm using 8.3.

In version 1.2.4 of your project, I can authenticate, all hosts appear in the list for selection and when continuing, a blank screen is displayed and the following error appears in /var/log/nginx/error.log:
2024/06/07 08:54:09 [error] 1284#1284: *65583 FastCGI sent in stderr: "PHP message: PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/share/zabbix/report/createpdf.php on line 64; PHP message: PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/share/zabbix/report/createpdf.php on line 66; .php on line 69; PHP message: PHP Warning: Undefined variable $method in /usr/share/zabbix/report/inc/ZabbixAPI.class.php on line 252; /share/zabbix/report/inc/ZabbixAPI.class.php on line 252; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP message: PHP Warning: Trying to access array offset on false in /usr/share/zabbix/report/inc/createpdf.functions.php on line 53; PHP mess

With version 1.2.5 of the project, in the hosts selection list the only one that appears is Zabbix Server. I select it, continue with the other parameters and the error in php is the same as previously reported.

It gives the impression that there is some PHP function in Deprecated mode

And now how to solve it?

Zabbix-pdf-report/inc/ZabbixAPI.class.php on line 324

I get the below error when i try and login to the pdf report section. All i done was clone the report into the usr/share/zabbix directory copied the config template to the config file "cp config.inc.php.dist config.inc.php" changed the zabbix url and tested the login..

Any idea what could have caused this??

[Thu Apr 21 09:56:58.501547 2022] [php7:error] [pid 67887] [client XX.XX.XX.XX:52854] PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /usr/share/zabbix/zabbix-pdf-report/inc/ZabbixAPI.class.php:324\nStack trace:\n#0 /usr/share/zabbix/zabbix-pdf-report/inc/ZabbixAPI.class.php(257): ZabbixAPI::__jsonRequest()\n#1 /usr/share/zabbix/zabbix-pdf-report/inc/ZabbixAPI.class.php(285): ZabbixAPI->__callAPI()\n#2 /usr/share/zabbix/zabbix-pdf-report/inc/ZabbixAPI.class.php(100): ZabbixAPI->__login()\n#3 /usr/share/zabbix/zabbix-pdf-report/index.php(33): ZabbixAPI::login()\n#4 {main}\n thrown in /usr/share/zabbix/zabbix-pdf-report/inc/ZabbixAPI.class.php on line 324, referer: https://zabbix-dev./zabbix-pdf-report/

Zabbix Web Version: 5.4.11

Empty line

I have item:
system.run["c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /xpr"]

and I would like only text eg. "Permanently Activate Windows" without empty line and text eg. Windows Server(R), ServerStandard edition.

image
image

In latest data is ok:
image

Permanently Activate Windows == Komputer został trwale aktywowany (in polish)

In config.inc.php:
image

In report I have empty line:
image
Why?

Operation in Zabbix 6.4

First of all, congratulations for the beautiful work.
I know it's a very recent version. But was there working in version 6.4?

In my environment the following error message appears. I believe there has been a change in the form of login

CURL URL: https://localhost/zabbix/api_jsonrpc.php
CURL Options: Array ( [19913] => 1 [13] => 30 [78] => 5 [81] => [64] => [52] => 1 [74] => 1 [10023] => Array ( [0] => Content-Type: application/json-rpc [1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api ) [10036] => POST [10015] => {"auth":null,"method":"user.login","id":1,"params":{"password":"XXXX@XXX","user":"XXXXX"},"jsonrpc":"2.0"} [10102] => gzip ) Got response from API: ({"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Invalid parameter "/": unexpected parameter "user"."},"id":1}) Response decoded: (Array ( [jsonrpc] => 2.0 [error] => Array ( [code] => -32602 [message] => Invalid params. [data] => Invalid parameter "/": unexpected parameter "user". ) [id] => 1 ) __login() Got response from API: () Unable to login: Array ( [code] => -32602 [message] => Invalid params. [data] => Invalid parameter "/": unexpected parameter "user". )

PDF reporter is listing only some of the host groups.

I'm using zabbix 5.0 with centos 7 and php 7.0 / apache.
PDF report is working almost okay but it is not listing all the groups. I dont know why but it's listing only some the host groups.
Could you help me please to solve that ?

Thank you.
Mehmet

Empty report

Hi,
I was using your tool for few month and everything was working fine, but few week's ago I've spotted that PDF reports doesn't include graph data, pages are just empty.
Zabbix-server: 5.0.5
Apache: 2.4.29
OS: Ubuntu

Chinese garbled code

when company_name is chinese, pdf report messy code
Looking forward to your reply

Report range problem

Hello, Martinm76!

After last update to 1.0.1 Custom Report range isn't work. When I choose period 01/09/2018-01/10/2018 in Debug mode we see that it take period range - last 1 hour. Could you fix?

image

unable to create pdf report on zabbix 6.2

PHP -Version 8.0:
I have installed zabbic 6.2 on rocky linux 8 and configure zabbix-pdf-report, during report creation i got an error

php on line 2640', referer: http://172.31.10.155:800/zabbix/zabbix-pdf-report/chooser.php
[Thu Jan 05 01:48:01.287367 2023] [mpm_event:notice] [pid 1151191:tid 1151191] AH00492: caught SIGWINCH, shutting down gracefully
[Thu Jan 05 01:48:04.410272 2023] [core:notice] [pid 1153837:tid 1153837] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Jan 05 01:48:04.411020 2023] [suexec:notice] [pid 1153837:tid 1153837] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jan 05 01:48:04.421624 2023] [lbmethod_heartbeat:notice] [pid 1153837:tid 1153837] AH02282: No slotmem from mod_heartmonitor
[Thu Jan 05 01:48:04.425797 2023] [mpm_event:notice] [pid 1153837:tid 1153837] AH00489: Apache/2.4.53 (Rocky Linux) configured -- resuming normal operations
[Thu Jan 05 01:48:04.425816 2023] [core:notice] [pid 1153837:tid 1153837] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Jan 05 01:48:22.759502 2023] [proxy_fcgi:error] [pid 1153841:tid 1153985] [client 172.31.10.155:54410] AH01071: Got error 'PHP message: PHP Deprecated: Parameter "/user" is deprecated. in /usr/share/zabbix/include/classes/validators/CApiInputValidator.php on line 1379'
[Thu Jan 05 01:48:22.833619 2023] [proxy_fcgi:error] [pid 1153840:tid 1153944] [client 172.31.10.155:54412] AH01071: Got error 'PHP message: PHP Deprecated: Parameter "/user" is deprecated. in /usr/share/zabbix/include/classes/validators/CApiInputValidator.php on line 1379'
[Thu Jan 05 01:48:22.846649 2023] [proxy_fcgi:error] [pid 1153841:tid 1154007] [client 172.31.10.155:54416] AH01071: Got error 'PHP message: PHP Deprecated: Parameter "/real_hosts" is deprecated. in /usr/share/zabbix/include/classes/validators/CApiInputValidator.php on line 1379'
[Thu Jan 05 01:48:22.854235 2023] [proxy_fcgi:error] [pid 1153841:tid 1153990] [client 172.31.3.19:54983] AH01071: Got error 'PHP message: PHP Warning: Trying to access array offset on value of type bool in /usr/share/zabbix/zabbix-pdf-report/inc/index.functions.php on line 5', referer: http://172.31.10.155:800/zabbix/zabbix-pdf-report/
[Thu Jan 05 01:48:27.955260 2023] [proxy_fcgi:error] [pid 1153840:tid 1153948] [client 172.31.10.155:54420] AH01071: Got error 'PHP message: PHP Deprecated: Parameter "/user" is deprecated. in /usr/share/zabbix/include/classes/validators/CApiInputValidator.php on line 1379'
[Thu Jan 05 01:48:29.769492 2023] [proxy_fcgi:error] [pid 1153841:tid 1154016] [client 172.31.3.19:54988] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 254PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1239PHP message: PHP Warning: Undefined array key "pageHeight" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 228PHP message: PHP Warning: Undefined array key "pageWidth" in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1285PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() in /usr/share/zabbix/zabbix-pdf-report/inc/class.pdf.php:2640\nStack trace:\n#0 /usr/share/zabbix/zabbix-pdf-report/createpdf.php(282): Cpdf->addPngFromFile()\n#1 {main}\n thrown in /usr/share/zabbix/zabbix-pdf-report/inc/class.pdf.php on line 2640', referer: http://172.31.10.155:800/zabbix/zabbix-pdf-report/chooser.php

Error in php and curl exits in zabbix-pdf-report index

First of all I would like to thank you for the tool, and I would like to clarify a question, I am using zabbix 5.2.5, and php 7.4 and configured the zabbix-report, but on the main screen as soon as we log in it appears some curl outputs, and when I go in the php error log it shows the following error:
[Tue Apr 13 18:25:53.571098 2021] [php7:warn] [pid 445685] [client 10.0.0.239:62357] PHP Warning: get_class() expects parameter 1 to be object, null given in /usr/share/zabbix-pdf-report/inc/ZabbixAPI.class.php on line 208, referer: http://zabbix2.portosrio.gov.br/zbxreport/index.php

Can anybody help me?

Error that appears as soon as I log in.
image

since already my thanks

can't create pdf file with zabbix 3.0

it show below when loggin:
2019/05/16 12:13:00 [error] 13635#0: *232 open() "/usr/share/nginx/html/zabbix_report/js/jquery.tablesorter.combined.min.js" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/js/jquery.tablesorter.combined.min.js HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"
2019/05/16 12:13:00 [error] 13635#0: *233 open() "/usr/share/nginx/html/zabbix_report/js/jquery.datetimepicker.min.js" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/js/jquery.datetimepicker.min.js HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"
2019/05/16 12:13:00 [error] 13635#0: *234 open() "/usr/share/nginx/html/zabbix_report/css/jquery.tablesorter.pager.min.css" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/css/jquery.tablesorter.pager.min.css HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"
2019/05/16 12:13:00 [error] 13635#0: *235 open() "/usr/share/nginx/html/zabbix_report/js/jquery-3.3.1.min.js" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/js/jquery-3.3.1.min.js HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"
2019/05/16 12:13:01 [error] 13635#0: *234 open() "/usr/share/nginx/html/zabbix_report/js/jquery.datetimepicker.min.js" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/js/jquery.datetimepicker.min.js HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"
2019/05/16 12:13:01 [error] 13635#0: *234 open() "/usr/share/nginx/html/zabbix_report/js/jquery.tablesorter.combined.min.js" failed (2: No such file or directory), client: 47.52.23.216, server: _, request: "GET /zabbix_report/js/jquery.tablesorter.combined.min.js HTTP/1.1", host: "139.217.3.103", referrer: "http://139.217.3.103/zabbix_report/chooser.php"

Report without graps

Graphs are not displayed for me. It works ok but the graphs are empty.

[root@vm-Zabbix inc]# nginx -v
nginx version: nginx/1.14.1
[root@vm-Zabbix inc]# rpm -qa | grep php
php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-ldap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-json-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-mysqlnd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-bcmath-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-pdo-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-mbstring-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-gd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64

Below is the nginx log:
I changed in log host and address ip zabbix on zabbix-ip.

[root@vm-Zabbix inc]# tail /var/log/nginx/error.log PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320 PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320" while reading response header from upstream, client: 10.0.91.78, server: example.com, request: "GET /zabbix-pdf-report/createpdf.php?ReportType=host&HostID=10329&GraphsOn=yes&ItemsOn=yes&mygraphs2=%23%28System+local+time%7CPing%7CCPU+load%7CCPU+usage%7CCPU+util%7Cprocessor%7CDisk+space%7CSwap%7CEthernet%7CMemory+usage%7C%5ETraffic+on+%7Ctraffic+on+eth%29%23&myitems2=%23%28System+local+time%7CUtilization+of%7Cfarm+connection%7CAverage+Latency%7CNumber+of+processes%7CCache+%25+Hit%29%23&ReportRange=last&timePeriod=Day HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "zabbix-ip", referrer: "http://zabbix-ip/zabbix-pdf-report/chooser.php" 2021/03/24 12:41:19 [error] 943#0: *150908 FastCGI sent in stderr: "PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320" while reading response header from upstream, client: 10.0.91.78, server: example.com, request: "GET /zabbix-pdf-report/createpdf.php?ReportType=host&HostID=10329&GraphsOn=yes&mygraphs2=%23%28MSSQL%3A+Auto-params%29%23&myitems2=%23%28System+local+time%7CUtilization+of%7Cfarm+connection%7CAverage+Latency%7CNumber+of+processes%7CCache+%25+Hit%29%23&ReportRange=last&timePeriod=Day HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "zabbix-ip", referrer: "http://zabbix-ip/zabbix-pdf-report/chooser.php" 2021/03/24 12:43:02 [error] 943#0: *150908 FastCGI sent in stderr: "PHP message: PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/zabbix-pdf-report/inc/class.ezpdf.php on line 1320" while reading response header from upstream, client: 10.0.91.78, server: example.com, request: "GET /zabbix-pdf-report/createpdf.php?ReportType=host&HostID=10329&GraphsOn=yes&mygraphs2=%23%28MSSQL%3A+Auto-params%29%23&myitems2=%23%28System+local+time%7CUtilization+of%7Cfarm+connection%7CAverage+Latency%7CNumber+of+processes%7CCache+%25+Hit%29%23&ReportRange=last&timePeriod=Day HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "zabbix-ip", referrer: "http://zabbix-ip/zabbix-pdf-report/chooser.php" [root@vm-Zabbix inc]#

[root@vm-Zabbix zabbix-pdf-report]#  ./fixrights.sh
drwxrwxrwx 2 apache root 62 Mar 24 10:29 reports
drwxrwxrwx 3 apache root 61 Mar 24 13:07 tmp

SELinux seems to be installed. We will try to fix context. It may not be enough ...
chcon: can't apply partial context to unlabeled file 'branches'
chcon: can't apply partial context to unlabeled file 'description'
chcon: can't apply partial context to unlabeled file 'applypatch-msg.sample'
chcon: can't apply partial context to unlabeled file 'commit-msg.sample'
chcon: can't apply partial context to unlabeled file 'post-update.sample'
chcon: can't apply partial context to unlabeled file 'pre-applypatch.sample'
chcon: can't apply partial context to unlabeled file 'pre-commit.sample'
chcon: can't apply partial context to unlabeled file 'pre-merge-commit.sample'
chcon: can't apply partial context to unlabeled file 'pre-push.sample'
chcon: can't apply partial context to unlabeled file 'pre-receive.sample'
chcon: can't apply partial context to unlabeled file 'update.sample'
chcon: can't apply partial context to unlabeled file 'fsmonitor-watchman.sample'
chcon: can't apply partial context to unlabeled file 'pre-rebase.sample'
chcon: can't apply partial context to unlabeled file 'prepare-commit-msg.sample'
chcon: can't apply partial context to unlabeled file 'hooks'
chcon: can't apply partial context to unlabeled file 'exclude'
chcon: can't apply partial context to unlabeled file 'info'
chcon: can't apply partial context to unlabeled file 'master'
chcon: can't apply partial context to unlabeled file 'heads'
chcon: can't apply partial context to unlabeled file 'tags'
chcon: can't apply partial context to unlabeled file 'HEAD'
chcon: can't apply partial context to unlabeled file 'origin'
chcon: can't apply partial context to unlabeled file 'remotes'
chcon: can't apply partial context to unlabeled file 'refs'
chcon: can't apply partial context to unlabeled file 'HEAD'
chcon: can't apply partial context to unlabeled file 'config'
chcon: can't apply partial context to unlabeled file 'pack-abfd6c3f80e85cc4b8cb067bf47e4ccb92a4d7d1.pack'
chcon: can't apply partial context to unlabeled file 'pack-abfd6c3f80e85cc4b8cb067bf47e4ccb92a4d7d1.idx'
chcon: can't apply partial context to unlabeled file 'pack'
chcon: can't apply partial context to unlabeled file 'info'
chcon: can't apply partial context to unlabeled file 'objects'
chcon: can't apply partial context to unlabeled file 'packed-refs'
chcon: can't apply partial context to unlabeled file 'HEAD'
chcon: can't apply partial context to unlabeled file 'origin'
chcon: can't apply partial context to unlabeled file 'remotes'
chcon: can't apply partial context to unlabeled file 'master'
chcon: can't apply partial context to unlabeled file 'heads'
chcon: can't apply partial context to unlabeled file 'refs'
chcon: can't apply partial context to unlabeled file 'HEAD'
chcon: can't apply partial context to unlabeled file 'logs'
chcon: can't apply partial context to unlabeled file 'index'
chcon: can't apply partial context to unlabeled file '.git'
chcon: can't apply partial context to unlabeled file 'Changelog'
chcon: can't apply partial context to unlabeled file 'LICENSE'
chcon: can't apply partial context to unlabeled file 'README.md'
chcon: can't apply partial context to unlabeled file 'chooser.php'
chcon: can't apply partial context to unlabeled file 'config.inc.php.dist'
chcon: can't apply partial context to unlabeled file 'createpdf.php'
chcon: can't apply partial context to unlabeled file 'core.css'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.css'
chcon: can't apply partial context to unlabeled file 'reset.css'
chcon: can't apply partial context to unlabeled file 'select2.css'
chcon: can't apply partial context to unlabeled file 'tablesorter.css'
chcon: can't apply partial context to unlabeled file 'zabbix.color.css'
chcon: can't apply partial context to unlabeled file 'zabbix.default.css'
chcon: can't apply partial context to unlabeled file 'zabbix.report.css'
chcon: can't apply partial context to unlabeled file 'css'
chcon: can't apply partial context to unlabeled file 'fixrights.sh'
chcon: can't apply partial context to unlabeled file 'AvantGardeConBol.afm'
chcon: can't apply partial context to unlabeled file 'AvantGardeGothicBook.afm'
chcon: can't apply partial context to unlabeled file 'AvantGardeGothicDemi.afm'
chcon: can't apply partial context to unlabeled file 'Courier-Bold.afm'
chcon: can't apply partial context to unlabeled file 'Courier-BoldOblique.afm'
chcon: can't apply partial context to unlabeled file 'Courier-Oblique.afm'
chcon: can't apply partial context to unlabeled file 'Courier.afm'
chcon: can't apply partial context to unlabeled file 'Helvetica-Bold.afm'
chcon: can't apply partial context to unlabeled file 'Helvetica-BoldOblique.afm'
chcon: can't apply partial context to unlabeled file 'Helvetica-Oblique.afm'
chcon: can't apply partial context to unlabeled file 'Helvetica.afm'
chcon: can't apply partial context to unlabeled file 'Symbol.afm'
chcon: can't apply partial context to unlabeled file 'Times-Bold.afm'
chcon: can't apply partial context to unlabeled file 'Times-BoldItalic.afm'
chcon: can't apply partial context to unlabeled file 'Times-Italic.afm'
chcon: can't apply partial context to unlabeled file 'Times-Roman.afm'
chcon: can't apply partial context to unlabeled file 'ZapfDingbats.afm'
chcon: can't apply partial context to unlabeled file 'php_Courier-Bold.afm'
chcon: can't apply partial context to unlabeled file 'php_Courier-BoldOblique.afm'
chcon: can't apply partial context to unlabeled file 'php_Courier-Oblique.afm'
chcon: can't apply partial context to unlabeled file 'php_Courier.afm'
chcon: can't apply partial context to unlabeled file 'php_Helvetica-Bold.afm'
chcon: can't apply partial context to unlabeled file 'php_Helvetica-BoldOblique.afm'
chcon: can't apply partial context to unlabeled file 'php_Helvetica-Oblique.afm'
chcon: can't apply partial context to unlabeled file 'php_Helvetica.afm'
chcon: can't apply partial context to unlabeled file 'php_Symbol.afm'
chcon: can't apply partial context to unlabeled file 'php_Times-Bold.afm'
chcon: can't apply partial context to unlabeled file 'php_Times-BoldItalic.afm'
chcon: can't apply partial context to unlabeled file 'php_Times-Italic.afm'
chcon: can't apply partial context to unlabeled file 'php_Times-Roman.afm'
chcon: can't apply partial context to unlabeled file 'php_ZapfDingbats.afm'
chcon: can't apply partial context to unlabeled file 'php_a0100131.afm'
chcon: can't apply partial context to unlabeled file 'php_a010013l.afm'
chcon: can't apply partial context to unlabeled file 'fonts'
chcon: can't apply partial context to unlabeled file 'asc.gif'
chcon: can't apply partial context to unlabeled file 'bg.gif'
chcon: can't apply partial context to unlabeled file 'desc.gif'
chcon: can't apply partial context to unlabeled file 'zabbix.png'
chcon: can't apply partial context to unlabeled file 'general'
chcon: can't apply partial context to unlabeled file 'select2-spinner.gif'
chcon: can't apply partial context to unlabeled file 'select2.png'
chcon: can't apply partial context to unlabeled file 'select2x2.png'
chcon: can't apply partial context to unlabeled file 'zabbix_logo.png'
chcon: can't apply partial context to unlabeled file 'images'
chcon: can't apply partial context to unlabeled file 'ZabbixAPI.class.php'
chcon: can't apply partial context to unlabeled file 'class.ezpdf.php'
chcon: can't apply partial context to unlabeled file 'class.pdf.php'
chcon: can't apply partial context to unlabeled file 'createpdf.functions.php'
chcon: can't apply partial context to unlabeled file 'index.functions.php'
chcon: can't apply partial context to unlabeled file 'pdf.functions.php'
chcon: can't apply partial context to unlabeled file 'inc'
chcon: can't apply partial context to unlabeled file 'index.php'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.css'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.js'
chcon: can't apply partial context to unlabeled file 'jquery.js'
chcon: can't apply partial context to unlabeled file 'jquery.tablesorter.min.js'
chcon: can't apply partial context to unlabeled file 'jquery.validate.min.js'
chcon: can't apply partial context to unlabeled file 'select2.min.js'
chcon: can't apply partial context to unlabeled file '.gitignore'
chcon: can't apply partial context to unlabeled file 'MIT-LICENSE.txt'
chcon: can't apply partial context to unlabeled file 'README.md'
chcon: can't apply partial context to unlabeled file 'bower.json'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.full.js'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.full.min.js'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.min.js'
chcon: can't apply partial context to unlabeled file 'build'
chcon: can't apply partial context to unlabeled file 'datetimepicker.jquery.json'
chcon: can't apply partial context to unlabeled file 'doc.tpl'
chcon: can't apply partial context to unlabeled file 'index.html'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.css'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.js'
chcon: can't apply partial context to unlabeled file 'jquery.datetimepicker.min.js'
chcon: can't apply partial context to unlabeled file 'jquery.js'
chcon: can't apply partial context to unlabeled file 'package.json'
chcon: can't apply partial context to unlabeled file '1.png'
chcon: can't apply partial context to unlabeled file '2.png'
chcon: can't apply partial context to unlabeled file '3.1.png'
chcon: can't apply partial context to unlabeled file '3.png'
chcon: can't apply partial context to unlabeled file '4.png'
chcon: can't apply partial context to unlabeled file '5.png'
chcon: can't apply partial context to unlabeled file '6.png'
chcon: can't apply partial context to unlabeled file 'screen'
chcon: can't apply partial context to unlabeled file 'datetimepicker-master'
chcon: can't apply partial context to unlabeled file 'master.zip'
chcon: can't apply partial context to unlabeled file 'zip'
chcon: can't apply partial context to unlabeled file 'js'
chcon: can't apply partial context to unlabeled file 'logout.php'
chcon: can't apply partial context to unlabeled file 'report-rename.php'
chcon: can't apply partial context to unlabeled file 'zabbix_report_hritJo'
chcon: can't apply partial context to unlabeled file 'zabbix_reportphzivi'
chcon: can't apply partial context to unlabeled file 'tmp'
chcon: can't apply partial context to unlabeled file 'hyper-v.pdf'
chcon: can't apply partial context to unlabeled file 'gbbl01.pdf'
chcon: can't apply partial context to unlabeled file 'pomos04.pdf'
chcon: can't apply partial context to unlabeled file 'reports'
chcon: can't apply partial context to unlabeled file 'config.inc.php'
chcon: can't apply partial context to unlabeled file '/usr/share/zabbix/zabbix-pdf-report'
chcon: can't apply partial context to unlabeled file 'hyper-v.pdf'
chcon: can't apply partial context to unlabeled file 'gbbl01.pdf'
chcon: can't apply partial context to unlabeled file 'pomos04.pdf'
chcon: can't apply partial context to unlabeled file '/usr/share/zabbix/zabbix-pdf-report/reports'
chcon: can't apply partial context to unlabeled file 'zabbix_report_hritJo'
chcon: can't apply partial context to unlabeled file 'zabbix_reportphzivi'
chcon: can't apply partial context to unlabeled file '/usr/share/zabbix/zabbix-pdf-report/tmp'

Question about how it works using PHP 8.1

Congratulations on the project. He is truly incredible.
As some functions are deprecated, I would like to know if it is working in versions of PHP 8.1 or above?

And if not, is there a plan for this to happen?

Thank you very much

Empty groups list

Running Zabbix 6.4.10 - after updating ZabbixAPI.class.php reports are working again, however only for individual hosts, when I select 'Host Group', the list is empty. Checked the logs, didn't find any error so it looks to me that the line
$host_groups = ZabbixAPI::fetch_array('hostgroup','get',array('output'=>array('groupid','name'),'real_hosts'=>'1','with_graphs'=>'1','sortfield'=>'name') )
...
returns an empty array.
Any idea?

Graph not add to pdf report

Hi! I'm use Zabbix 4.2, CentOS 7. zabbix-pdf-report 1.1.1
When I generate a report, there are no graphs in pdf. And an error appears in the logs:

[:error] [pid 40335] [client ] PHP Warning: Creating default object from empty value in /usr/share/zabbix/reports/inc/ZabbixAPI.class.php on line 123, referer: http://client_ip/reports/chooser.php
[:error] [pid 40335] [client ] PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/reports/inc/class.ezpdf.php on line 1320, referer: http://client_ip/reports/chooser.php
[:error] [pid 40335] [client ] PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/reports/inc/class.ezpdf.php on line 1320, referer: http://client_ip/reports/chooser.php
[:error] [pid 40335] [client ] PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/reports/inc/class.ezpdf.php on line 1320, referer: http://client_ip/reports/chooser.php
[:error] [pid 40335] [client ] PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/reports/inc/class.ezpdf.php on line 1320, referer: http://client_ip/reports/chooser.php
[:error] [pid 40335] [client ] PHP Notice: getimagesize(): Read error! in /usr/share/zabbix/reports/inc/class.ezpdf.php on line 1320, referer: http://client_ip/reports/chooser.php

Please, tell me, how can I fix this error?

Unable to login

reporter doesn't work on zabbix 4.0.5 + php7.2(3)
Right now I setup zabbix on docker (zabbix 4.2 + php7.2) and I see similar problem.

screen from zabbix 4.2
image

generated on doc or docx

I have necessity to edit report, for commented graphs to my clients.

In older version, i am created doc.php where i call him in generatereport.php and save report into my computer.
After update my zabbix for version 5.0 this report bing only last hour into report. But new report dont create doc file :(

Any solution for version 0.2 this report bring a month?

// Zabbix Report Generator v0.2 Beta

clarification about renaming

I don't understand

  • why is necessary to rename files, but only for few special characters?
  • why in a different way between hosts and hostgroups?

The issue arises when you loop through hosts and try to download the relative report: the label corresponds to the Visible Name in Zabbix, but the URL doesn't.

During creation:

$reportname=str_replace(" ", "_",$name);

$reportname=str_replace(" ", "_",$name);
$reportname=str_replace("/", "--",$name);

During display:

$name=substr(str_replace("_"," ",$fname), 0, -4);
$name=substr(str_replace("--","/",$name), 0, 99);

Hide hosts with no graphs

Hi,

Firstly this is a great plugin, good work.

I have run a report using the HostGroup option and it works perfectly and extracts the specific graphs for the hosts within that host group, however, not all my hosts have those graphs and as such in the report it shows the host name with a comment saying (something along the lines of) there was no valid graph to display. Is it possible to hide the host where there are no graphs to display?

Thanks

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.