Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4e64c92
init
pkoutsovasilis Aug 13, 2025
9cfaf7c
added all env vriabels
idanl21 Aug 13, 2025
1ba1854
added es_pass and username as an option and added autoops to values.s…
idanl21 Aug 14, 2025
f121792
Update deploy/helm/elastic-agent/values.schema.json
idanl21 Aug 14, 2025
169bc02
fix scheme
idanl21 Aug 14, 2025
60c6b6d
run mage helm:updateAgentVersion helm:renderExamples
idanl21 Aug 14, 2025
09e6625
adde to CODEOWNERS
idanl21 Aug 17, 2025
f47a85e
add contidions to shecma
idanl21 Sep 1, 2025
8da4c78
change schema
idanl21 Sep 10, 2025
65a6fc7
fix schema
idanl21 Sep 11, 2025
23296ff
add exmaples to values file
idanl21 Sep 11, 2025
cac6497
add exmaples to values file
idanl21 Sep 11, 2025
8e9b328
added example
idanl21 Sep 11, 2025
cfe46a9
run mage runderExamples
idanl21 Sep 11, 2025
b4f2afd
run mage runderExamples
idanl21 Sep 11, 2025
bce7187
run mage runderExamples
idanl21 Sep 11, 2025
d4986c8
run mage runderExamples
idanl21 Sep 11, 2025
bf07100
fix values naming
idanl21 Sep 11, 2025
d1d471e
Merge branch 'main' into add-autoops-chart
idanl21 Sep 14, 2025
1893412
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 Sep 16, 2025
3a9adfd
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 Sep 16, 2025
40fc0a7
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/sec…
idanl21 Sep 16, 2025
be2da12
Merge branch 'main' into add-autoops-chart
idanl21 Oct 29, 2025
1ea7f03
fix: update manifest.yaml of autoops-agent
pkoutsovasilis Oct 29, 2025
e2ebe1f
Clear default values for autoops
swiatekm Nov 6, 2025
4ada197
added changelog
idanl21 Nov 11, 2025
5f26fc6
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 Nov 12, 2025
2471075
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 Nov 12, 2025
81a67ca
Delete docs/release-notes/_snippets/0.1.0.asciidoc
idanl21 Nov 12, 2025
71b381c
Delete changelog/0.1.0.yaml
idanl21 Nov 16, 2025
4ac81eb
remove unnecessary docs
idanl21 Nov 16, 2025
c595ecd
Merge branch 'main' into add-autoops-chart
ebeahan Nov 19, 2025
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
/internal/pkg/otel/samples/darwin/autoops_es.yml @elastic/opex
/internal/pkg/otel/samples/linux/autoops_es.yml @elastic/opex
/internal/pkg/otel/samples/windows/autoops_es.yml @elastic/opex
/deploy/helm/elastic-agent/templates/integrations/_auto_ops @elastic.opex
3 changes: 2 additions & 1 deletion deploy/helm/elastic-agent/templates/agent/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Initialise input templates if we are not deploying as managed
as they change the k8s configuration of presets e.g. necessary volume mounts, etc. */}}
{{- include "elasticagent.kubernetes.init" $ -}}
{{- include "elasticagent.system.init" $ -}}
{{- include "elasticagent.autoops.init" $ -}}
{{/* initialise inputs the custom integrations only if fleet is disabled */}}
{{- if eq $.Values.agent.fleet.enabled false -}}
{{- range $customInputName, $customInputVal := $.Values.extraIntegrations -}}
Expand Down Expand Up @@ -351,7 +352,7 @@ app.kubernetes.io/version: {{ .Values.agent.version}}
{{- $presetVal := index . 1 -}}
{{- $otelConfigVal := index . 2 -}}
{{- $presetOtelConfig := dig "otelConfig" (dict) $presetVal -}}
{{- $presetOtelConfig = uniq (deepCopy $presetOtelConfig | merge $otelConfigVal) -}}
{{- $presetOtelConfig = (deepCopy $presetOtelConfig | merge $otelConfigVal) -}}
{{- $_ := set $presetVal "otelConfig" $presetOtelConfig -}}
{{- end -}}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{{- define "elasticagent.autoops.init" -}}
Comment thread
idanl21 marked this conversation as resolved.
{{- if eq $.Values.autoOps.enabled true -}}
{{- $presetVal := $.Values.agent.presets.autoOps -}}
{{- $autoOpsConfig := ((include "elasticagent.autoops.config" $) | fromYaml) -}}
{{- include "elasticagent.preset.mutate.otelConfig" (list $ $presetVal $autoOpsConfig) -}}
{{- $autoOpsEnvVars := ((include "elasticagent.autoops.envVars" $) | fromYaml) -}}
{{- include "elasticagent.preset.mutate.envs" (list $presetVal $autoOpsEnvVars)}}
{{- end -}}
{{- end -}}

