Skip to content

Instantly share code, notes, and snippets.

@Vitexus
Created May 7, 2015 09:43
Show Gist options
  • Save Vitexus/78efaf9ab8ff4e1d7ce4 to your computer and use it in GitHub Desktop.
Save Vitexus/78efaf9ab8ff4e1d7ce4 to your computer and use it in GitHub Desktop.
Get all Host Status in icinga Hostgroup by name
SELECT * FROM icinga_objects o LEFT JOIN icinga_hoststatus s ON s.host_object_id = o.object_id WHERE object_id IN
(SELECT host_object_id FROM icinga_hostgroup_members WHERE hostgroup_id =
(SELECT hostgroup_id FROM icinga_hostgroups WHERE hostgroup_object_id =
(select object_id FROM icinga_objects WHERE objecttype_id = 3 AND name1 LIKE 'GROUPNAME')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment