From 6879aea5db6375085f1f9cd3f461819d24af5e9b Mon Sep 17 00:00:00 2001 From: Dilip Raghunathan Date: Mon, 9 Sep 2019 13:37:41 -0700 Subject: [PATCH] Cherry-pick hotfix 09092019 to ci_feature --- installer/conf/container-health.conf | 103 ++++++++++++++++++++++++ installer/conf/container.conf | 25 ------ installer/datafiles/base_container.data | 5 ++ 3 files changed, 108 insertions(+), 25 deletions(-) create mode 100644 installer/conf/container-health.conf diff --git a/installer/conf/container-health.conf b/installer/conf/container-health.conf new file mode 100644 index 000000000..4cb9e6913 --- /dev/null +++ b/installer/conf/container-health.conf @@ -0,0 +1,103 @@ +# Fluentd config file for OMS Docker - container components (non kubeAPI) + +# Forward port 25225 for container logs + + type forward + port 25225 + bind 127.0.0.1 + + +# Container inventory + + type containerinventory + tag oms.containerinsights.containerinventory + run_interval 60s + log_level debug + + +#cadvisor perf + + type cadvisorperf + tag oms.api.cadvisorperf + run_interval 60s + log_level debug + + + + type filter_cadvisor_health_node + log_level debug + + + +#custom_metrics_mdm filter plugin + + type filter_cadvisor2mdm + custom_metrics_azure_regions eastus,southcentralus,westcentralus,westus2,southeastasia,northeurope,westeurope,southafricanorth,centralus,northcentralus,eastus2,koreacentral,eastasia,centralindia,uksouth,canadacentral + metrics_to_collect cpuUsageNanoCores,memoryWorkingSetBytes,memoryRssBytes + log_level info + + + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_containerinventory*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + + + + type out_oms + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_oms_cadvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + + + + + @type forward + send_timeout 60s + recover_wait 10s + hard_timeout 60s + heartbeat_type tcp + + + host healthmodel-replicaset-service.kube-system + port 25227 + + + + @type file + path /var/opt/microsoft/docker-cimprov/log/fluent_forward_failed.log + + + + + type out_mdm + log_level debug + num_threads 5 + buffer_chunk_limit 20m + buffer_type file + buffer_path %STATE_DIR_WS%/out_mdm_cdvisorperf*.buffer + buffer_queue_limit 20 + buffer_queue_full_action drop_oldest_chunk + flush_interval 20s + retry_limit 10 + retry_wait 30s + max_retry_wait 9m + retry_mdm_post_wait_minutes 60 + diff --git a/installer/conf/container.conf b/installer/conf/container.conf index 0b26357f0..e68e4ff64 100755 --- a/installer/conf/container.conf +++ b/installer/conf/container.conf @@ -23,12 +23,6 @@ log_level debug - - type filter_cadvisor_health_node - log_level debug - - - #custom_metrics_mdm filter plugin type filter_cadvisor2mdm @@ -67,25 +61,6 @@ max_retry_wait 9m - - - @type forward - send_timeout 60s - recover_wait 10s - hard_timeout 60s - heartbeat_type tcp - - - host "#{ENV['HEALTHMODEL_REPLICASET_SERVICE_ENDPOINT']}" - port 25227 - - - - @type file - path /var/opt/microsoft/docker-cimprov/log/fluent_forward_failed.log - - - type out_mdm log_level debug diff --git a/installer/datafiles/base_container.data b/installer/datafiles/base_container.data index 3dc1a18cd..0ea3bc984 100644 --- a/installer/datafiles/base_container.data +++ b/installer/datafiles/base_container.data @@ -30,6 +30,7 @@ MAINTAINER: 'Microsoft Corporation' /opt/microsoft/omsagent/plugin/KubernetesApiClient.rb; source/code/plugin/KubernetesApiClient.rb; 644; root; root /etc/opt/microsoft/docker-cimprov/container.conf; installer/conf/container.conf; 644; root; root +/etc/opt/microsoft/docker-cimprov/container-health.conf; installer/conf/container-health.conf; 644; root; root /opt/microsoft/omsagent/plugin/CAdvisorMetricsAPIClient.rb; source/code/plugin/CAdvisorMetricsAPIClient.rb; 644; root; root /opt/microsoft/omsagent/plugin/in_kube_perf.rb; source/code/plugin/in_kube_perf.rb; 644; root; root @@ -257,6 +258,9 @@ chown omsagent:omiusers /var/opt/microsoft/docker-cimprov/log/fluent_forward_fai mv /etc/opt/microsoft/docker-cimprov/container.conf /etc/opt/microsoft/omsagent/sysconf/omsagent.d/container.conf chown omsagent:omsagent /etc/opt/microsoft/omsagent/sysconf/omsagent.d/container.conf +mv /etc/opt/microsoft/docker-cimprov/container-health.conf /etc/opt/microsoft/omsagent/sysconf/omsagent.d/container-health.conf +chown omsagent:omsagent /etc/opt/microsoft/omsagent/sysconf/omsagent.d/container-health.conf + %Postuninstall_10 # If we're an upgrade, skip all of this cleanup if ${{PERFORMING_UPGRADE_NOT}}; then @@ -268,6 +272,7 @@ if ${{PERFORMING_UPGRADE_NOT}}; then rm -f /var/opt/microsoft/docker-cimprov/log/kubernetes_client_log.txt rm -f /var/opt/microsoft/docker-cimprov/log/kubernetes_perf_log.txt rm -f /etc/opt/microsoft/omsagent/conf/omsagent.d/container.conf + rm -f /etc/opt/microsoft/omsagent/conf/omsagent.d/container-health.conf rmdir /var/opt/microsoft/docker-cimprov/log 2> /dev/null rmdir /var/opt/microsoft/docker-cimprov/state/ContainerInventory 2> /dev/null rmdir /var/opt/microsoft/docker-cimprov/state/ImageInventory 2> /dev/null