{{- define "elasticagent.autoops.config" -}}
receivers:
metricbeatreceiver:
metricbeat:
modules:
# Metrics
- module: autoops_es
hosts: ${env:AUTOOPS_ES_URL}
period: 10s
metricsets:
- cat_shards
- cluster_health
- cluster_settings
- license
- node_stats
- tasks_management
# Templates
- module: autoops_es
hosts: ${env:AUTOOPS_ES_URL}
period: 24h
metricsets:
- cat_template
- component_template
- index_template
processors:
- add_fields:
target: autoops_es
fields:
temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID}
token: ${env:AUTOOPS_TOKEN}
output:
otelconsumer:
telemetry_types: ["logs"]

exporters:
otlphttp:
headers:
Authorization: "AutoOpsToken ${env:AUTOOPS_TOKEN}"
endpoint: ${env:AUTOOPS_OTEL_URL}

service:
pipelines:
logs:
receivers: [metricbeatreceiver]
exporters: [otlphttp]
telemetry:
logs:
encoding: json
Comment thread
idanl21 marked this conversation as resolved.
{{- end -}}

{{- define "elasticagent.autoops.envVars" -}}
{{- $presetName := "autoOps" -}}
{{- $agentName := include "elasticagent.preset.fullname" (list $ $presetName) -}}
extraEnvs:
# Always present
- name: AUTOOPS_TOKEN
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: autoops-token

- name: AUTOOPS_TEMP_RESOURCE_ID
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: temp-resource-id

- name: AUTOOPS_OTEL_URL
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: otel-url

- name: AUTOOPS_ES_URL
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: autoops-es-url
Comment thread
idanl21 marked this conversation as resolved.

# Only if API key provided
{{- if $.Values.autoOps.es_api_key }}
- name: ELASTICSEARCH_READ_API_KEY
Comment thread
idanl21 marked this conversation as resolved.
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: es-api-key
{{- end }}

# Only if BOTH username & password provided
{{- if and $.Values.autoOps.es_username $.Values.autoOps.es_password }}
- name: ELASTICSEARCH_READ_USERNAME
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: es-username
- name: ELASTICSEARCH_READ_PASSWORD
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: es-password
{{- end }}

- name: ELASTIC_CLOUD_CONNECTED_MODE_API_KEY
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: cloud-connected-mode-api-key

