Hi everyone,
I'm working on Icinga Web 1.13, with Icinga 2.3.4
I wish to create a new cronk in which my hosts' OS will be displayed. OS are given via the custom variable 'host.vars.os' so I tried to follow the advices given on the following page :
https://github.com/Icinga/icinga-web/blo…d_customvars.md
And, in fine, uncomment the relevant lines in the lines :
But, nope ; nothing appears.
I've checked the MySQL query Icinga-Web used and I've become a bit bewildered : (query is below)
SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i.host_object_id AS i__2, i4.name1 AS i4__3, i.alias AS i__4, i.address AS i__5, i.display_name AS i__6, COALESCE(i3.current_state, 0) AS i3__7, COALESCE(i3.current_state, 0) AS i3__8, i3.last_hard_state AS i3__9, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i5.program_start_time ELSE i3.last_state_change END) AS i__10, i3.last_check AS i3__11, i3.next_check AS i3__12, i5.program_start_time AS i5__13, i3.current_check_attempt AS i3__14, i3.max_check_attempts AS i3__15, i3.process_performance_data AS i3__16, i3.max_check_attempts AS i3__17, i2.instance_id AS i2__18, i.host_id AS i__19, i.action_url AS i__20, i.notes AS i__21, i.notes_url AS i__22, ((COALESCE(i3.has_been_checked, 0)-1)*-1) AS i__23, i3.notifications_enabled AS i3__24, i3.problem_has_been_acknowledged AS i3__25, i3.scheduled_downtime_depth AS i3__26, COALESCE(i3.has_been_checked, 0) AS i3__27, i3.state_type AS i3__28, i6.varvalue AS i6__29, i7.varvalue AS i7__30, i8.varvalue AS i8__30, i9.varvalue AS i9__30, i10.varvalue AS i10__30, i11.varvalue AS i11__30, i12.varvalue AS i12__30 FROM icinga_hosts i LEFT JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_hoststatus i3 ON i.host_object_id = i3.host_object_id LEFT JOIN icinga_objects i4 ON i.host_object_id = i4.object_id LEFT JOIN icinga_programstatus i5 ON i2.instance_id = i5.instance_id LEFT JOIN icinga_customvariables i6 ON i.host_object_id = i6.object_id AND (i6.varname = ?) LEFT JOIN icinga_customvariables i7 ON i.host_object_id = i7.object_id AND (i7.varname = ?) LEFT JOIN icinga_customvariables i8 ON i.host_object_id = i8.object_id AND (i8.varname = ?) LEFT JOIN icinga_customvariables i9 ON i.host_object_id = i9.object_id AND (i9.varname = ?) LEFT JOIN icinga_customvariables i10 ON i.host_object_id = i10.object_id AND (i10.varname = ?) LEFT JOIN icinga_customvariables i11 ON i.host_object_id = i11.object_id AND (i11.varname = ?) LEFT JOIN icinga_customvariables i12 ON i.host_object_id = i12.object_id AND (i12.varname = ?) WHERE (i4.is_active = '1' AND i.config_type = '1') ORDER BY i.host_object_id ASC LIMIT 100
We can see that the tables are joined on the "varname" field which is defined to '?'. Is that correct ? Shouldn't it be my variable name (i.e. varname="os") ?
Any ideas ??
Thanks,
Jean-Baptiste
I'm working on Icinga Web 1.13, with Icinga 2.3.4
I wish to create a new cronk in which my hosts' OS will be displayed. OS are given via the custom variable 'host.vars.os' so I tried to follow the advices given on the following page :
https://github.com/Icinga/icinga-web/blo…d_customvars.md
And, in fine, uncomment the relevant lines in the lines :
- app/modules/Api/config/views/host.xml
- app/modules/Cronks/data/xml/grid/icinga-host-cv-template.xml
- app/modules/Cronks/config/cronks_grid.xml
But, nope ; nothing appears.
I've checked the MySQL query Icinga-Web used and I've become a bit bewildered : (query is below)
SELECT DISTINCT i.icon_image AS i__0, i2.instance_name AS i2__1, i.host_object_id AS i__2, i4.name1 AS i4__3, i.alias AS i__4, i.address AS i__5, i.display_name AS i__6, COALESCE(i3.current_state, 0) AS i3__7, COALESCE(i3.current_state, 0) AS i3__8, i3.last_hard_state AS i3__9, (CASE WHEN i3.last_state_change<='1970-01-01 00:00:00' THEN i5.program_start_time ELSE i3.last_state_change END) AS i__10, i3.last_check AS i3__11, i3.next_check AS i3__12, i5.program_start_time AS i5__13, i3.current_check_attempt AS i3__14, i3.max_check_attempts AS i3__15, i3.process_performance_data AS i3__16, i3.max_check_attempts AS i3__17, i2.instance_id AS i2__18, i.host_id AS i__19, i.action_url AS i__20, i.notes AS i__21, i.notes_url AS i__22, ((COALESCE(i3.has_been_checked, 0)-1)*-1) AS i__23, i3.notifications_enabled AS i3__24, i3.problem_has_been_acknowledged AS i3__25, i3.scheduled_downtime_depth AS i3__26, COALESCE(i3.has_been_checked, 0) AS i3__27, i3.state_type AS i3__28, i6.varvalue AS i6__29, i7.varvalue AS i7__30, i8.varvalue AS i8__30, i9.varvalue AS i9__30, i10.varvalue AS i10__30, i11.varvalue AS i11__30, i12.varvalue AS i12__30 FROM icinga_hosts i LEFT JOIN icinga_instances i2 ON i.instance_id = i2.instance_id LEFT JOIN icinga_hoststatus i3 ON i.host_object_id = i3.host_object_id LEFT JOIN icinga_objects i4 ON i.host_object_id = i4.object_id LEFT JOIN icinga_programstatus i5 ON i2.instance_id = i5.instance_id LEFT JOIN icinga_customvariables i6 ON i.host_object_id = i6.object_id AND (i6.varname = ?) LEFT JOIN icinga_customvariables i7 ON i.host_object_id = i7.object_id AND (i7.varname = ?) LEFT JOIN icinga_customvariables i8 ON i.host_object_id = i8.object_id AND (i8.varname = ?) LEFT JOIN icinga_customvariables i9 ON i.host_object_id = i9.object_id AND (i9.varname = ?) LEFT JOIN icinga_customvariables i10 ON i.host_object_id = i10.object_id AND (i10.varname = ?) LEFT JOIN icinga_customvariables i11 ON i.host_object_id = i11.object_id AND (i11.varname = ?) LEFT JOIN icinga_customvariables i12 ON i.host_object_id = i12.object_id AND (i12.varname = ?) WHERE (i4.is_active = '1' AND i.config_type = '1') ORDER BY i.host_object_id ASC LIMIT 100
We can see that the tables are joined on the "varname" field which is defined to '?'. Is that correct ? Shouldn't it be my variable name (i.e. varname="os") ?
Any ideas ??
Thanks,
Jean-Baptiste