Such a shame this thread's dead..
Ad Widget
Collapse
Zabbix Dynamic PDF Report Generation
Collapse
X
-
pdfform.php
< $hosts = ZabbixAPI::fetch_array('host','get',array('output' =>'extend','sortfield'=>'host','with_graphs'=>'1') )
---
> $hosts = ZabbixAPI::fetch_array('host','get',array('extendo utput'=>'shorten','sortfield'=>'host','with_graphs '=>'1'))
generatereport.php
< $hostGraphs = ZabbixAPI::fetch_array('graph','get',array('output '=>'extend','filter'=>array('host'=>$site)))
---
> $hostGraphs = ZabbixAPI::fetch_array('host','get',array('extendo utput'=>'shorten','select_graphs'=>'shorten','filt er'=>array('host'=>$site)))
< $hostsGraphs = ZabbixAPI::fetch_array('graph','get',array('output '=>'extend'))
---
> $hostsGraphs = ZabbixAPI::fetch_array('host','get',array('extendo utput'=>'shorten','select_graphs'=>'shorten','filt er'=>array('graphids'=>'')))
config.inc.pdf
< $z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Sign in";
---
> $z_login_data = "name=" .$z_user ."&password=" .$z_pass ."&enter=Enter";
Try this changes...
AndyComment
-
How to make a User with API acess
zabbix Version 2.0
Ubuntu 12.04
Could you please tell how to make a user with API access. Now am getting a PDF with out any data. Haader and footer is showing but not any graphs inside to that. Hope i will get a helpComment
-
Blank Pdf is getting
Blank Pdf is generated
Images are saving into tmp_images but not able to view (fatal error reading PNG image file: not a PNG file)Comment
-
Comment
-
Comment
-
Apacha2 error.log.
Thanks Yso for your kind help.
Gd is already installed. Still am not able not getting Graphs in PDF report.
If possible please go through the error log i posted below.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/php_curl.dll' - /usr/lib/php5/20090626+lfs/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/json.so' - /usr/lib/php5/20090626+lfs/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0
[Sun Oct 21 19:50:51 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 21 20:24:06 2012] [error] [client 192.168.1.100] PHP Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/user/public_html/class.pdf.php on line 2641, referer: http://192.168.1.100/zabbix/pdfform.php
[Sun Oct 21 20:24:06 2012] [error] [client 192.168.1.100] PHP Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/user/public_html/class.pdf.php on line 2653, referer: http://192.168.1.100/zabbix/pdfform.php
Advance Thanks
Jithesh RComment
-
You need curl... do you have installed?
php_curl.dll: dll-files are windows related... you can't load it under linux.
Normaly you sould have a .so-file, or compiled curl in php directly.
AndyComment
-
Once again Thanks Yso for your help,
I already installed Curl. These are the extention am getting.
-------------------------------------------------------------------------------------------------------------------------
user@L283:~$ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
ffmpeg
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
--------------------------------------------------------------------------------------------------------------------------
Also .so files is located in same folder . But dont know why apache shwoing warning related dll files.
user@L283:/usr/lib/php5/20090626+lfs$ ls
curl.so ffmpeg.so gd.so mysqli.so mysql.so pdo_mysql.so pdo.so
----------------------------------------------------------------------------------------------------------------------------
I removed '?>' from all Pdf Generating files(Pfd.php, pdfform.php,ZabbixAPI.class.php,class.ezpdf.php,cl ass.pdf.php,config.inc.php,generatereport.php). But still am getting graphs in PDF file. Also not able to open png files in tmp_images folder(fatal error is showing). Now no error is showing in apacha error log when i downloaded the PDF file. But showing warning when i restart Apache. Warning shown below.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/php_curl.dll' - /usr/lib/php5/20090626+lfs/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/json.so' - /usr/lib/php5/20090626+lfs/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0
[Mon Oct 22 11:02:41 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
Yso could you please check this.Last edited by jitheshr89; 22-10-2012, 07:42.Comment
-
hi Tracs
hi,
Tracs, I got the screen and PDF is generating. BUt PDF report is blank. SO to that step I can help you. please describe your correct issue.
Am Using
Zabbix Version 2.0.3
OS: Ubuntu
DB: MysqlComment
-
Its Working now
Hi friends,

Now PDF is generating with Graph. Now I want to send those PDF through Gmail. Does anybody have script for that please share.
Version 2.0.3
OS : Ubuntu
DB MySQL
Special thnaks to AXILA,YSO
Thanks for your all support. Expecting same in future too.Comment
Comment