Skip to content

Commit

Permalink
[helm]: implement system integration as chart built-in (#5855)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
pkoutsovasilis authored Oct 30, 2024
1 parent 460f44e commit e6f281a
Show file tree
Hide file tree
Showing 12 changed files with 788 additions and 19 deletions.
18 changes: 15 additions & 3 deletions deploy/helm/elastic-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,24 @@ The chart built-in [kubernetes integration](https://docs.elastic.co/integrations
| kubernetes.system.metrics.enabled | bool | `true` | enable system metric stream (kubelet) [ref](https://www.elastic.co/docs/current/integrations/kubernetes/kubelet#system) |
| kubernetes.system.metrics.vars | object | `{}` | system metric stream vars |

### 3 - User Extra Integrations
### 4 - System integration
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| system.enabled | bool | `false` | enable System integration. |
| system.output | string | `"default"` | name of the output used in System integration. Note that this output needs to be defined in [outputs](#1-outputs) |
| system.namespace | string | `"default"` | output namespace |
| system.authLogs.enabled | bool | `true` | enable auth logs |
| 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 |
| system.syslog.enabled | bool | `true` | enable syslog |
| system.syslog.vars | object | `{}` | override default variables of syslog stream. Look in the [values.schema.json](values.schema.json) to see the available variables |
| system.metrics.enabled | bool | `true` | enable metrics |

### 5 - User Extra Integrations
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| 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) |

### 3 - Elastic-Agent Configuration
### 6 - Elastic-Agent Configuration
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| agent.version | string | `"9.0.0"` | elastic-agent version |
Expand All @@ -138,7 +150,7 @@ The chart built-in [kubernetes integration](https://docs.elastic.co/integrations
| agent.unprivileged | bool | `false` | enable unprivileged mode |
| 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) |

### 3.1 - Elastic-Agent Managed Configuration
### 6.1 - Elastic-Agent Managed Configuration
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| agent.fleet.enabled | bool | `false` | enable elastic-agent managed |
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/elastic-agent/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Here is a collection of example configurations for the eck-integrations chart.

- [Kubernetes - defaults](kubernetes-default/README.md)
- [System - custom authlogs path](kubernetes-default/README.md)
- [Kubernetes - only container logs](kubernetes-only-logs/README.md)
- [Kubernetes - only hints autodiscover](kubernetes-hints-autodiscover/README.md)
- [Custom Integration - nginx](nginx-custom-integration/README.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Example: System Integration with custom auth log paths

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)).

## Prerequisites:
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)):
```console
kubectl create secret generic es-api-secret \
--from-literal=api_key=... \
--from-literal=url=...
```

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))

## Run:
```console
helm install elastic-agent ../../ \
-f ./agent-system-values.yaml \
--set outputs.default.type=ESSecretAuthAPI \
--set outputs.default.secretName=es-api-secret
```

## Validate:

1. The Kibana `system`-related dashboards should start showing up the respective info.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
system:
enabled: true
authLogs:
vars:
paths:
- /var/log/custom_auth.log
syslog:
vars:
paths:
- /var/log/custom_syslog.log

agent:
unprivileged: true
Loading

0 comments on commit e6f281a

Please sign in to comment.