[icinga-checkins] icinga.org: icinga-web/mhein/default: * added service information to data grid

Christian Doebler christian.doebler at netways.de
Sat Oct 3 10:04:24 CEST 2009


Module: icinga-web
Branch: mhein/default
Commit: f172b4de696525f895fc77f3f386f321340c267e
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=f172b4de696525f895fc77f3f386f321340c267e

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Thu Oct  1 14:27:03 2009 +0200

* added service information to data grid

---

 app/config/simple_data_provider.xml |   64 +++++++++++++++++++++++++++++++++++
 res/i18n/mo/de.mo                   |  Bin 286 -> 292 bytes
 res/i18n/mo/en.mo                   |  Bin 1279 -> 2209 bytes
 res/i18n/po/en.po                   |   50 +++++++++++++++++++++++++++
 res/xml/icinga-service-template.xml |   61 +++++++++++++++++++++++++++++++++
 5 files changed, 175 insertions(+), 0 deletions(-)

diff --git a/app/config/simple_data_provider.xml b/app/config/simple_data_provider.xml
index cd472dc..96c6f4e 100644
--- a/app/config/simple_data_provider.xml
+++ b/app/config/simple_data_provider.xml
@@ -64,4 +64,68 @@
 			</parameter>
 		</parameter>
 
+		<parameter name="serviceinfo">
+			<parameter name="module">Web</parameter>
+			<parameter name="action">IcingaApiSimpleDataProvider</parameter>
+			<parameter name="description">query for service information</parameter>
+			<parameter name="target">IcingaApi::TARGET_SERVICE</parameter>
+			<parameter name="result_columns">
+				<parameter>SERVICE_DISPLAY_NAME</parameter>
+				<parameter>SERVICE_CURRENT_STATE</parameter>
+				<!-- 
+				Host Status: UP (for 5d 18h 24m 43s)
+				-->
+				<parameter>SERVICE_OUTPUT</parameter>
+				<parameter>SERVICE_PERFDATA</parameter>
+				<parameter>SERVICE_CURRENT_CHECK_ATTEMPT</parameter>
+				<parameter>SERVICE_MAX_CHECK_ATTEMPTS</parameter>
+				<parameter>SERVICE_LAST_CHECK</parameter>
+				<parameter>SERVICE_CHECK_TYPE</parameter>
+				<parameter>SERVICE_LATENCY</parameter>
+				<parameter>SERVICE_EXECUTION_TIME</parameter>
+				<parameter>SERVICE_NEXT_CHECK</parameter>
+				<parameter>SERVICE_LAST_HARD_STATE_CHANGE</parameter>
+				<parameter>SERVICE_LAST_NOTIFICATION</parameter>
+				<parameter>SERVICE_IS_FLAPPING</parameter>
+				<!-- 
+				Is This Host Flapping? NO (0.00% state change)
+				-->
+				<parameter>SERVICE_SCHEDULED_DOWNTIME_DEPTH</parameter>
+				<parameter>SERVICE_STATUS_UPDATE_TIME</parameter>
+				<!-- 
+				Active Checks:	ENABLED  
+				Passive Checks:	ENABLED  
+				Obsessing:	ENABLED  
+				Notifications: ENABLED  
+				Event Handler:	ENABLED  
+				Flap Detection:	ENABLED
+				-->  
+			</parameter>
+			<parameter name="filter">
+				<parameter>
+					<parameter name="column">CONTACTGROUP_NAME</parameter>
+					<parameter name="value">%</parameter>
+					<parameter name="match_type">IcingaApi::MATCH_LIKE</parameter>
+				</parameter>
+			</parameter>
+			<parameter name="user_filters">
+				<parameter name="host">
+					<parameter name="column">HOST_NAME</parameter>
+					<parameter name="match_type">IcingaApi::MATCH_EXACT</parameter>
+				</parameter>
+				<parameter name="service">
+					<parameter name="column">SERVICE_NAME</parameter>
+					<parameter name="match_type">IcingaApi::MATCH_EXACT</parameter>
+				</parameter>
+			</parameter>
+			<parameter name="order">
+				<parameter name="column">SERVICE_NEXT_CHECK</parameter>
+				<parameter name="direction">desc</parameter>
+			</parameter>
+			<parameter name="limit">
+				<parameter name="start">1</parameter>
+				<!-- <parameter name="length">1</parameter> -->
+			</parameter>
+		</parameter>
+
 </setting>
