Icinga2 Reporting Module - Please advise with filter

checking out the Reporting module. Can anybody please give me a hint how the filter could look like? Any examples from your environment - Host Uptime or so?

Yes, it is a shame that there is no wizard for it, but I workaround this in following way. I go to the host or service overview and create a filter there using the wizard and then take it from the url. It looks like host_name=* or _host_os=Linux, the host_ is used for internal attributes and _host_ for custom ones.

I thought so, but it doesnt work, I get SQL errors. I think, I forgot to alter / update the database somehow or forgot to import a schema…

Or do I need to “run” something before?

SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION icinga2.idoreports_get_sla_ok_percent does not exist, query was: SELECT h.display_name COLLATE latin1_general_ci AS host_display_name, h.display_name COLLATE latin1_general_ci AS host_display_name, idoreports_get_sla_ok_percent(ho.object_id, ‘2020-10-01 00:00:00’, ‘2020-10-07 09:49:51’, NULL) AS sla FROM icinga_objects AS ho
INNER JOIN icinga_hosts AS h ON h.host_object_id = ho.object_id AND ho.is_active = 1 AND ho.objecttype_id = 1 WHERE ( (TRUE) ) ORDER BY h.display_name COLLATE latin1_general_ci ASC (Pdo.php:225)

Yes, you probably did not import the second sql get_sla_ok_percent.sql see https://github.com/Icinga/icingaweb2-module-idoreports/blob/master/doc/02-Installation.md#import-database-files

Not sure if you get the same error if the user would not have EXECUTE privileges, but this is another stumbling block users came across.

1 Like

THANK YOU!!! :heartbeat: