Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,39 @@ data:
system.network.connections:
enabled: false
# Uncomment to enable process metrics, which can be noisy but valuable.
# processes:
# process:
# metrics:
# process.cpu.utilization:
# enabled: true
# process.cpu.time:
# enabled: false
# mute_process_name_error: true
# mute_process_exe_error: true
# mute_process_io_error: true
# mute_process_user_error: true
processes:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbudziwojskiNR Noticed one of the checks: "Check Generated file" is failing. Do we make changes to "rendered" folder as well manually, or are they auto-generated once the templates code is merged?

process:
metrics:
process.cpu.time:
enabled: true
process.cpu.utilization:
enabled: true
process.memory.usage:
enabled: true
process.memory.virtual:
enabled: true
process.disk.io:
enabled: true
process.disk.operations:
enabled: true
process.threads:
enabled: true
process.open_file_descriptors:
enabled: true
process.paging.faults:
enabled: true
process.context_switches:
enabled: true
process.uptime:
enabled: true
process.handles:
enabled: false
process.signals_pending:
enabled: true
mute_process_name_error: true
mute_process_exe_error: true
mute_process_io_error: true
mute_process_user_error: true

kubeletstats:
collection_interval: 1m
Expand Down Expand Up @@ -400,7 +422,16 @@ data:

metricstransform/hostmetrics:
transforms:
- include: process\.(cpu\.utilization|disk\.io|memory\.(usage|virtual))
- include: process\..*
action: update
match_type: regexp
operations:
- action: update_label
label: low.data.mode
value_actions:
- value: 'false'
new_value: 'true'
- include: processes\..*
action: update
match_type: regexp
operations:
Expand Down Expand Up @@ -733,6 +764,12 @@ data:
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/pagingscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processesscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver"
pipelines: [metrics/nr_prometheus_cadv_kubelet]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
app.kubernetes.io/name: nr-k8s-otel-collector
component: daemonset
annotations:
checksum/config: e5ed2a50cca2ea8d60809343fedea4aa56b79d590445edf7bbf5227dfa6d436c
checksum/config: b6143109537f5330e68ed65d73c5552d792fce18687bc8aab1edbd8a14ed0f58
spec:
serviceAccountName: nr-k8s-otel-collector
initContainers:
Expand Down Expand Up @@ -131,6 +131,8 @@ spec:
readOnly: true
- name: final-daemonset-config
mountPath: /config
- name: nrdot-data-storage
mountPath: /var/lib/nrdot-collector
volumes:
- name: host-fs
hostPath:
Expand All @@ -143,3 +145,7 @@ spec:
- name: daemonset-config
configMap:
name: nr-k8s-otel-collector-daemonset-config
- name: nrdot-data-storage
hostPath:
path: /var/lib/nrdot-collector
type: DirectoryOrCreate
4 changes: 4 additions & 0 deletions charts/nr-k8s-otel-collector/templates/_images.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ Temporary image helper to transition from old image config structure to new stru
{{- if or (.Values.image).repository (.Values.image).tag }}
{{- (.Values.image).repository | default .Values.images.collector.repository }}:{{- (.Values.image).tag | default .Chart.AppVersion }}
{{- else }}
{{- if .Values.nrdot_plus.enabled }}
{{- include "newrelic.common.images.image" ( dict "imageRoot" .Values.nrdot_plus.image "context" .) }}
{{- else }}
{{- include "newrelic.common.images.image" ( dict "imageRoot" .Values.images.collector "context" .) }}
{{- end }}
{{- end }}
{{- end }}

Expand Down
104 changes: 92 additions & 12 deletions charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,39 @@ data:
system.network.connections:
enabled: false
# Uncomment to enable process metrics, which can be noisy but valuable.
# processes:
# process:
# metrics:
# process.cpu.utilization:
# enabled: true
# process.cpu.time:
# enabled: false
# mute_process_name_error: true
# mute_process_exe_error: true
# mute_process_io_error: true
# mute_process_user_error: true
processes:
process:
metrics:
process.cpu.time:
enabled: true
process.cpu.utilization:
enabled: true
process.memory.usage:
enabled: true
process.memory.virtual:
enabled: true
process.disk.io:
enabled: true
process.disk.operations:
enabled: true
process.threads:
enabled: true
process.open_file_descriptors:
enabled: true
process.paging.faults:
enabled: true
process.context_switches:
enabled: true
process.uptime:
enabled: true
process.handles:
enabled: false
process.signals_pending:
enabled: true
mute_process_name_error: true
mute_process_exe_error: true
mute_process_io_error: true
mute_process_user_error: true

kubeletstats:
collection_interval: {{ .Values.receivers.kubeletstats.scrapeInterval }}
Expand Down Expand Up @@ -207,6 +229,45 @@ data:
- node
- namespace

{{- if and .Values.nrdot_plus.enabled .Values.nrdot_plus.atp }}
attributes/atp_identifier:
include:
match_type: regexp
metric_names:
- ".*"
actions:
- key: telemetry.atp.env
value: "atp-customer-zero"
action: insert

adaptivetelemetryprocessor:
storage_path: "/var/lib/nrdot-collector/adaptivetelemetry.db"
retention_minutes: 30
include_process_list:
- "stress-ng"
metric_thresholds:
process.cpu.utilization: 0.0005
process.memory.utilization: 0.0005
system.cpu.utilization: 0.0001
enable_dynamic_thresholds: true
dynamic_smoothing_factor: 0.1
min_thresholds:
process.cpu.utilization: 0.0005
process.memory.utilization: 0.0005
max_thresholds:
process.cpu.utilization: 0.30
process.memory.utilization: 0.30
enable_multi_metric: true
composite_threshold: 0.8
weights:
process.cpu.utilization: 0.5
process.memory.utilization: 0.5
enable_anomaly_detection: true
anomaly_history_size: 15
anomaly_change_threshold: 50.0
anomaly_min_data_points: 3
{{- end }}

transform/ksm:
metric_statements:
- delete_key(resource.attributes, "k8s.node.name")
Expand Down Expand Up @@ -417,7 +478,16 @@ data:

metricstransform/hostmetrics:
transforms:
- include: process\.(cpu\.utilization|disk\.io|memory\.(usage|virtual))
- include: process\..*
action: update
match_type: regexp
operations:
- action: update_label
label: low.data.mode
value_actions:
- value: 'false'
new_value: 'true'
- include: processes\..*
action: update
match_type: regexp
operations:
Expand Down Expand Up @@ -756,6 +826,12 @@ data:
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/pagingscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processesscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper"
pipelines: [metrics/nr]
- context: metric
condition: instrumentation_scope.name == "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver"
pipelines: [metrics/nr_prometheus_cadv_kubelet]
Expand Down Expand Up @@ -805,6 +881,10 @@ data:
- routing/nr_metrics_pipelines
processors:
- memory_limiter
{{- if and .Values.nrdot_plus.enabled .Values.nrdot_plus.atp }}
- attributes/atp_identifier
- adaptivetelemetryprocessor
{{- end }}
- metricstransform/k8s_cluster_info
{{- if include "nrKubernetesOtel.lowDataMode" . }}
- metricstransform/ldm
Expand Down
6 changes: 6 additions & 0 deletions charts/nr-k8s-otel-collector/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ spec:
readOnly: true
- name: final-daemonset-config
mountPath: /config
- name: nrdot-data-storage
mountPath: /var/lib/nrdot-collector
{{- with .Values.daemonset.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -172,6 +174,10 @@ spec:
- name: daemonset-config
configMap:
name: {{ include "nrKubernetesOtel.daemonset.configMap.fullname" . }}
- name: nrdot-data-storage
hostPath:
path: /var/lib/nrdot-collector
type: DirectoryOrCreate
{{- with .Values.daemonset.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
17 changes: 16 additions & 1 deletion charts/nr-k8s-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- NRDOT Plus configuration
nrdot_plus:
# -- Enable NRDOT Plus features. When false (default), uses standard k8s collector.
# When true, enables NRDOT Plus collector with advanced features.
enabled: false
# -- Enable Adaptive Telemetry Processor (ATP) for intelligent process metrics filtering
atp: true
# -- Image for NRDOT Plus collector (only used when nrdot_plus.enabled is true)
image:
registry: "docker.io"
repository: gmanandhar321/nrdot-collector-host
tag: "2.11"
pullPolicy: IfNotPresent

# -- Name of the Kubernetes cluster monitored. Mandatory. Can be configured also with `global.cluster`
cluster: ""
# -- This set this license key to use. Can be configured also with `global.licenseKey`
Expand Down Expand Up @@ -51,7 +65,8 @@ images:
# -- The secrets that are needed to pull images from a custom registry.
pullSecrets: []
# - name: regsecret
# -- Image for the OpenTelemetry Collector.
# -- Image for the OpenTelemetry Collector (standard New Relic k8s collector).
# This is used when nrdot_plus.enabled is false (default).
collector:
registry: ""
repository: newrelic/nrdot-collector-k8s
Expand Down
Loading