Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix keeplist in ccp, when minimalingestionprofile=false #1024

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Azure Monitor Metrics for AKS clusters

## Release 12-04-2024 (hot-fix for ccp config map issue ) - CCP release only -
## Release 12-05-2024 (hot-fix for ccp config map issue ) - CCP release only -
* CCP image -

* Changelog -
- Fix for CCP Config map processing issue - (https://github.com/Azure/prometheus-collector/pull/1017)
- Fix a bug where by with miminal ingestion profile is false, keep list wasn't effective - (https://github.com/Azure/prometheus-collector/pull/1024)

## Release 10-21-2024
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.11.0-main-10-21-2024-91ec49e3`
Expand Down
2 changes: 1 addition & 1 deletion otelcollector/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.12.0
6.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,34 @@ func populateSettingValuesFromConfigMap(parsedConfig map[string]interface{}) (Re
}

func populateRegexValuesWithMinimalIngestionProfile(regexValues RegexValues) {
if regexValues.MinimalIngestionProfile == "true" {

fmt.Println("populateRegexValuesWithMinimalIngestionProfile::minimalIngestionProfile:", regexValues.MinimalIngestionProfile)

if regexValues.MinimalIngestionProfile == "false" {

controlplaneKubeControllerManagerRegex += regexValues.ControlplaneKubeControllerManager
controlplaneKubeSchedulerRegex += regexValues.ControlplaneKubeScheduler
controlplaneApiserverRegex += regexValues.ControlplaneApiserver
controlplaneClusterAutoscalerRegex += regexValues.ControlplaneClusterAutoscaler
controlplaneEtcdRegex += regexValues.ControlplaneEtcd

// Print the updated regex strings after appending values

fmt.Println("populateRegexValuesWithMinimalIngestionProfile::Regex Strings for CCP tergets: collecting ONLY below metrics for targets")
fmt.Println("ControlplaneKubeControllerManagerRegex:", controlplaneKubeControllerManagerRegex)
fmt.Println("ControlplaneKubeSchedulerRegex:", controlplaneKubeSchedulerRegex)
fmt.Println("ControlplaneApiserverRegex:", controlplaneApiserverRegex)
fmt.Println("ControlplaneClusterAutoscalerRegex:", controlplaneClusterAutoscalerRegex)
fmt.Println("ControlplaneEtcdRegex:", controlplaneEtcdRegex)

} else { //else accounts for "true" and any other values including "nil" (meaning no configmap or no minimal setting in the configmap)

controlplaneKubeControllerManagerRegex += regexValues.ControlplaneKubeControllerManager + "|" + controlplaneKubeControllerManagerMinMac
controlplaneKubeSchedulerRegex += regexValues.ControlplaneKubeScheduler + "|" + controlplaneKubeSchedulerMinMac
controlplaneApiserverRegex += regexValues.ControlplaneApiserver + "|" + controlplaneApiserverMinMac
controlplaneClusterAutoscalerRegex += regexValues.ControlplaneClusterAutoscaler + "|" + controlplaneClusterAutoscalerMinMac
controlplaneEtcdRegex += regexValues.ControlplaneEtcd + "|" + controlplaneEtcdMinMac

// Print the updated regex strings after appending values
// Only log this in debug mode
// fmt.Println("Updated Regex Strings After Appending:")
// fmt.Println("ControlplaneKubeControllerManagerRegex:", controlplaneKubeControllerManagerRegex)
// fmt.Println("ControlplaneKubeSchedulerRegex:", controlplaneKubeSchedulerRegex)
// fmt.Println("ControlplaneApiserverRegex:", controlplaneApiserverRegex)
// fmt.Println("ControlplaneClusterAutoscalerRegex:", controlplaneClusterAutoscalerRegex)
// fmt.Println("ControlplaneEtcdRegex:", controlplaneEtcdRegex)

} else {
fmt.Println("populateRegexValuesWithMinimalIngestionProfile::minimalIngestionProfile:", regexValues.MinimalIngestionProfile)

}
}

Expand Down
Loading