From 70d83e8861c58718391e86d23207b5832d23f26c Mon Sep 17 00:00:00 2001 From: rashmichandrashekar Date: Mon, 2 Mar 2020 10:50:25 -0800 Subject: [PATCH] Updating release notes, mdm bug fix (#333) Updating release notes, mdm bug fix for release --- README.md | 19 +++++++++++++++++++ source/code/plugin/in_kube_events.rb | 4 +--- source/code/plugin/in_kube_nodes.rb | 7 +++++++ source/code/plugin/out_mdm.rb | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c97f8eab6..bcffbf8a5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,25 @@ additional questions or comments. Note : The agent version(s) below has dates (ciprod), which indicate the agent build dates (not release dates) +### 03/02/2020 - +##### Version microsoft/oms:ciprod03022020 Version mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03022020 +##### Code change log +- Collection of GPU metrics as InsightsMetrics +- Enable config map settings to enable collection of 'Normal' kube events +- Fix kubehealth exceptions to handle empty/nil kube api responses +- Get resource limits for health and MDM from kubelet instead of kube api +- Bug fix for windows node image collection where image name contains multiple slashes +- Exclude ARO master node for data collection +- Telemetry for kube events flushed +- Changes to support msi for mdm if service principal doesnt exist +- Changes for AKS telemetry to ping ods endpoint first and then network check +- KubeEvents bug fix for KubeEvent type + +##### Customer Impact +- Providing capability for customers to collect 'Normal' kube events using config map +- Metrics for GPU are collected and ingested to customers workspace if they have GPU enabled nodes +- Bug fix for windows container image collection allows customers to get the right data in the ContainerInventory table for windows containers. + ### 01/07/2020 - ##### Version microsoft/oms:ciprod01072020 Version mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod01072020 ##### Code change log diff --git a/source/code/plugin/in_kube_events.rb b/source/code/plugin/in_kube_events.rb index bb0ab6f05..6f59a3fc1 100644 --- a/source/code/plugin/in_kube_events.rb +++ b/source/code/plugin/in_kube_events.rb @@ -103,8 +103,6 @@ def enumerate # Flush AppInsights telemetry once all the processing is done, only if the number of events flushed is greater than 0 if (@eventsCount > 0) - telemetryProperties = {} - telemetryProperties["CollectAllKubeEvents"] = @collectAllKubeEvents ApplicationInsightsUtility.sendMetricTelemetry("EventCount", @eventsCount, {}) end rescue => errorStr @@ -141,7 +139,7 @@ def parse_and_emit_records(events, eventQueryState, newEventQueryState, batchTim record["Name"] = items["involvedObject"]["name"] record["Reason"] = items["reason"] record["Message"] = items["message"] - record["Type"] = items["type"] + record["KubeEventType"] = items["type"] record["TimeGenerated"] = items["metadata"]["creationTimestamp"] record["SourceComponent"] = items["source"]["component"] record["FirstSeen"] = items["firstTimestamp"] diff --git a/source/code/plugin/in_kube_nodes.rb b/source/code/plugin/in_kube_nodes.rb index 4242a8dba..dcd0a0f0f 100644 --- a/source/code/plugin/in_kube_nodes.rb +++ b/source/code/plugin/in_kube_nodes.rb @@ -7,6 +7,7 @@ class Kube_nodeInventory_Input < Input @@ContainerNodeInventoryTag = "oms.containerinsights.ContainerNodeInventory" @@MDMKubeNodeInventoryTag = "mdm.kubenodeinventory" + @@configMapMountPath = "/etc/config/settings/log-data-collection-settings" @@promConfigMountPath = "/etc/config/settings/prometheus-data-collection-settings" @@AzStackCloudFileName = "/etc/kubernetes/host/azurestackcloud.json" @@kubeperfTag = "oms.api.KubePerf" @@ -18,6 +19,7 @@ class Kube_nodeInventory_Input < Input @@rsPromUrlCount = ENV["TELEMETRY_RS_PROM_URLS_LENGTH"] @@rsPromMonitorPods = ENV["TELEMETRY_RS_PROM_MONITOR_PODS"] @@rsPromMonitorPodsNamespaceLength = ENV["TELEMETRY_RS_PROM_MONITOR_PODS_NS_LENGTH"] + @@collectAllKubeEvents = ENV["AZMON_CLUSTER_COLLECT_ALL_KUBE_EVENTS"] def initialize super @@ -210,6 +212,11 @@ def parse_and_emit_records(nodeInventory, batchTime = Time.utc.iso8601) ApplicationInsightsUtility.sendExceptionTelemetry(errorStr) end + # Telemetry for data collection config for replicaset + if (File.file?(@@configMapMountPath)) + properties["collectAllKubeEvents"] = @@collectAllKubeEvents + end + #telemetry about prometheus metric collections settings for replicaset if (File.file?(@@promConfigMountPath)) properties["rsPromInt"] = @@rsPromInterval diff --git a/source/code/plugin/out_mdm.rb b/source/code/plugin/out_mdm.rb index 243251bca..135da982e 100644 --- a/source/code/plugin/out_mdm.rb +++ b/source/code/plugin/out_mdm.rb @@ -204,6 +204,7 @@ def write(chunk) count = post_body.size while count > 0 current_batch = post_body.first(@@record_batch_size) + post_body = post_body.drop(current_batch.size) count -= current_batch.size send_to_mdm current_batch end