An FYI, when you're first testing out your reports, try and limit the data set you're working with. I'm working my way through trying to figure out how to create a line graph and I had to limit my dataset to 100 rows to see that I had it wrong otherwise Jasper seemed to hang as it was spending a whole lot of time processing.
Ad Widget
Collapse
Generate Reports
Collapse
X
-
RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
-
Hi,
I couldnt understand the value stored in clock field value int(11)
Usually the date format in mysql is datetime, date ..etc
The clock field in history table stores a 10 digit number which i could not understand:
ex.
+--------+------------+--------+
| itemid | clock | value |
+--------+------------+--------+
| 23775 | 1208235192 | 0.0800 |
| 23775 | 1208235195 | 0.0800 |
Thanks
AbhiComment
-
I use something like this in my mysql query statement in IReports:
Code:SELECT hosts.`host` AS hosts_host, CONVERT_TZ(FROM_UNIXTIME(trends.`clock`),'+00:00','-05:00') AS trends_clock, trends.`value_min` AS trends_value_min, trends.`value_avg` AS trends_value_avg, trends.`value_max` AS trends_value_max, trends.`num` AS trends_num, items.`description` AS items_description FROM `items` items INNER JOIN `trends` trends ON items.`itemid` = trends.`itemid` INNER JOIN `hosts` hosts ON items.`hostid` = hosts.`hostid` WHERE items.`itemid` = "100100000068028" AND (FROM_UNIXTIME(trends.`clock`) >= STR_TO_DATE('$P!{Begin_DateTime}','%Y-%c-%d %k:%i:%s.0')) AND (FROM_UNIXTIME(trends.`clock`) <= STR_TO_DATE('$P!{End_DateTime}','%Y-%c-%d %k:%i:%s.0')) ORDER BY CONVERT_TZ(FROM_UNIXTIME(trends.`clock`),'+00:00','-05:00') ASC
'$P!{Begin_DateTime}' is type java.sql.timestamp and is a parameter with "prompt" turned on. Another words, the user is asked from a pop up prompt starting and ending time using a GUI calendar selection box.Last edited by Palmertree; 10-05-2008, 14:36.Comment
-
Is it possible to generate report for a Host Group using a similar query?
example: If I need to get the most heavily loaded servers in a group of 20 for a week or so ....?
sorry but its taking me time for understanding the db schema for zabbix
thanks, I tested the query which works for a single host
thank you,
AbhiLast edited by abhi238; 12-05-2008, 15:45.Comment
-
Is it possible to generate report for a Host Group using a similar query?
example: If I need to get the most heavily loaded servers in a group of 20 for a week or so ....?
sorry but its taking me time for understanding the db schema for zabbix
thanks, I tested the query which works for a single host
thank you,
AbhiComment
-
quick and dirty way is to add the following to your SQL statement.
you will need to know the host group ID which can be found by looking in the DB at the following tables
hosts_group
this assigns hostid to groupid
groups
assigns a name to groupid
or you can find the group id by looking at the url when you are in the zabbix website
Configuration,Hosts,Host Groups then hover your mouse over the group name and look at the url for groupid=NUMBER
add the following to your SQL
SELECT
hosts_groups.`groupid` AS group_id,
FROM
`hosts_groups` host_groups,
WHERE
AND hosts_groups.`groupid` = "NUMBER WE GOT FROM EARLIER"
could probably do with tidying up though with some joins so dont test on your live database
im using
INNER JOIN `hosts_groups` hosts_groups ON items.`hostid` = hosts_groups.`hostid`
instead of
`hosts_groups` host_groups,Comment
-
I've been tasked with creating some detailed reports from Zabbix, and I see the solution to be Jasper, but the documentation has been weak to help me get it started. Would someone here who is a bit more experienced be willing to lend a hand in getting it configured?
Zabbix 1.5.2
RHEL 4
MySQL 4.1.20Comment
-
Jasper is the reporting engine. There are nice GUI interfaces like IReports that help configure the jasper engine for creating reports. There is a nice manual for ireports and some of the users in the Zabbix forums in this thread have found discounts for the manual online.Comment
-
Zabbix reports design with iReports
Hi!
I've created a little post in a blog with step-by-step instructions.
Check it out.
Comment
-
-
Calculating uptime using ireports
Hi all,
Found this thread with some good examples, however, I'm still looking for some guidance in order to calculate uptime on hosts or groups (i.e. 99,98%) and also taking maintenance periods into account.
Can anyone point me in the right direction with some examples?
Thanks in advance
AllanComment
Comment