You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
Assignee: (none)
Status: New
Target Version: Backlog
Last Update: 2015-05-18 12:17:48 +00:00 (in Redmine)
Icinga Version: 1.9.2
DB Type: MySQL
DB Version: 1.9.0
Jasper Version: 4.7.0
SQL-Statement from reporting package 1.9 (contactgroups.jrxml)
select c.alias,
a.name1,
b.alias,
b.email_address
from icinga_objects a,
icinga_contacts b,
icinga_contactgroups c,
icinga_contactgroup_members d,
icinga_host_contactgroups e,
icinga_hosts f
where a.object_id = b.contact_object_id
and b.contact_object_id = d.contact_object_id
and d.contactgroup_id = c.contactgroup_id
and c.contactgroup_object_id = e.contactgroup_object_id
and e.host_id = f.host_id
and f.host_object_id = $P{p_host_object_id}
Join on icinga_objects and icinga_contacts doesn't work.
Fixed statement is here
select c.alias, a.display_name, e.alias, e.email_address
from
icinga_hosts a,
icinga_host_contactgroups b,
icinga_contactgroups c,
icinga_contactgroup_members d,
icinga_contacts e
where a.host_id = b.host_id
and b.contactgroup_object_id = c.contactgroup_object_id
and c.contactgroup_id = d.contactgroup_id
and d.contact_object_id = e.contact_object_id
and a.host_object_id = $P{p_host_object_id}
The contact groups sub report should deliver the contact groups for a host. If no contact, but a contactgroup, is definied for a host, the join between a.object_id and b.contact_object_id doesn't work.
So it's better to do a join with the tables hosts and host_contactgroups.
This issue has been migrated from Redmine: https://dev.icinga.com/issues/4630
Created by jschanz on 2013-08-23 10:08:06 +00:00
Assignee: (none)
Status: New
Target Version: Backlog
Last Update: 2015-05-18 12:17:48 +00:00 (in Redmine)
SQL-Statement from reporting package 1.9 (contactgroups.jrxml)
Join on icinga_objects and icinga_contacts doesn't work.
Fixed statement is here
Attachments
The text was updated successfully, but these errors were encountered: