Skip to content

Commit

Permalink
sync yamls, agent log level to info and remove redundant test http se…
Browse files Browse the repository at this point in the history
…rver (#1256)

* updates

* update trivy ignore

* update the addon-token-adapter image
ganga1980 authored May 20, 2024
1 parent b1ab8ef commit 5ced912
Showing 8 changed files with 79 additions and 52 deletions.
26 changes: 13 additions & 13 deletions build/linux/installer/conf/container.conf
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
port 25225
bind 127.0.0.1
</source>

# MDM metrics from telegraf
<source>
@type tcp
@@ -22,15 +22,15 @@
@type containerinventory
tag oneagent.containerInsights.CONTAINER_INVENTORY_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#cadvisor perf
<source>
@type cadvisor_perf
tag oneagent.containerInsights.LINUX_PERF_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#custom_metrics_mdm filter plugin
@@ -42,13 +42,13 @@

<filter oms.mdm.container.perf.telegraf**>
@type telegraf2mdm
@log_level debug
@log_level info
</filter>

#containerinventory
<match **CONTAINER_INVENTORY_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -66,15 +66,15 @@
retry_max_times 10
retry_wait 5s
retry_max_interval 5m
flush_thread_count 5
flush_thread_count 5
</buffer>
keepalive true
keepalive true
</match>

#cadvisorperf
<match **LINUX_PERF_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -92,14 +92,14 @@
retry_max_times 10
retry_wait 5s
retry_max_interval 5m
flush_thread_count 5
flush_thread_count 5
</buffer>
keepalive true
</match>

<match mdm.cadvisorperf** oms.mdm.container.perf.telegraf**>
@type mdm
@log_level debug
@log_level info
<buffer>
@type file
path /var/opt/microsoft/docker-cimprov/state/out_mdm_cdvisorperf*.buffer
@@ -109,15 +109,15 @@
retry_max_times 10
retry_wait 5s
retry_max_interval 5m
flush_thread_count 5
flush_thread_count 5
</buffer>
retry_mdm_post_wait_minutes 30
</match>

#InsightsMetrics
<match **INSIGHTS_METRICS_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -135,7 +135,7 @@
retry_max_times 10
retry_wait 5s
retry_max_interval 5m
flush_thread_count 5
flush_thread_count 5
</buffer>
keepalive true
</match>
38 changes: 19 additions & 19 deletions build/linux/installer/conf/kube.conf
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
<match **LINUX_PERF_BLOB**>
@type forward
@id out_perf_fwd
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -36,7 +36,7 @@
<match **INSIGHTS_METRICS_BLOB**>
@type forward
@id out_insights_metrics_fwd
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -73,13 +73,13 @@
@type kube_podinventory
tag oneagent.containerInsights.KUBE_POD_INVENTORY_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#kubepodinventory
<match **KUBE_POD_INVENTORY_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -105,7 +105,7 @@
#kubeservices
<match **KUBE_SERVICES_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -134,13 +134,13 @@
@type kube_nodes
tag oneagent.containerInsights.KUBE_NODE_INVENTORY_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#containernodeinventory
<match **CONTAINER_NODE_INVENTORY_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -171,7 +171,7 @@
#kubenodeinventory
<match **KUBE_NODE_INVENTORY_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -197,7 +197,7 @@
<match mdm.kubenodeinventory** >
@type mdm
@id out_mdm_nodeinventory
@log_level debug
@log_level info
<buffer>
@type file
path /var/opt/microsoft/docker-cimprov/state/out_mdm_nodeinventory*.buffer
@@ -219,13 +219,13 @@
@type kube_events
tag oneagent.containerInsights.KUBE_EVENTS_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#kubeevents
<match **KUBE_EVENTS_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -253,13 +253,13 @@
<source>
@type kube_podmdminventory
run_interval 60
@log_level debug
@log_level info
</source>

<match mdm.kubepodinventory**>
@type mdm
@id out_mdm_podinventory
@log_level debug
@log_level info
<buffer>
@type file
path /var/opt/microsoft/docker-cimprov/state/out_mdm_podinventory*.buffer
@@ -282,15 +282,15 @@
@type kube_perfinventory
tag oneagent.containerInsights.LINUX_PERF_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#Kubernetes Persistent Volume inventory
<source>
@type kube_pvinventory
tag oneagent.containerInsights.KUBE_PV_INVENTORY_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#@include windows_rs_perf.conf
@@ -300,21 +300,21 @@
@type kubestate_deployments
tag oneagent.containerInsights.INSIGHTS_METRICS_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#Kubernetes object state - HPA
<source>
@type kubestate_hpa
tag oneagent.containerInsights.INSIGHTS_METRICS_BLOB
run_interval 60
@log_level debug
@log_level info
</source>

#kubepvinventory
<match **KUBE_PV_INVENTORY_BLOB**>
@type forward
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
@@ -340,7 +340,7 @@
<match mdm.cadvisorperf**>
@type mdm
@id out_mdm_perf
@log_level debug
@log_level info
<buffer>
@type file
path /var/opt/microsoft/docker-cimprov/state/out_mdm_cdvisorperf*.buffer
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<match **CONTAINER_INVENTORY_BLOB**>
@type forward
@id out_ci_fwd
@log_level debug
@log_level info
send_timeout 30
connect_timeout 30
heartbeat_type none
2 changes: 1 addition & 1 deletion build/linux/installer/conf/windows_rs_perf.conf
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
@type win_cadvisor_perf
tag oneagent.containerInsights.LINUX_PERF_BLOB
run_interval 60
@log_level debug
@log_level info
</source>
6 changes: 3 additions & 3 deletions build/windows/installer/conf/fluent.conf
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
@type cadvisor_perf
tag oms.api.cadvisorperf
run_interval 60
@log_level debug
@log_level info
</source>

#custom_metrics_mdm filter plugin
@@ -21,7 +21,7 @@

<match mdm.cadvisorperf**>
@type mdm
@log_level debug
@log_level info
<buffer>
@type file
path /etc/amalogswindows/out_mdm_cdvisorperf.buffer
@@ -31,7 +31,7 @@
retry_max_times 10
retry_wait 5s
retry_max_interval 5m
flush_thread_count 5
flush_thread_count 5
</buffer>
retry_mdm_post_wait_minutes 30
</match>
7 changes: 5 additions & 2 deletions charts/azuremonitor-containers/values.yaml
Original file line number Diff line number Diff line change
@@ -182,9 +182,12 @@ amalogs:
cpu: 150m
memory: 750Mi
daemonsetwindows:
limits:
requests:
cpu: 500m
memory: 600Mi
memory: 700Mi
limits:
cpu: 2
memory: 2Gi
deployment:
requests:
cpu: 150m
41 changes: 37 additions & 4 deletions kubernetes/ama-logs.yaml
Original file line number Diff line number Diff line change
@@ -363,8 +363,9 @@ spec:
# - --secret-name=aad-msi-auth-token
# - --token-server-listening-port=8888
# - --health-server-listening-port=9999
# - --restart-pod-waiting-minutes-on-broken-connection=240
# # Make sure this matching with version in AKS RP side
# image: mcr.microsoft.com/aks/msi/addon-token-adapter:master.221118.2
# image: mcr.microsoft.com/aks/msi/addon-token-adapter:master.230804.1
# imagePullPolicy: IfNotPresent
# env:
# - name: AZMON_COLLECT_ENV
@@ -446,6 +447,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: AZMON_RESOURCE_OPTIMIZATION_ENABLED
value: "false"
- name: APPMONITORING_AUTOINSTRUMENTATION_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_PORT
value: "28331"
- name: CUSTOM_METRICS_DISABLED
value: "false"
securityContext:
privileged: true
ports:
@@ -739,8 +750,9 @@ spec:
# - --secret-name=aad-msi-auth-token
# - --token-server-listening-port=8888
# - --health-server-listening-port=9999
# - --restart-pod-waiting-minutes-on-broken-connection=240
# # Make sure this matching with version in AKS RP side
# image: mcr.microsoft.com/aks/msi/addon-token-adapter:master.221118.2
# image: mcr.microsoft.com/aks/msi/addon-token-adapter:master.230804.1
# imagePullPolicy: IfNotPresent
# env:
# - name: AZMON_COLLECT_ENV
@@ -821,6 +833,14 @@ spec:
# Uncomment below lines when the Addon-resizer VPA enabled
# - name: RS_ADDON-RESIZER_VPA_ENABLED
# value: "true"
- name: APPMONITORING_AUTOINSTRUMENTATION_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_PORT
value: "28331"
- name: CUSTOM_METRICS_DISABLED
value: "false"
securityContext:
privileged: true
ports:
@@ -990,7 +1010,7 @@ spec:
# - --secret-name=aad-msi-auth-token
# - --token-server-listening-port=7777
# - --health-server-listening-port=9999
# image: "mcr.microsoft.com/aks/hcp/addon-token-adapter:20230120winbeta"
# image: "mcr.microsoft.com/aks/msi/addon-token-adapter:master.240102.1"
# imagePullPolicy: Always
# livenessProbe:
# httpGet:
@@ -1012,9 +1032,12 @@ spec:
image: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:win-3.1.20"
imagePullPolicy: IfNotPresent
resources:
limits:
requests:
cpu: 500m
memory: 700Mi
limits:
cpu: 2
memory: 2Gi
env:
- name: CONTAINER_MEMORY_LIMIT_IN_BYTES
valueFrom:
@@ -1059,6 +1082,16 @@ spec:
# Uncomment below lines for MSI Auth Mode testing
# - name: USING_AAD_MSI_AUTH
# value: "true"
- name: AZMON_WINDOWS_FLUENT_BIT_DISABLED
value: "true"
- name: APPMONITORING_AUTOINSTRUMENTATION_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_ENABLED
value: "false"
- name: APPMONITORING_OPENTELEMETRYLOGS_PORT
value: "28331"
- name: CUSTOM_METRICS_DISABLED
value: "false"
volumeMounts:
# Uncomment below lines when telegraf upgraded to 1.28.5 or higher
# - name: kube-api-access
9 changes: 0 additions & 9 deletions source/plugins/go/src/oms.go
Original file line number Diff line number Diff line change
@@ -2069,15 +2069,6 @@ func GetControllerNameFromK8sPodName(podName string) (string, string) {

// InitializePlugin reads and populates plugin configuration
func InitializePlugin(pluginConfPath string, agentVersion string) {
go func() {
isTest := os.Getenv("ISTEST")
if strings.Compare(strings.ToLower(strings.TrimSpace(isTest)), "true") == 0 {
e1 := http.ListenAndServe("localhost:6060", nil)
if e1 != nil {
Log("HTTP Listen Error: %s \n", e1.Error())
}
}
}()
StdoutIgnoreNsSet = make(map[string]bool)
StdoutIncludeSystemResourceSet = make(map[string]bool)
StdoutIncludeSystemNamespaceSet = make(map[string]bool)

0 comments on commit 5ced912

Please sign in to comment.