[icinga-checkins] icinga.org: icinga-api/master: * added missing fields for livestatus-host queries

git at icinga.org git at icinga.org
Wed Jan 13 09:05:23 CET 2010


Module: icinga-api
Branch: master
Commit: b9aad5d99325edc00fa556f00f0015ab03f5e30e
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=b9aad5d99325edc00fa556f00f0015ab03f5e30e

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Wed Dec 30 15:39:02 2009 +0100

* added missing fields for livestatus-host queries

---

 objects/IcingaApiConstantsInterface.php            |    1 +
 .../IcingaApiSearchLivestatusSocket.php            |  109 +++++++++++++++++++-
 2 files changed, 109 insertions(+), 1 deletions(-)

diff --git a/objects/IcingaApiConstantsInterface.php b/objects/IcingaApiConstantsInterface.php
index de30fa9..b4e33a0 100644
--- a/objects/IcingaApiConstantsInterface.php
+++ b/objects/IcingaApiConstantsInterface.php
@@ -29,6 +29,7 @@ interface IcingaApiConstantsInterface {
 	const TARGET_SERVICE = 'service';
 	const TARGET_HOSTGROUP = 'hostgroup';
 	const TARGET_SERVICEGROUP = 'servicegroup';
+	const TARGET_CONTACT = 'contact';
 	const TARGET_CONTACTGROUP = 'contactgroup';
 	const TARGET_TIMEPERIOD = 'timeperiod';
 	const TARGET_HOSTSTATUS = 'hoststatus';
diff --git a/objects/search/data_interfaces/IcingaApiSearchLivestatusSocket.php b/objects/search/data_interfaces/IcingaApiSearchLivestatusSocket.php
index abf6738..288752c 100644
--- a/objects/search/data_interfaces/IcingaApiSearchLivestatusSocket.php
+++ b/objects/search/data_interfaces/IcingaApiSearchLivestatusSocket.php
@@ -19,6 +19,7 @@ class IcingaApiSearchLivestatusSocket
 		self::TARGET_SERVICE => 'services',
 		self::TARGET_HOSTGROUP => 'hostgroups',
 		self::TARGET_SERVICEGROUP => 'servicegroups',
+		self::TARGET_CONTACT => 'contacts',
 		self::TARGET_CONTACTGROUP => '',
 		self::TARGET_TIMEPERIOD => '',
 		self::TARGET_CUSTOMVARIABLE => '',
@@ -72,10 +73,32 @@ class IcingaApiSearchLivestatusSocket
 		'CONTACTGROUP_INSTANCE_ID' => array('instance_id'),
 		'CONTACTGROUP_NAME' => array('name1'),
 		'CONTACTGROUP_ALIAS' => array('alias'),
+*/
 
 		// Contact data
-		'CONTACT_NAME' => array('name1'),
+		self::TARGET_CONTACT => array (
+			'CONTACT_ADDRESS1' => array('address1'),
+			'CONTACT_ADDRESS2' => array('address2'),
+			'CONTACT_ADDRESS3' => array('address3'),
+			'CONTACT_ADDRESS4' => array('address4'),
+			'CONTACT_ADDRESS5' => array('address5'),
+			'CONTACT_ADDRESS6' => array('address6'),
+			'CONTACT_ALIAS' => array('alias'),
+			'CONTACT_CAN_SUBMIT_COMMANDS' => array('can_submit_commands'),
+			'CONTACT_CUSTOMVARIABLE_NAMES' => array('custom_variable_names'),
+			'CONTACT_CUSTOMVARIABLE_VALUES' => array('custom_variable_values'),
+			'CONTACT_EMAIL' => array('email'),
+			'CONTACT_HOST_NOTIFICATION_PERIOD' => array('host_notification_period'),
+			'CONTACT_HOST_NOTIFICATIONS_ENABLED' => array('host_notifications_enabled'),
+			'CONTACT_IN_HOST_NOTIFICATION_PERIOD' => array('in_host_notification_period'),
+			'CONTACT_IN_SERVICE_NOTIFICATION_PERIOD' => array('in_service_notification_period'),
+			'CONTACT_NAME' => array('name'),
+			'CONTACT_PAGER' => array('pager'),
+			'CONTACT_SERVICE_NOTIFICATION_PERIOD' => array('service_notification_period'),
+			'CONTACT_SERVICE_NOTIFICATIONS_ENABLED' => array('service_notifications_enabled'),
+		),
 
+/*
 		// Timeperiod data
 		'TIMEPERIOD_ID' => array('timeperiod_id'),
 		'TIMEPERIOD_OBJECT_ID' => array('object_id'),
@@ -150,6 +173,90 @@ class IcingaApiSearchLivestatusSocket
 			'HOST_PARENT_NAME' => array('name1'),
 			'HOST_CHILD_NAME' => array('name1'),
 			*/
+
+			// livestatus only
+			'HOST_ACCEPT_PASSIVE_CHECKS' => array('accept_passive_checks'),
+			'HOST_ACKNOWLEDGED' => array('acknowledged'),
+			'HOST_ACKNOWLEDGEMENT_TYPE' => array('acknowledgement_type'),
+			//'HOST_ACTION_URL' => array('action_url'),
+			//'HOST_ACTIVE_CHECKS_ENABLED' => array('active_checks_enabled'),
+			//'HOST_ADDRESS' => array('address'),
+			//'HOST_ALIAS' => array('alias'),
+			'HOST_CHECK_COMMAND' => array('check_command'),
+			'HOST_CHECK_FRESHNESS' => array('check_freshness'),
+			'HOST_CHECK_INTERVAL' => array('check_interval'),
+			'HOST_CHECK_OPTIONS' => array('check_options'),
+			'HOST_CHECK_PERIOD' => array('check_period'),
+			'HOST_CHECK_TYPE' => array('check_type'),
+			'HOST_CHECK_ENABLED' => array('checks_enabled'),
+			'HOST_CHILDS' => array('childs'),
+			'HOST_CONTACTS' => array('contacts'),
+			'HOST_CURRENT_ATTEMPT' => array('current_attempt'),
+			'HOST_CURRENT_NOTIFICATION_NUMBER' => array('current_notification_number'),
+			'HOST_CUSTOM_VARIABLE_NAMES' => array('custom_variable_names'),
+			'HOST_CUSTOM_VARIABLE_VALUES' => array('custom_variable_values'),
+			//'HOST_DISPLAY_NAME' => array('display_name'),
+			'HOST_DOWNTIMES' => array('downtimes'),
+			'HOST_EVENT_HANDLER_ENABLED' => array('event_handler_enabled'),
+			'HOST_EXECUTION_TIME' => array('execution_time'),
+			'HOST_FIRST_NOTIFICATION_DELAY' => array('first_notification_delay'),
+			'HOST_FLAP_DETECTION_ENABLED' => array('flap_detection_enabled'),
+			'HOST_GROUPS' => array('groups'),
+			'HOST_HARD_STATE' => array('hard_state'),
+			'HOST_HAS_BEEN_CHECKED' => array('has_been_checked'),
+			'HOST_HIGH_FLAP_THRESHOLD' => array('high_flap_threshold'),
+			'HOST_ICON_IMAGE' => array('icon_image'),
+			'HOST_ICON_IMAGE_ALT' => array('icon_image_alt'),
+			'HOST_IN_CHECK_PERIOD' => array('in_check_period'),
+			'HOST_IN_NOTIFICATION_PERIOD' => array('in_notification_period'),
+			'HOST_INITIAL_STATE' => array('initial_state'),
+			'HOST_IS_EXECUTING' => array('is_executing'),
+			'HOST_IS_FLAPPING' => array('is_flapping'),
+			'HOST_LAST_CHECK' => array('last_check'),
+			'HOST_LAST_HARD_STATE' => array('last_hard_state'),
+			'HOST_LAST_HARD_STATE_CHANGE' => array('last_hard_state_change'),
+			'HOST_LAST_NOTIFICATION' => array('last_notification'),
+			'HOST_LAST_STATE' => array('last_state'),
+			'HOST_LAST_STATE_CHANGE' => array('last_state_change'),
+			'HOST_LATENCY' => array('latency'),
+			'HOST_LONG_PLUGIN_OUTPUT' => array('long_plugin_output'),
+			'HOST_LOW_FLAP_THRESHOLD' => array('low_flap_threshold'),
+			//'HOST_MAX_CHECK_ATTEMPTS' => array('max_check_attempts'),
+			//'HOST_NAME' => array('name'),
+			//'HOST_NEXT_CHECK' => array('next_check'),
+			'HOST_NEXT_NOTIFICATION' => array('next_notification'),
+			//'HOST_NOTES' => array('notes'),
+			//'HOST_NOTES_URL' => array('notes_url'),
+			'HOST_NOTIFICATION_INTERVAL' => array('notification_interval'),
+			'HOST_NOTIFICATION_PERIOD' => array('notification_period'),
+			'HOST_NOTIFICATION_ENABLED' => array('notifications_enabled'),
+			'HOST_NUM_SERVICES' => array('num_services'),
+			'HOST_NUM_SERVICES_CRIT' => array('num_services_crit'),
+			'HOST_NUM_SERVICES_HARD_CRIT' => array('num_services_hard_crit'),
+			'HOST_NUM_SERVICES_HARD_OK' => array('num_services_hard_ok'),
+			'HOST_NUM_SERVICES_HARD_UNKNOWN' => array('num_services_hard_unknown'),
+			'HOST_NUM_SERVICES_HARD_WARN' => array('num_services_hard_warn'),
+			'HOST_NUM_SERVICES_OK' => array('num_services_ok'),
+			'HOST_NUM_SERVICES_UNKNOWN' => array('num_services_unknown'),
+			'HOST_NUM_SERVICES_WARN' => array('num_services_warn'),
+			'HOST_OBSESS_OVER_HOST' => array('obsess_over_host'),
+			'HOST_PARENTS' => array('parents'),
+			'HOST_PENDING_FLEX_DOWNTIME' => array('pending_flex_downtime'),
+			'HOST_PERCENT_STATE_CHANGE' => array('percent_state_change'),
+			'HOST_PERF_DATA' => array('perf_data'),
+			'HOST_PLUGIN_OUTPUT' => array('plugin_output'),
+			//'HOST_PROCESS_PERFORMANCE_DATA' => array('process_performance_data'),
+			'HOST_RETRY_INTERVAL' => array('retry_interval'),
+			//'HOST_SCHEDULED_DOWNTIME_DEPTH' => array('scheduled_downtime_depth'),
+			//'HOST_STATE' => array('state'),
+			//'HOST_STATE_TYPE' => array('state_type'),
+			'HOST_STATUSMAP_IMAGE' => array('statusmap_image'),
+			'HOST_TOTAL_SERVICES' => array('total_services'),
+			'HOST_WORST_SERVICE_HARD_STATE' => array('worst_service_hard_state'),
+			'HOST_WORST_SERVICE_STATE' => array('worst_service_state'),
+			'HOST_X_3D' => array('x_3d'),
+			'HOST_Y_3D' => array('y_3d'),
+			'HOST_Z_3D' => array('z_3d'),
 		),
 
 		// Service data





More information about the icinga-checkins mailing list