satu

Gajah mati meninggalkan tulang
harimau mati meninggalkan belang
manusia mati meninggalkan nama

persiapkan klu kalian mati ingin meninggalkan apa ?

Saturday 19 March 2016

zabbix pdf report

v0.1 Beta
# - Generate dynamic PDF report from custom graphs 
# - All Hosts or Single Host
# - Timeperiods of Hour, Day, Week, Month, Year




v0.2 Beta
Change Log:
# - moved all configuration to a single file.. configuration is now done in config.inc.php
# - removed all MySQL specific calls and replaced with API calls. Now anyone should be able to use the addon who is running 1.8 API.

v0.3 Beta
Change Log:
# - fixed an issue where hosts with no graphs were showing up in selection form
# - added timezone to configuration file
# - added paper size to configuration file
# - added paper orientation to configuration file
# - fixed an alignment issue where graphs were covering up the header

The idea behind this addon is that it will be version independent. This is a screen embeded custom page. NO PATCHING REQUIRED, but still allows you to use it inside the zabbix UI.

This was originally created for self use, but I know it is a much requested feature so, please help test and fix problems 

How To:

1. unzip file to your zabbix directory(I like to create a custom_pages directory and place them all there)
2. configure config.inc.php with your zabbix server information
3. make data.txt and your tmp_images directory readable and writeable by apache user
4. Login to zabbix and create a new 1 row 1 column screen with a URL width and height of 800x600 / Centre / Top
5. add URL to pdfform.php to new screen.
6. in php.ini set display_error = OFF
7. restart apache

Development is ongoing please post problems and ideas here. 

Known Problems:

# Tested on Zabbix 1.8.8 and 1.8.10 but should work with any 1.8 API and Zabbix.

Download Link: hhttps://drive.google.com/open?id=0B8GDi0lY8FDgdlBFSWpRaTloYlk
Example Report: http://www.zabbix.org/mw/images/8/8f...generation.pdf

FIX IT
sumber link : Hi folks!

I have had the good fortune to use the previous iterations of this report and have added some extra functionality that we wanted in our environment, such as:

* Option for customer to log on and only see their servers (both in drop-down and old reports).
* Show the triggers and acknowledgements a given host has had in the periode selected.
* Various fixes to the layout so elements stay within the bounds of the page and without going into the footer or header.
* Internationalization support. Extended characters needed to be converted from UTF-8 to a latin character set. I have gone with ISO-8859-1, but you can change it if needed. I have not made it a config item at this point.

I have placed my version in a TGZ-file on Google Drive (thus you should not need to set rights on tmp and reports directories). I hope this will be of use to some of you as well, and maybe you some of you can help me with the things I still don't know how to get at:

Code:
PLANNED:
 * HTML data for triggers/acknowledgements with fuller details. Right
 now only the subject is shown in the PDF (or the message in the case
 of acknowledgements). The reports would tend to get pretty big if the
 full body of the event is included. I plan to make the events
 collapsible, mostly like the 'show old reports' functionality from
 Ronny.
 * I would like to include basic trending information, a decent
 approximation of uptime for host and various important checks. As far
 as I can tell, this is not really posible with the API today (2.4.x)
I guess, as a temporary measure, I can include the current value of the Zabbix agent uptime check and the like, but that doesn't tell me about periods of unreachability and such (although the triggers gives a basic look at this).

Get the file here:
https://drive.google.com/file/d/0B_V...ew?usp=sharing

Happy reporting!

/Martin.
required:
php-curl
php-json

sumber https://www.zabbix.com/forum/showthread.php?t=24998&page=21

penting : hanya rubah di config.php didalam folder report dan rubah ke setingan user apache:apache folder tmp dan folder report


1 comment: