如果你有任何想法如何实现zabbix生成PDF报告? 在论坛上我发现了一些这样的: https : //www.zabbix.com/forum/showthread.php?t=24998 。
我尝试实现这个到我的zabbix 2.2.3,但是当我这样做,我仍然看到文本(无法login:)我想这是一个问题的版本。 你可以看到它只在1.8.8和1.8.10上进行了testing。 有没有人有一些想法?
一个问题是,由于API版本问题,这是失败的,我从http://zabbixapi.confirm.ch/新下载,现在我可以生成PDF报告,但是,当我select一些网站,我只看到所有选项PDF是空的
下面我分享屏幕和示例报告: http : //pl.scribd.com/doc/237807238/file-1
任何人有一些想法?
问候Mick
zabbix-dynamic-pdf-report模块允许我们生成PDF报告。 一旦实施,我们可以select在“小时”,“日”,“周”,“月”,“年”的时间范围内生成“主持人”,“主持人组”的报告。 我们可以从“旧报告”部分检索旧报告。
sudo apt-get install php5-curl php5-json
克隆包含模块的git仓库
cd / opt /
git clone https://github.com/SandipSingh14/Zabbix_
根据zabbix-serverconfigurationzabbix-dynamic-pdf-report
vim Zabbix_ / zabbix-dynamic-pdf-report / config.inc.php
<?php //CONFIGURABLE # zabbix server info(user must have API access) $z_server = 'http://zabbix.example.com/'; $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 = './report'; # Root URL to reports $pdf_report_url = "./report"; # 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 = 'Asia/Calcutta'; # 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"; ?>
cd Zabbix_ / zabbix-dynamic-pdf-report
mkdir tmp报告
sed -i 's,user.authenticate,user.login,g' inc/ZabbixAPI.class.php sed -i 's,user.authenticate,user.login,g' inc/ZabbixAPI.class.php.org
cp -r /opt/Zabbix_/zabbix-dynamic-pdf-report /usr/share/zabbix/
service apache2 restart
打开“生成PDF报告”页面
HTTP:///zabbix-dynamic-pdf-report/index.php