\ No newline at end of file
diff --git a/res/i18n/mo/de.mo b/res/i18n/mo/de.mo
index 5b9bb31..608fb40 100644
Binary files a/res/i18n/mo/de.mo and b/res/i18n/mo/de.mo differ
diff --git a/res/i18n/mo/en.mo b/res/i18n/mo/en.mo
index 59cdd18..db57ffd 100644
Binary files a/res/i18n/mo/en.mo and b/res/i18n/mo/en.mo differ
diff --git a/res/i18n/po/en.po b/res/i18n/po/en.po
index cb12e0f..2af8f5b 100644
--- a/res/i18n/po/en.po
+++ b/res/i18n/po/en.po
@@ -13,6 +13,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+# table output of host information
 msgid "host_address"
 msgstr "Address"
 
@@ -66,3 +67,52 @@ msgstr "Scheduled downtime depth"
 
 msgid "host_status_update_time"
 msgstr "Status update time"
+
+# table output of service information
+msgid "service_display_name"
+msgstr "Display name"
+
+msgid "service_current_state"
+msgstr "Current state"
+
+msgid "service_output"
+msgstr "Output"
+
+msgid "service_perfdata"
+msgstr "Performance data"
+
+msgid "service_current_check_attempt"
+msgstr "Check attempt"
+
+msgid "service_max_check_attempts"
+msgstr "Max check attempts"
+
+msgid "service_last_check"
+msgstr "Last check"
+
+msgid "service_check_type"
+msgstr "Check type"
+
+msgid "service_latency"
+msgstr "Latency"
+
+msgid "service_execution_time"
+msgstr "Execution time"
+
+msgid "service_next_check"
+msgstr "Next check"
+
+msgid "service_last_hard_state_change"
+msgstr "Last hard state change"
+
+msgid "service_last_notification"
+msgstr "Last notification"
+
+msgid "service_is_flapping"
+msgstr "Is flapping"
+
+msgid "service_scheduled_downtime_depth"
+msgstr "Scheduled downtime depth"
+
+msgid "service_status_update_time"
+msgstr "Status update time"
diff --git a/res/xml/icinga-service-template.xml b/res/xml/icinga-service-template.xml
index bb5ac1e..c5ccb90 100644
--- a/res/xml/icinga-service-template.xml
+++ b/res/xml/icinga-service-template.xml
@@ -192,6 +192,67 @@
             </order>
         </field>
         
+        <field name="service_info">
+            <datasource>
+            	<parameter name="field">SERVICE_NAME</parameter>
+            </datasource>
+
+            <display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label"></parameter>
+
+                <parameter name="width">22</parameter>
+
+                <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
+                <parameter name="Ext.grid.Column">
+                	<parameter name="menuDisabled">true</parameter>
+                	<parameter name="fixed">true</parameter>
+                </parameter>
+
+                <parameter name="jsFunc">
+                	<parameter>
+	                	<parameter name="namespace">AppKit.Ext.grid.ColumnRenderer</parameter>
+	                	<parameter name="function">columnImage</parameter>
+	                	
+	                	<!-- renderer/gridevent[cellclick|celldblclick|...] -->
+	                	<parameter name="type">renderer</parameter>
+	                	
+	                	<parameter name="arguments">
+							<parameter name="image">fam.information</parameter>
+							<parameter name="css">x-icinga-grid-link</parameter>
+							<parameter name="attr">
+								<parameter name="qtip">Click here for information</parameter>
+							</parameter>
+	                	</parameter>
+	                </parameter>
+
+					<parameter>
+	                	<parameter name="namespace">AppKit.Ext.grid.IcingaColumnRenderer</parameter>
+	                	<parameter name="function">ajaxClick</parameter>
+
+	                	<!-- renderer/gridevent[cellclick|celldblclick|...] -->
+	                	<parameter name="type">celldblclick</parameter>
+
+	                	<parameter name="arguments">
+	                		<parameter name="src_id">serviceinfo</parameter>
+	                		<parameter name="filter">
+	                			<parameter name="host">host_name</parameter>
+	                			<parameter name="service">service_name</parameter>
+	                		</parameter>
+	                	</parameter>
+	                </parameter>
+                </parameter>
+            </display>
+
+            <filter>
+                <parameter name="enabled">false</parameter>
+            </filter>
+
+            <order>
+                <parameter name="enabled">false</parameter>
+            </order>
+        </field>
+
         <field name="service_history_link">
             <datasource>
             	<parameter name="field">SERVICE_NAME</parameter>





More information about the icinga-checkins mailing list