Skip to content

Commit e6f281a

Browse files
[helm]: implement system integration as chart built-in (#5855)
* feat: implement system integration as chart built-in * feat: restructure logs streams in system integration to allow passing user-supplied vars * doc: add an example of system integration * feat: add missing rendered file for system integration example
1 parent 460f44e commit e6f281a

File tree

12 files changed

+788
-19
lines changed

12 files changed

+788
-19
lines changed

deploy/helm/elastic-agent/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,24 @@ The chart built-in [kubernetes integration](https://docs.elastic.co/integrations
123123
| kubernetes.system.metrics.enabled | bool | `true` | enable system metric stream (kubelet) [ref](https://www.elastic.co/docs/current/integrations/kubernetes/kubelet#system) |
124124
| kubernetes.system.metrics.vars | object | `{}` | system metric stream vars |
125125

126-
### 3 - User Extra Integrations
126+
### 4 - System integration
127+
| Key | Type | Default | Description |
128+
|-----|------|---------|-------------|
129+
| system.enabled | bool | `false` | enable System integration. |
130+
| system.output | string | `"default"` | name of the output used in System integration. Note that this output needs to be defined in [outputs](#1-outputs) |
131+
| system.namespace | string | `"default"` | output namespace |
132+
| system.authLogs.enabled | bool | `true` | enable auth logs |
133+
| system.authLogs.vars | object | `{}` | override default variables of auth logs stream. Look in the [values.schema.json](values.schema.json) to see the available variables |
134+
| system.syslog.enabled | bool | `true` | enable syslog |
135+
| system.syslog.vars | object | `{}` | override default variables of syslog stream. Look in the [values.schema.json](values.schema.json) to see the available variables |
136+
| system.metrics.enabled | bool | `true` | enable metrics |
137+
138+
### 5 - User Extra Integrations
127139
| Key | Type | Default | Description |
128140
|-----|------|---------|-------------|
129141
| extraIntegrations | object | `{}` | extra [user-defined integrations](https://www.elastic.co/guide/en/fleet/current/elastic-agent-input-configuration.html) to be added to the Elastic Agent An example can be found [here](./examples/nginx-custom-integration/README.md) |
130142

131-
### 3 - Elastic-Agent Configuration
143+
### 6 - Elastic-Agent Configuration
132144
| Key | Type | Default | Description |
133145
|-----|------|---------|-------------|
134146
| agent.version | string | `"9.0.0"` | elastic-agent version |
@@ -138,7 +150,7 @@ The chart built-in [kubernetes integration](https://docs.elastic.co/integrations
138150
| agent.unprivileged | bool | `false` | enable unprivileged mode |
139151
| agent.presets | map[string]{} | `{ "perNode" : {...}, "clusterWide": {...}, "ksmSharded": {...} }` | Map of deployment presets for the Elastic Agent. The key of the map is the name of the preset. See more for the presets required by the built-in Kubernetes integration [here](./values.yaml) |
140152

141-
### 3.1 - Elastic-Agent Managed Configuration
153+
### 6.1 - Elastic-Agent Managed Configuration
142154
| Key | Type | Default | Description |
143155
|-----|------|---------|-------------|
144156
| agent.fleet.enabled | bool | `false` | enable elastic-agent managed |

deploy/helm/elastic-agent/examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Here is a collection of example configurations for the eck-integrations chart.
44

55
- [Kubernetes - defaults](kubernetes-default/README.md)
6+
- [System - custom authlogs path](kubernetes-default/README.md)
67
- [Kubernetes - only container logs](kubernetes-only-logs/README.md)
78
- [Kubernetes - only hints autodiscover](kubernetes-hints-autodiscover/README.md)
89
- [Custom Integration - nginx](nginx-custom-integration/README.md)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Example: System Integration with custom auth log paths
2+
3+
In this example we install the built-in `system` integration and specify custom paths for the auth logs stream (see [agent-system-values.yaml](agent-system-values.yaml)).
4+
5+
## Prerequisites:
6+
1. A k8s secret that contains the connection details to an Elasticsearch cluster such as the URL and the API key ([Kibana - Creating API Keys](https://www.elastic.co/guide/en/kibana/current/api-keys.html)):
7+
```console
8+
kubectl create secret generic es-api-secret \
9+
--from-literal=api_key=... \
10+
--from-literal=url=...
11+
```
12+
13+
2. `system` integration assets installed through Kibana ([Kibana - Install and uninstall Elastic Agent integration assets](https://www.elastic.co/guide/en/fleet/current/install-uninstall-integration-assets.html))
14+
15+
## Run:
16+
```console
17+
helm install elastic-agent ../../ \
18+
-f ./agent-system-values.yaml \
19+
--set outputs.default.type=ESSecretAuthAPI \
20+
--set outputs.default.secretName=es-api-secret
21+
```
22+
23+
## Validate:
24+
25+
1. The Kibana `system`-related dashboards should start showing up the respective info.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
system:
2+
enabled: true
3+
authLogs:
4+
vars:
5+
paths:
6+
- /var/log/custom_auth.log
7+
syslog:
8+
vars:
9+
paths:
10+
- /var/log/custom_syslog.log
11+
12+
agent:
13+
unprivileged: true

0 commit comments

Comments
 (0)