Skip to content
This repository has been archived by the owner. It is now read-only.

[dev.icinga.com #5646] inactive objects still shown/counted in grid views #1259

Closed
icinga-migration opened this issue Feb 12, 2014 · 4 comments

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Feb 12, 2014

This issue has been migrated from Redmine: https://dev.icinga.com/issues/5646

Created by mfriedrich on 2014-02-12 15:57:33 +00:00

Assignee: mhein
Status: Resolved (closed on 2014-02-14 13:34:44 +00:00)
Target Version: 1.10.1
Last Update: 2014-02-18 12:21:49 +00:00 (in Redmine)

Icinga Version: 0.0.7-dev
Icinga Web Version: 1.11.0
IDO Version: 1.11.0
OS Version: any
DB Type: MySQL
DB Version: 5.5.33
Browser Version: any

I've removed various configuration objects from the Icinga 2 config which results into icinga_objects.is_active=0 being set.

mysql> select * from icinga_objects where is_active = 0;
+-----------+-------------+---------------+----------------+-----------+-----------+
| object_id | instance_id | objecttype_id | name1          | name2     | is_active |
+-----------+-------------+---------------+----------------+-----------+-----------+
|        24 |           1 |            12 | event-foo      |           |         0 |
|        31 |           1 |             1 | localhost-foo  |           |         0 |
|        35 |           1 |             2 | localhost-foo  | disk      |         0 |
|        37 |           1 |             2 | localhost-5628 | disk      |         0 |
|        38 |           1 |             2 | localhost-foo  | http      |         0 |
|        40 |           1 |             2 | localhost-foo  | load      |         0 |
|        42 |           1 |             2 | localhost-foo  | ping4     |         0 |
|        44 |           1 |             2 | localhost-foo  | ping6     |         0 |
|        46 |           1 |             2 | localhost-foo  | processes |         0 |
|        48 |           1 |             2 | localhost-foo  | ssh       |         0 |
|        50 |           1 |             2 | localhost-foo  | users     |         0 |
|        56 |           1 |             1 | icinga2a       |           |         0 |
|        57 |           1 |             2 | icinga2a       | cluster   |         0 |
+-----------+-------------+---------------+----------------+-----------+-----------+
13 rows in set (0.00 sec)

Icinga Web silently ignores that attribute in

  • calculating the status cronk numbers
  • rendering the grid views

It fails heavily once such an inactive object is clicked onto for details. Sample screenshots attached.

michi@nbmif ~/coding/icinga/icinga-web (next) $ git log
commit 55dea4737246b0474b233625bb3b662ecb29afeb
Author: Michael Friedrich 
Date:   Thu Jan 9 18:20:41 2014 +0100

    Update release download from github.

The queries partly take is_active into account, but for example the services critical view does not. (module_appkit.xml with enabled dql queries in debug log)

[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::validateTarget()@66 : Template uses view TARGET_SERVICE for data retrieval
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::initialize()@441 : Switching to connection icinga
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getQueryTokens()@354 : Replacing tokens [["${retained_flag}"],["retained_flag"]] 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::createDQL()@183 : Parsing DQL Query: 

            SELECT DISTINCT
                s.icon_image AS SERVICE_ICON_IMAGE,
                i.instance_name AS INSTANCE_NAME,
                h.host_object_id AS HOST_OBJECT_ID,
                s.service_object_id AS SERVICE_OBJECT_ID,
                oh.name1 AS HOST_NAME,
                h.alias AS HOST_ALIAS,
                h.display_name AS HOST_DISPLAY_NAME,
                os.name2 AS SERVICE_NAME,
                s.display_name AS SERVICE_DISPLAY_NAME,
                ss.process_performance_data AS SERVICE_PROCESS_PERFORMANCE_DATA,
                COALESCE(ss.current_state,0) AS SERVICE_CURRENT_STATE,
                COALESCE(ss.current_state,0) AS SERVICE_STATUS,
                ss.last_hard_state AS SERVICE_HARD_STATE,
                hs.last_hard_state AS HOST_HARD_STATE,
                COALESCE(hs.current_state,0) AS HOST_CURRENT_STATE,
                (CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
                ps.program_start_time AS SERVICE_PROGRAM_START_TIME,
                ss.last_check AS SERVICE_LAST_CHECK,
                ss.next_check AS SERVICE_NEXT_CHECK,
                ss.current_check_attempt AS SERVICE_CURRENT_CHECK_ATTEMPT,
                ss.max_check_attempts AS service_max_attempt,
                i.instance_id AS SERVICE_INSTANCE_ID,
                s.service_id AS SERVICE_ID,
                ss.notifications_enabled as notifications_enabled,
                ss.problem_has_been_acknowledged as problem_acknowledged,
                ss.scheduled_downtime_depth as scheduled_downtime_depth,
                s.action_url AS SERVICE_ACTION_URL,
                h.notes as HOST_NOTES,
                h.notes_url AS HOST_NOTES_URL,
                s.notes as SERVICE_NOTES,
                s.notes_url AS SERVICE_NOTES_URL,
                COALESCE(ss.has_been_checked,0) as service_has_been_checked,
                ss.state_type AS SERVICE_STATE_TYPE
            FROM IcingaServices s
            INNER JOIN s.instance i
            LEFT JOIN s.status ss
            INNER JOIN s.host h
            LEFT JOIN h.status hs
            INNER JOIN h.object oh
            INNER JOIN s.object os
            INNER JOIN i.programstatus as ps

            WHERE s.config_type = '1'


[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyCredentials()@202 : Parsing credentials: [{"name":"IcingaHost","type":"MultiLike","affects":"host","params":{"target":"IcingaHost","column":"oh.name1"}},{"name":"IcingaService","type":"MultiLike","affects":"service","params":{"target":"IcingaService","column":"os.name2"}},{"name":"IcingaServicegroup","type":"dql","affects":"service","calls":[{"type":"leftjoin","arg":"s.servicegroups sg"},{"type":"innerjoin","arg":"sg.object osg"},{"type":"orwhere","arg":"\n                    \n                        osg.name1 IN (${credential_value})\n                    \n                "}]},{"name":"IcingaHostgroup","type":"dql","affects":"host","calls":[{"type":"leftjoin","arg":"h.hostgroups hg"},{"type":"innerjoin","arg":"hg.object ohg"},{"type":"orwhere","arg":"\n                    \n                        ohg.name1 IN (${credential_value})\n                    \n                "}]},{"name":"IcingaContactgroup","type":"dql","affects":"service","calls":[{"type":"leftjoin","arg":"\n                    s.contactgroups cg\n                "},{"type":"orwhere","arg":"\n                    \n                    cg.contactgroup_id  IN (${TARGET_CONTACTGROUPS.contactgroup_id})\n                    \n                "}]},{"name":"IcingaHostCustomVariablePair","type":"CustomVariable","affects":"host","params":{"alias":"h","target":"host"}},{"name":"IcingaServiceCustomVariablePair","type":"CustomVariable","affects":"service","params":{"alias":"s","target":"service"}}]
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyCredentials()@202 : 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyCredentials()@202 : 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyCredentials()@202 : 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::createDQL()@183 : Query : SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1')
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::parseDependencies()@84 : Merge dependency detected: TARGET_SERVICE -> TARGET_SERVICE_BLOBFIELDS 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : Applying dql sequence [{"type":"resolve","arg":"COALESCE(ss.current_state,0)"}]
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getQueryTokens()@354 : Replacing tokens [[],[]] 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : Applying call query->resolve(COALESCE(ss.current_state,0))
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : After call query->resolve(COALESCE(ss.current_state,0)): SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1') ORDER BY i6.name1 ASC LIMIT 25 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::addWhere()@223 : Query after addWhere (COALESCE(ss.current_state,0) = '2') SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1' AND COALESCE(i3.current_state, 0) = '2') ORDER BY i6.name1 ASC LIMIT 25 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : Applying dql sequence [{"type":"resolve","arg":"COALESCE(ss.has_been_checked,0)"}]
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getQueryTokens()@354 : Replacing tokens [[],[]] 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : Applying call query->resolve(COALESCE(ss.has_been_checked,0))
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyDQLCalls()@133 : After call query->resolve(COALESCE(ss.has_been_checked,0)): SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1' AND COALESCE(i3.current_state, 0) = '2') ORDER BY i6.name1 ASC LIMIT 25 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::addWhere()@223 : Query after addWhere (COALESCE(ss.has_been_checked,0) = '1') SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1' AND COALESCE(i3.current_state, 0) = '2' AND COALESCE(i3.has_been_checked, 0) = '1') ORDER BY i6.name1 ASC LIMIT 25 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getResult()@92 : Processing query SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1' AND COALESCE(i3.current_state, 0) = '2' AND COALESCE(i3.has_been_checked, 0) = '1') ORDER BY i6.name1 ASC LIMIT 25 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getResult()@92 : Result for view TARGET_SERVICE : [{"SERVICE_ICON_IMAGE":"","INSTANCE_NAME":"default","HOST_OBJECT_ID":"28","SERVICE_OBJECT_ID":"36","HOST_NAME":"localhost","HOST_ALIAS":"localhost","HOST_DISPLAY_NAME":"localhost","SERVICE_NAME":"disk","SERVICE_DISPLAY_NAME":"disk","SERVICE_PROCESS_PERFORMANCE_DATA":"1","SERVICE_CURRENT_STATE":"2","SERVICE_STATUS":"2","SERVICE_HARD_STATE":"0","HOST_HARD_STATE":"0","HOST_CURRENT_STATE":"0","DURATION_START":"2014-02-11 14:25:03","SERVICE_PROGRAM_START_TIME":"2014-02-12 15:49:53","SERVICE_LAST_CHECK":"2014-02-12 15:57:18","SERVICE_NEXT_CHECK":"2014-02-12 15:57:18","SERVICE_CURRENT_CHECK_ATTEMPT":"1","service_max_attempt":"3","SERVICE_INSTANCE_ID":"1","SERVICE_ID":"2","notifications_enabled":"1","problem_acknowledged":"0","scheduled_downtime_depth":"0","SERVICE_ACTION_URL":"","HOST_NOTES":"","HOST_NOTES_URL":"","SERVICE_NOTES":"","SERVICE_NOTES_URL":"","service_has_been_checked":"1","SERVICE_STATE_TYPE":"1"},{"SERVICE_ICON_IMAGE":"","INSTANCE_NAME":"default","HOST_OBJECT_ID":"32","SERVICE_OBJECT_ID":"37","HOST_NAME":"localhost-5628","HOST_ALIAS":"localhost-5628","HOST_DISPLAY_NAME":"localhost-5628","SERVICE_NAME":"disk","SERVICE_DISPLAY_NAME":"disk","SERVICE_PROCESS_PERFORMANCE_DATA":"1","SERVICE_CURRENT_STATE":"2","SERVICE_STATUS":"2","SERVICE_HARD_STATE":"0","HOST_HARD_STATE":"0","HOST_CURRENT_STATE":"0","DURATION_START":"2014-02-11 14:25:03","SERVICE_PROGRAM_START_TIME":"2014-02-12 15:49:53","SERVICE_LAST_CHECK":"2014-02-12 09:20:25","SERVICE_NEXT_CHECK":"2014-02-12 09:20:25","SERVICE_CURRENT_CHECK_ATTEMPT":"1","service_max_attempt":"3","SERVICE_INSTANCE_ID":"1","SERVICE_ID":"3","notifications_enabled":"1","problem_acknowledged":"0","scheduled_downtime_depth":"0","SERVICE_ACTION_URL":"","HOST_NOTES":"","HOST_NOTES_URL":"","SERVICE_NOTES":"","SERVICE_NOTES_URL":"","service_has_been_checked":"1","SERVICE_STATE_TYPE":"1"},{"SERVICE_ICON_IMAGE":"","INSTANCE_NAME":"default","HOST_OBJECT_ID":"31","SERVICE_OBJECT_ID":"35","HOST_NAME":"localhost-foo","HOST_ALIAS":"localhost-foo","HOST_DISPLAY_NAME":"localhost-foo","SERVICE_NAME":"disk","SERVICE_DISPLAY_NAME":"disk","SERVICE_PROCESS_PERFORMANCE_DATA":"1","SERVICE_CURRENT_STATE":"2","SERVICE_STATUS":"2","SERVICE_HARD_STATE":"0","HOST_HARD_STATE":"0","HOST_CURRENT_STATE":"0","DURATION_START":"2014-02-11 14:25:03","SERVICE_PROGRAM_START_TIME":"2014-02-12 15:49:53","SERVICE_LAST_CHECK":"2014-02-12 13:46:00","SERVICE_NEXT_CHECK":"2014-02-12 15:02:32","SERVICE_CURRENT_CHECK_ATTEMPT":"1","service_max_attempt":"3","SERVICE_INSTANCE_ID":"1","SERVICE_ID":"1","notifications_enabled":"1","problem_acknowledged":"0","scheduled_downtime_depth":"0","SERVICE_ACTION_URL":"","HOST_NOTES":"","HOST_NOTES_URL":"","SERVICE_NOTES":"","SERVICE_NOTES_URL":"","service_has_been_checked":"1","SERVICE_STATE_TYPE":"1"}]
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::validateTarget()@66 : Template uses view TARGET_SERVICE_BLOBFIELDS for data retrieval
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::initialize()@441 : Switching to connection icinga
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getQueryTokens()@354 : Replacing tokens [["${TARGET_SERVICE.SERVICE_OBJECT_ID}"],["TARGET_SERVICE.SERVICE_OBJECT_ID"]] 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::resolveReferenceToken()@368 : View TARGET_SERVICE_BLOBFIELDS requires field SERVICE_OBJECT_ID from view TARGET_SERVICE
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::createDQL()@183 : Parsing DQL Query: 

            SELECT
                ss.service_object_id AS SERVICE_OBJECT_ID,
                ss.output AS SERVICE_OUTPUT,
                ss.long_output AS SERVICE_LONG_OUTPUT,
                ss.perfdata AS SERVICE_PERFORMANCE_DATA
            FROM IcingaServicestatus ss
            WHERE ss.service_object_id IN ('36','37','35')


[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::applyCredentials()@202 : Parsing credentials: []
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::createDQL()@183 : Query : SELECT i.service_object_id AS i__0, i.output AS i__1, i.long_output AS i__2, i.perfdata AS i__3 FROM icinga_servicestatus i WHERE (i.service_object_id IN ('36', '37', '35'))
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getResult()@48 : Processing query SELECT i.service_object_id AS i__0, i.output AS i__1, i.long_output AS i__2, i.perfdata AS i__3 FROM icinga_servicestatus i WHERE (i.service_object_id IN ('36', '37', '35')) 
[Wed Feb 12 15:51:56 2014] [debug] API_Views_ApiDQLViewModel::getResult()@48 : Result for view TARGET_SERVICE_BLOBFIELDS : [{"SERVICE_OBJECT_ID":"35","SERVICE_OUTPUT":"DISK CRITICAL - free space: \/ 2641 MB (13% inode=61%): \/dev 10 MB (100% inode=99%): \/run 793 MB (99% inode=99%): \/run\/lock 5 MB (100% inode=99%): \/run\/shm 1588 MB (99% inode=99%): \/backup 25560 MB (96% inode=99%): \/boot 55 MB (55% inode=98%): \/data 19571 MB (44% inode=98%): \/home 20873 MB (43% inode=93%): \/vms 17543 MB (18% inode=99%): \/sys\/fs\/cgroup 0 MB (100% inode=99%): \/home\/michi\/share\/software 53979 MB (9% inode=-):","SERVICE_LONG_OUTPUT":"","SERVICE_PERFORMANCE_DATA":""},{"SERVICE_OBJECT_ID":"36","SERVICE_OUTPUT":"DISK CRITICAL - free space: \/ 2677 MB (14% inode=61%): \/dev 10 MB (100% inode=99%): \/run 793 MB (99% inode=99%): \/run\/lock 5 MB (100% inode=99%): \/run\/shm 1577 MB (99% inode=99%): \/backup 25560 MB (96% inode=99%): \/boot 55 MB (55% inode=98%): \/data 19883 MB (44% inode=98%): \/home 20871 MB (43% inode=93%): \/vms 17543 MB (18% inode=99%): \/sys\/fs\/cgroup 0 MB (100% inode=99%): \/home\/michi\/share\/software 53979 MB (9% inode=-):","SERVICE_LONG_OUTPUT":"","SERVICE_PERFORMANCE_DATA":"\/=17212375040B;16803430400;18903728128;0;21005074432 \/backup=1090519040B;23513268224;26452426752;0;29391585280 \/boot=45088768B;88080384;98566144;0;110100480 \/data=25726812160B;39259734016;44167069696;0;49075453952 \/dev=0B;8388608;9437184;0;10485760 \/home=28179431424B;42167435264;47438626816;0;52709818368 \/home\/michi\/share\/software=523218452480B;463856467968;521838526464;0;579820584960 \/run=1048576B;665845760;748683264;0;832569344 \/run\/lock=0B;4194304;4194304;0;5242880 \/run\/shm=11534336B;1332740096;1499463680;0;1666187264 \/sys\/fs\/cgroup=0B;0;0;0;0 \/vms=82116083712B;84443922432;94998888448;0;105554903040"},{"SERVICE_OBJECT_ID":"37","SERVICE_OUTPUT":"DISK CRITICAL - free space: \/ 3067 MB (16% inode=62%): \/dev 10 MB (100% inode=99%): \/run 793 MB (99% inode=99%): \/run\/lock 5 MB (100% inode=99%): \/run\/shm 1587 MB (99% inode=99%): \/backup 25560 MB (96% inode=99%): \/boot 55 MB (55% inode=98%): \/data 19904 MB (44% inode=98%): \/home 20894 MB (43% inode=93%): \/vms 17543 MB (18% inode=99%): \/sys\/fs\/cgroup 0 MB (100% inode=99%): \/home\/michi\/share\/software 53979 MB (9% inode=-):","SERVICE_LONG_OUTPUT":"","SERVICE_PERFORMANCE_DATA":"\/=16804478976B;16803430400;18903728128;0;21005074432 \/backup=1090519040B;23513268224;26452426752;0;29391585280 \/boot=45088768B;88080384;98566144;0;110100480 \/data=25704792064B;39259734016;44167069696;0;49075453952 \/dev=0B;8388608;9437184;0;10485760 \/home=28155314176B;42167435264;47438626816;0;52709818368 \/home\/michi\/share\/software=523218452480B;463856467968;521838526464;0;579820584960 \/run=1048576B;665845760;748683264;0;832569344 \/run\/lock=0B;4194304;4194304;0;5242880 \/run\/shm=1048576B;1332740096;1499463680;0;1666187264 \/sys\/fs\/cgroup=0B;0;0;0;0 \/vms=82116083712B;84443922432;94998888448;0;105554903040"}]


mysql> SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i4.host_object_id AS i4__2, i.service_object_id AS i__3, i6.name1 AS i6__4, i4.alias AS i4__5, i4.display_name AS i4__6, i7.name2 AS i7__7, i.display_name AS i__8, i3.process_performance_data AS i3__9, COALESCE(i3.current_state, 0) AS i3__10, COALESCE(i3.current_state, 0) AS i3__11, i3.last_hard_state AS i3__12, i5.last_hard_state AS i5__13, COALESCE(i5.current_state, 0) AS i5__14, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i8.program_start_time ELSE i3.last_state_change END) AS i__15, i8.program_start_time AS i8__16, i3.last_check AS i3__17, i3.next_check AS i3__18, i3.current_check_attempt AS i3__19, i3.max_check_attempts AS i3__20, i2.instance_id AS i2__21, i.service_id AS i__22, i3.notifications_enabled AS i3__23, i3.problem_has_been_acknowledged AS i3__24, i3.scheduled_downtime_depth AS i3__25, i.action_url AS i__26, i4.notes AS i4__27, i4.notes_url AS i4__28, i.notes AS i__29, i.notes_url AS i__30, COALESCE(i3.has_been_checked, 0) AS i3__31, i3.state_type AS i3__32 FROM icinga_services i INNER JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_servicestatus i3 ON i.service_object_id = i3.service_object_id INNER JOIN icinga_hosts i4 ON i.host_object_id = i4.host_object_id LEFT JOIN icinga_hoststatus i5 ON i4.host_object_id = i5.host_object_id INNER JOIN icinga_objects i6 ON i4.host_object_id = i6.object_id INNER JOIN icinga_objects i7 ON i.service_object_id = i7.object_id INNER JOIN icinga_programstatus i8 ON i2.instance_id = i8.instance_id WHERE (i.config_type = '1');
+------+---------+-------+------+----------------+----------------+----------------+-----------+-----------+-------+--------+--------+--------+--------+--------+---------------------+---------------------+---------------------+---------------------+--------+--------+--------+-------+--------+--------+--------+-------+--------+--------+-------+-------+--------+--------+
| i__0 | i2__1   | i4__2 | i__3 | i6__4          | i4__5          | i4__6          | i7__7     | i__8      | i3__9 | i3__10 | i3__11 | i3__12 | i5__13 | i5__14 | i__15               | i8__16              | i3__17              | i3__18              | i3__19 | i3__20 | i2__21 | i__22 | i3__23 | i3__24 | i3__25 | i__26 | i4__27 | i4__28 | i__29 | i__30 | i3__31 | i3__32 |
+------+---------+-------+------+----------------+----------------+----------------+-----------+-----------+-------+--------+--------+--------+--------+--------+---------------------+---------------------+---------------------+---------------------+--------+--------+--------+-------+--------+--------+--------+-------+--------+--------+-------+-------+--------+--------+
|      | default |    31 |   35 | localhost-foo  | localhost-foo  | localhost-foo  | disk      | disk      |     1 |      2 |      2 |      0 |      0 |      0 | 2014-02-11 14:25:03 | 2014-02-12 15:49:53 | 2014-02-12 13:46:00 | 2014-02-12 15:02:32 |      1 |      3 |      1 |     1 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   36 | localhost      | localhost      | localhost      | disk      | disk      |     1 |      2 |      2 |      0 |      0 |      0 | 2014-02-11 14:25:03 | 2014-02-12 15:49:53 | 2014-02-12 15:57:18 | 2014-02-12 15:57:18 |      1 |      3 |      1 |     2 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    32 |   37 | localhost-5628 | localhost-5628 | localhost-5628 | disk      | disk      |     1 |      2 |      2 |      0 |      0 |      0 | 2014-02-11 14:25:03 | 2014-02-12 15:49:53 | 2014-02-12 09:20:25 | 2014-02-12 09:20:25 |      1 |      3 |      1 |     3 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   38 | localhost-foo  | localhost-foo  | localhost-foo  | http      | http      |     1 |      0 |      0 |      0 |      0 |      0 | 2014-01-28 15:49:06 | 2014-02-12 15:49:53 | 2014-02-12 15:00:31 | 2014-02-12 15:00:31 |      1 |      3 |      1 |     4 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   39 | localhost      | localhost      | localhost      | http      | http      |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:12:49 | 2014-02-12 15:49:53 | 2014-02-12 15:55:08 | 2014-02-12 15:55:08 |      1 |      3 |      1 |     5 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   40 | localhost-foo  | localhost-foo  | localhost-foo  | load      | load      |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-04 17:19:34 | 2014-02-12 15:49:53 | 2014-02-12 13:45:04 | 2014-02-12 15:02:56 |      1 |      3 |      1 |     6 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    32 |   41 | localhost-5628 | localhost-5628 | localhost-5628 | ping4     | ping4     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-10 10:11:58 | 2014-02-12 15:49:53 | 2014-02-12 15:57:22 | 2014-02-12 15:57:18 |      1 |      3 |      1 |     7 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   42 | localhost-foo  | localhost-foo  | localhost-foo  | ping4     | ping4     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 11:47:00 | 2014-02-12 15:49:53 | 2014-02-12 13:44:55 | 2014-02-12 15:00:43 |      1 |      3 |      1 |     8 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   43 | localhost      | localhost      | localhost      | icinga    | icinga    |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:11:00 | 2014-02-12 15:49:53 | 2014-02-12 15:53:54 | 2014-02-12 15:53:54 |      1 |      3 |      1 |     9 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   44 | localhost-foo  | localhost-foo  | localhost-foo  | ping6     | ping6     |     1 |      3 |      3 |      0 |      0 |      0 | 2014-02-12 13:47:33 | 2014-02-12 15:49:53 | 2014-02-12 13:47:33 | 2014-02-12 15:00:43 |      2 |      3 |      1 |    10 |      1 |      0 |      0 |       |        |        |       |       |      1 |      0 |
|      | default |    32 |   45 | localhost-5628 | localhost-5628 | localhost-5628 | ping6     | ping6     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-10 10:12:51 | 2014-02-12 15:49:53 | 2014-02-12 15:55:12 | 2014-02-12 15:55:08 |      1 |      3 |      1 |    11 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   46 | localhost-foo  | localhost-foo  | localhost-foo  | processes | processes |     1 |      1 |      1 |      0 |      0 |      0 | 2014-02-07 11:49:27 | 2014-02-12 15:49:53 | 2014-02-12 14:59:36 | 2014-02-12 14:59:36 |      1 |      3 |      1 |    12 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   47 | localhost      | localhost      | localhost      | load      | load      |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:10:43 | 2014-02-12 15:49:53 | 2014-02-12 15:54:26 | 2014-02-12 15:54:26 |      1 |      3 |      1 |    13 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   48 | localhost-foo  | localhost-foo  | localhost-foo  | ssh       | ssh       |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 11:47:16 | 2014-02-12 15:49:53 | 2014-02-12 15:00:14 | 2014-02-12 15:00:14 |      1 |      3 |      1 |    14 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    32 |   49 | localhost-5628 | localhost-5628 | localhost-5628 | users     | users     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-10 10:13:46 | 2014-02-12 15:49:53 | 2014-02-12 15:53:54 | 2014-02-12 15:53:54 |      1 |      3 |      1 |    15 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    31 |   50 | localhost-foo  | localhost-foo  | localhost-foo  | users     | users     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 11:47:16 | 2014-02-12 15:49:53 | 2014-02-12 13:36:24 | 2014-02-12 15:02:32 |      1 |      3 |      1 |    16 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   51 | localhost      | localhost      | localhost      | ping4     | ping4     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:10:27 | 2014-02-12 15:49:53 | 2014-02-12 15:53:36 | 2014-02-12 15:53:32 |      1 |      3 |      1 |    17 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   52 | localhost      | localhost      | localhost      | ping6     | ping6     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:12:34 | 2014-02-12 15:49:53 | 2014-02-12 15:56:13 | 2014-02-12 15:56:09 |      1 |      3 |      1 |    18 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   53 | localhost      | localhost      | localhost      | processes | processes |     1 |      1 |      1 |      0 |      0 |      0 | 2014-02-07 14:12:41 | 2014-02-12 15:49:53 | 2014-02-12 15:55:20 | 2014-02-12 15:55:20 |      1 |      3 |      1 |    19 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   54 | localhost      | localhost      | localhost      | ssh       | ssh       |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:11:41 | 2014-02-12 15:49:53 | 2014-02-12 15:55:12 | 2014-02-12 15:55:12 |      1 |      3 |      1 |    20 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    28 |   55 | localhost      | localhost      | localhost      | users     | users     |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-07 14:16:00 | 2014-02-12 15:49:53 | 2014-02-12 15:55:27 | 2014-02-12 15:55:27 |      1 |      3 |      1 |    21 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
|      | default |    56 |   57 | icinga2a       | icinga2a       | icinga2a       | cluster   | cluster   |     1 |      0 |      0 |      0 |      0 |      0 | 2014-02-12 09:31:39 | 2014-02-12 15:49:53 | 2014-02-12 13:32:56 | 2014-02-12 13:32:56 |      1 |      3 |      1 |    22 |      1 |      0 |      0 |       |        |        |       |       |      1 |      1 |
+------+---------+-------+------+----------------+----------------+----------------+-----------+-----------+-------+--------+--------+--------+--------+--------+---------------------+---------------------+---------------------+---------------------+--------+--------+--------+-------+--------+--------+--------+-------+--------+--------+-------+-------+--------+--------+
22 rows in set (0.00 sec)

Attachments

Changesets

2014-02-14 13:33:51 +00:00 by mhein 2ac7c8c

Fix: Hide inactive objects

fixes #5646

2014-02-18 12:15:36 +00:00 by mhein b9ff0d9

Fix: Hide inactive objects

fixes #5646

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 12, 2014

Updated by mfriedrich on 2014-02-12 16:07:40 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mhein
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 14, 2014

Updated by mhein on 2014-02-14 13:34:45 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 2ac7c8c.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 18, 2014

Updated by mfrosch on 2014-02-18 12:21:49 +00:00

  • Target Version changed from 1.11 to 1.10.1
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 21, 2014

Updated by gbeutner on 2014-08-21 05:13:04 +00:00

  • Duplicated set to 6972
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant
You can’t perform that action at this time.