- name: ELASTIC_CLOUD_CONNECTED_MODE_API_URL
valueFrom:
secretKeyRef:
name: {{ $agentName }}-autoops
key: cloud-connected-mode-api-url
optional: true
Comment thread
idanl21 marked this conversation as resolved.
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if eq $.Values.autoOps.enabled true }}
{{- $presetName := "autoOps" }}
{{- $presetVal := $.Values.agent.presets.autoOps }}
{{- $agentName := include "elasticagent.preset.fullname" (list $ $presetName) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $agentName }}-autoops
namespace: {{ .namespace | default $.Release.Namespace | quote }}
labels:
{{- include "elasticagent.labels" $ | nindent 4 }}
{{- with ($presetVal).labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- with ($presetVal).annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
stringData:
autoops-token: {{ $.Values.autoOps.autoops_token | quote }}
{{- if and $.Values.autoOps.es_username $.Values.autoOps.es_password }}
es-username: {{ $.Values.autoOps.es_username | quote }}
es-password: {{ $.Values.autoOps.es_password | quote }}
{{- end }}
autoops-es-url: {{ $.Values.autoOps.autoops_es_url | quote }}
temp-resource-id: {{ $.Values.autoOps.temp_resource_id | quote }}
otel-url: {{ $.Values.autoOps.otel_url | quote }}
{{- if $.Values.autoOps.es_api_key }}
es-api-key: {{ $.Values.autoOps.es_api_key | quote }}
{{- end }}
cloud-connected-mode-api-key: {{ $.Values.autoOps.cloud_connected_mode_api_key | quote }}
cloud-connected-mode-api-url: {{ $.Values.autoOps.cloud_connected_mode_api_url | quote }}
{{- end }}
45 changes: 45 additions & 0 deletions deploy/helm/elastic-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,51 @@
}
}
},
"autoOps": {
"type": "object",
"description": "Configuration for AutoOps integration.",
"properties": {
"enabled": { "type": "boolean", "description": "Enable AutoOps integration." },

"autoops_token": { "type": "string", "description": "Token to register into AutoOps", "minLength": 1 },
"autoops_otel_url": { "type": "string", "description": "Otel server URL", "minLength": 1 },
"autoops_temp_resource_id": { "type": "string", "description": "Temporary resource ID", "minLength": 1 },

"es_password": { "type": ["string","null"], "description": "Monitored ES cluster password" },
"es_username": { "type": ["string","null"], "description": "Monitored ES cluster username" },
"es_api_key": { "type": ["string","null"], "description": "Monitored ES cluster api key" },

"elastic_cloud_connected_mode_api_key": { "type": ["string","null"], "description": "Cloud connected api key" },
"elastic_cloud_connected_mode_api_url": { "type": ["string","null"], "description": "Cloud connected api url" }
},

"if": { "properties": { "enabled": { "const": true } }, "required": ["enabled"] },
"then": {
"required": ["autoops_token", "autoops_otel_url", "autoops_temp_resource_id"],
"oneOf": [
{
"required": ["es_api_key"],
"properties": {
"es_api_key": { "type": "string", "minLength": 1 }
},
"not": {
"anyOf": [
{ "required": ["es_username"] },
{ "required": ["es_password"] }
]
}
},
{
"required": ["es_username", "es_password"],
"properties": {
"es_username": { "type": "string", "minLength": 1 },
"es_password": { "type": "string", "minLength": 1 }
},
"not": { "required": ["es_api_key"] }
}
]
}
},
"extraIntegrations": {
"type": "object",
"description": "Configuration for extra integrations.",
Expand Down
19 changes: 19 additions & 0 deletions deploy/helm/elastic-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@ kubernetes:
# -- system metric stream vars
# @section -- 2 - Kubernetes integration
vars: {}
autoOps:
enabled: false
autoops_token: null
autoops_es_url: null
es_password: null
es_username: null
temp_resource_id: null
otel_url: null
es_api_key: null
cloud_connected_mode_api_key: null
cloud_connected_mode_api_url: null
Comment thread
pkoutsovasilis marked this conversation as resolved.
Outdated
system:
# -- enable System integration.
# @section -- 4 - System integration
Expand Down Expand Up @@ -530,6 +541,14 @@ agent:
kubernetes:
node: ${NODE_NAME}
scope: node
autoOps:
mode: deployment
serviceAccount:
create: true
clusterRole:
create: false
nodeSelector:
kubernetes.io/os: linux
kube-state-metrics:
enabled: true
fullnameOverride: "kube-state-metrics"
Expand Down
Loading