Skip to content

Commit

Permalink
Merge branch 'main' into rashmi/global-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmichandrashekar authored Nov 14, 2024
2 parents cc523e0 + 20ec5bd commit 366db57
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
20 changes: 20 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Azure Monitor Metrics for AKS clusters

## Release 10-21-2024
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.11.0-main-10-21-2024-91ec49e3`
* Windows image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.11.0-main-10-21-2024-91ec49e3-win`
* TA image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.11.0-main-10-21-2024-91ec49e3-targetallocator`
* cfg sidecar image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.11.0-main-10-21-2024-91ec49e3-cfg`
* AKS and Arc Container Images:
* Upgrades for CVE fixes (https://github.com/Azure/prometheus-collector/pull/979)
- Golang: 1.21.5 -> 1.22.7
- OtelCollector/Operator: 0.99.0 -> 0.109.0
- Telegraf: 1.28.5 -> 1.29.4
* Add AcStor scrape config support (https://github.com/Azure/prometheus-collector/pull/976)
* Arc Extension Chart:
- Enable operator (https://github.com/Azure/prometheus-collector/pull/977)
- Upgrade node-exporter chart 4.26.0 -> 4.39.0 (https://github.com/Azure/prometheus-collector/pull/982)
- Arc-A: Add support to override image registry for custom environment (https://github.com/Azure/prometheus-collector/pull/983)
* Pipeline/Docs/Templates Updates
- Pipeline reliability and test fixes (https://github.com/Azure/prometheus-collector/pull/998)
- Terraform private link support (https://github.com/Azure/prometheus-collector/pull/991)
- Doc Prometheus Equivalent metrics for CI Custom metrics (https://github.com/Azure/prometheus-collector/pull/978)

## Release 10-15-2024 (CCP release only)
* Linux image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.10.2-main-10-15-2024-06b20de5`
* Windows image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector/images:6.10.2-main-10-15-2024-06b20de5-win`
Expand Down
2 changes: 1 addition & 1 deletion otelcollector/build/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ COPY ./fluent-bit/fluent-bit-windows.conf $tmpdir/fluent-bit/
COPY ./fluent-bit/fluent-bit-parsers.conf $tmpdir/fluent-bit/
COPY ./fluent-bit/src/out_appinsights.so $tmpdir/fluent-bit/bin/
COPY ./main/main.exe $tmpdir/microsoft
COPY ./react /Users/ContainerAdministrator/Documents/static/react
COPY ./react /static/react
COPY ./LICENSE $tmpdir/microsoft
COPY ./NOTICE $tmpdir/microsoft

Expand Down
1 change: 1 addition & 0 deletions otelcollector/build/windows/scripts/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ New-Item -Type Directory -Path /opt/microsoft/liveness -ErrorAction SilentlyCont
New-Item -Type Directory -Path /opt/genevamonitoringagent -ErrorAction SilentlyContinue
New-Item -Type Directory -Path /opt/genevamonitoringagent/datadirectory -ErrorAction SilentlyContinue
New-Item -Type Directory -Path /etc/genevamonitoringagent
New-Item -Type Directory -Path /static/react -Force -ErrorAction SilentlyContinue
############################################################################################
Write-Host ('Installing Metrics Extension');
try {
Expand Down
30 changes: 3 additions & 27 deletions otelcollector/shared/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,12 @@ func SetupTelemetry(customEnvironment string) {
return
}

// Append export commands to .bashrc file
bashrcPath := os.Getenv("HOME") + "/.bashrc"
bashrcFile, err := os.OpenFile(bashrcPath, os.O_APPEND|os.O_WRONLY, 0644)
// Export APPLICATIONINSIGHTS_ENDPOINT
err = SetEnvAndSourceBashrcOrPowershell("APPLICATIONINSIGHTS_ENDPOINT", aiEndpoint , false)
if err != nil {
fmt.Println("Error opening .bashrc file:", err)
fmt.Println("Error setting APPLICATIONINSIGHTS_ENDPOINT environment variable:", err)
return
}
defer bashrcFile.Close()

exportAIKeyCommand := fmt.Sprintf("export APPLICATIONINSIGHTS_AUTH=%s\n", encodedAIKey)
_, err = bashrcFile.WriteString(exportAIKeyCommand)
if err != nil {
fmt.Println("Error writing to .bashrc file:", err)
return
}

if aiEndpoint != "" {
exportEndpointCommand := fmt.Sprintf("export APPLICATIONINSIGHTS_ENDPOINT=\"%s\"\n", aiEndpoint)
_, err = bashrcFile.WriteString(exportEndpointCommand)
if err != nil {
fmt.Println("Error writing to .bashrc file:", err)
return
}
}

// Setting TELEMETRY_APPLICATIONINSIGHTS_KEY
aiKeyBytes, err := base64.StdEncoding.DecodeString(encodedAIKey)
Expand All @@ -90,10 +72,4 @@ func SetupTelemetry(customEnvironment string) {
return
}

exportTelegrafCommand := fmt.Sprintf("export TELEMETRY_APPLICATIONINSIGHTS_KEY=%s\n", aiKey)
_, err = bashrcFile.WriteString(exportTelegrafCommand)
if err != nil {
fmt.Println("Error writing to .bashrc file:", err)
return
}
}

0 comments on commit 366db57

Please sign in to comment.