From a5b4c24d0fc5f555afa4b5ce7842dd9401e381a4 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 2 Nov 2020 16:08:07 +0100 Subject: [PATCH] Host: Implement `getMetaData()` --- library/Icingadb/Model/Host.php | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/library/Icingadb/Model/Host.php b/library/Icingadb/Model/Host.php index 8da42413..551ee8f5 100644 --- a/library/Icingadb/Model/Host.php +++ b/library/Icingadb/Model/Host.php @@ -69,6 +69,50 @@ class Host extends Model ]; } + public function getMetaData() + { + return [ + 'environment_id' => t('Host Environment Id'), + 'name_checksum' => t('Host Name Checksum'), + 'properties_checksum' => t('Host Properties Checksum'), + 'name' => t('Host Name'), + 'name_ci' => t('Host Name (CI)'), + 'display_name' => t('Host Display Name'), + 'address' => t('Host Address (IPv4)'), + 'address6' => t('Host Address (IPv6)'), + 'address_bin' => t('Host Address (IPv4, Binary)'), + 'address6_bin' => t('Host Address (IPv6, Binary)'), + 'checkcommand' => t('Host Checkcommand'), + 'checkcommand_id' => t('Host Checkcommand Id'), + 'max_check_attempts' => t('Host Max Check Attempts'), + 'check_timeperiod' => t('Host Check Timeperiod'), + 'check_timeperiod_id' => t('Host Check Timeperiod Id'), + 'check_timeout' => t('Host Check Timeout'), + 'check_interval' => t('Host Check Interval'), + 'check_retry_interval' => t('Host Check Retry Inverval'), + 'active_checks_enabled' => t('Host Active Checks Enabled'), + 'passive_checks_enabled' => t('Host Passive Checks Enabled'), + 'event_handler_enabled' => t('Host Event Handler Enabled'), + 'notifications_enabled' => t('Host Notifications Enabled'), + 'flapping_enabled' => t('Host Flapping Enabled'), + 'flapping_threshold_low' => t('Host Flapping Threshold Low'), + 'flapping_threshold_high' => t('Host Flapping Threshold High'), + 'perfdata_enabled' => t('Host Performance Data Enabled'), + 'eventcommand' => t('Host Eventcommand'), + 'eventcommand_id' => t('Host Eventcommand Id'), + 'is_volatile' => t('Host Is Volatile'), + 'action_url_id' => t('Host Action Url Id'), + 'notes_url_id' => t('Host Notes Url Id'), + 'notes' => t('Host Notes'), + 'icon_image_id' => t('Host Icon Image Id'), + 'icon_image_alt' => t('Host Icon Image Alt'), + 'zone' => t('Host Zone'), + 'zone_id' => t('Host Zone Id'), + 'command_endpoint' => t('Host Command Endpoint'), + 'command_endpoint_id' => t('Host Command Endpoint Id') + ]; + } + public function getSearchColumns() { return ['name_ci'];