zabbix 2.2.9中的PDF报告 [英] PDF report in zabbix 2.2.9
问题描述
我第一次使用Zabbix,并成功配置了Zabbix.现在,下一个非常重要的步骤是生成报告并以PDF格式下载.几乎没有可用的链接来促进相同的操作,但是我无法获得所需的输出.
I am using Zabbix for the first time and successfully configured the same. Now the next very important step is to generate report and download as PDF. There are few links available to facilitate the same but I am unable to get the desired output.
https://www.zabbix.com/forum/showthread.php? t = 24998
请提供一些解决方案的帮助.
Please help with some solutions.
推荐答案
zabbix-dynamic-pdf-report
zabbix-dynamic-pdf-report模块允许我们生成pdf报告.实施后,我们可以选择在小时",日",周",月",年"的时间范围内为主机",主机组"生成报告. 我们可以从旧报告"部分中检索旧报告.
zabbix-dynamic-pdf-report
zabbix-dynamic-pdf-report module allow us to generate pdf reports. Once implemented we have options to generate reports for ‘Host’, ‘Host Group’ on time range of ‘Hour’, ‘Day’, ‘Week’, ‘Month’, ‘Year’. We can retrieve old report from ‘Old Reports’ section.
- php5-curl
- php5-json
sudo apt-get install php5-curl php5-json
克隆包含模块的git repo
cd/opt/
git clone https://github.com/SandipSingh14/Zabbix_
git clone https://github.com/SandipSingh14/Zabbix_
根据zabbix服务器配置zabbix-dynamic-pdf-报告
vim Zabbix_/zabbix-dynamic-pdf-report/config.inc.php
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";
?>
更改目录并在zabbix-dynamic-pdf-report中创建目录
cd Zabbix_/zabbix-dynamic-pdf-report
Change directory and create directory inside zabbix-dynamic-pdf-report
cd Zabbix_/zabbix-dynamic-pdf-report
mkdir tmp报告
mkdir tmp report
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
将zabbix-dynamic-pdf-report复制到/usr/share/zabbix/
cp -r /opt/Zabbix_/zabbix-dynamic-pdf-report /usr/share/zabbix/
重新启动apache
service apache2 restart
生成报告的程序
打开生成PDF报告"页面http:///zabbix-dynamic-pdf-report/index.php
Procedure to Generate Reports
Open Generate PDF Report pagehttp:///zabbix-dynamic-pdf-report/index.php
- 打开后,您可以选择报告类型"HOST OR HOSTGROUP",然后单击下拉列表以选择主机名或主机组名称
- 您可以选择报告范围"LAST OR CUSTOM",然后选择报告时间段的下拉列表
- 如果您在报告范围内选择自定义",则可以选择要生成报告的时间段.
- 然后单击生成"按钮,将生成您的报告.
- 模块提供了旧报告的功能,即您可以看到之前生成的报告.
这篇关于zabbix 2.2.9中的PDF报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!