From 1e01b572c7a4675ac5a8d3d23b26c2a3f8f6bac1 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Fri, 26 Apr 2024 12:09:05 +0200 Subject: [PATCH] Config updates --- content/install/helm/_index.md | 104 ++++++++++++++---- content/install/helm/helm-chart-parameters.md | 73 ++++++------ 2 files changed, 119 insertions(+), 58 deletions(-) diff --git a/content/install/helm/_index.md b/content/install/helm/_index.md index 604e0a2b..94fca7bd 100644 --- a/content/install/helm/_index.md +++ b/content/install/helm/_index.md @@ -23,18 +23,9 @@ The chart provides parameters that make it easy to deploy {{% param "product.abb These two use cases are independent from each other and can be configured separately. For other use cases, for example, to use other sources and destinations, you can use the `config.raw` parameter of the collector or the server. For the list of configurable parameters and their default values, see {{% xref "/install/helm/helm-chart-parameters.md" %}}. - - ## Install - -To install the `axosyslog` charts, complete the following steps. +To install the `axosyslog` chart, complete the following steps. 1. Clone the chart repository. @@ -43,39 +34,108 @@ To install the `axosyslog` charts, complete the following steps. helm repo update ``` -1. Install the chart. The following command installs `axosyslog` as a [syslog collector](#usecases) into the `default` namespace. +1. Install the chart. The default settings install two pods into the `default` namespace: - For the list of configurable parameters and their default values, see {{% xref "/install/helm/helm-chart-parameters.md" %}}. If you want to use disk-buffers, see also [How to use disk-buffers in containers and Kubernetes]({{< relref "#disk-buffer-container-kubernetes" >}}). + - A `collector` that act as a [syslog collector](#usecases), and + - a `syslog` server. - ```bash - helm install --generate-name axosyslog/axosyslog - ``` + If need only one of these pods, you can disable it with the `collector.enabled` or the `syslog.enabled` parameter, respectively. For the list of configurable parameters and their default values, see {{% xref "/install/helm/helm-chart-parameters.md" %}}. If you want to use disk-buffers, see also [How to use disk-buffers in containers and Kubernetes]({{< relref "#disk-buffer-container-kubernetes" >}}). + + - Install with the default values: + + ```bash + helm install --generate-name axosyslog/axosyslog + ``` + + - Install only the collector: + + ```bash + helm install --generate-name axosyslog/axosyslog --set syslog.enabled=false + ``` + + - Install only the syslog server: + + ```bash + helm install --generate-name axosyslog/axosyslog --set collector.enabled=false + ``` + + The output should be similar to: ```bash - NAME: axosyslog-1683469360 - LAST DEPLOYED: Sun May 7 16:22:40 2023 + NAME: axosyslog-1713953907 + LAST DEPLOYED: Wed Apr 24 12:18:28 2024 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: - 1. Watch the axosyslog-1683469360 container start. - $ kubectl get pods --namespace=default -l app=axosyslog-1683469360 -w + 1. Watch the axosyslog-1713953907 container start. + $ kubectl get pods --namespace=default -l app=axosyslog-1713953907 -w ``` -1. Check that the pod is running. +1. Check that the pods are running. ```bash kubectl get pods ``` - The output should look like: + The output should list the pods that are running: two for the default settings, or one if you have disabled the collector or the syslog pod. ```bash NAME READY STATUS RESTARTS AGE - axosyslog-1683469360-tptfb 1/1 Running 0 28s + axosyslog-1713953907-collector-ddftq 1/1 Running 0 57s + axosyslog-1713953907-syslog-0 1/1 Running 0 57s ``` +1. Configure the settings of the pods for your use case. + + 1. Create a file called `my-values.yaml`. + 1. Add the configuration needed for your use case. The settings in this file will override the default configuration settings of the chart. + 1. Update your deployment using the `my-values.yaml` file by running: + + ```shell + helm upgrade axosyslog/axosyslog -f my-values.yaml + ``` + + The output should be similar to: + + ```shell + Release "axosyslog-1713953907" has been upgraded. Happy Helming! + ... + ``` + + > Tip: You can retrieve the non-default values of a deployment by running `helm get values ` + +1. For the collector, configure the destination where the logs are forwarded. For example, the following values file sends the logs in JSON format to the `localhost:514` address via TCP: + + ```yaml + collector: + config: + destinations: + syslog: + enabled: true + transport: tcp + address: localhost + port: 514 + template: "$(format-json .*)" + ``` + + For details and other parameters, see {{% xref "/install/helm/helm-chart-parameters.md#collector" %}}. + + + + {{< include-headless "disk-buffer-in-container.md" >}} ## Uninstall diff --git a/content/install/helm/helm-chart-parameters.md b/content/install/helm/helm-chart-parameters.md index c1348d85..208c348f 100644 --- a/content/install/helm/helm-chart-parameters.md +++ b/content/install/helm/helm-chart-parameters.md @@ -26,25 +26,26 @@ When you deploy {{% param "product.abbrev" %}} as a collector (which is a Daemon The following example uses the `collector.config.raw` parameter to configure a custom destination: ```shell -config: - raw: | - @version: {{% param "product.techversion" %}} - @include "scl.conf" - - log { - source { - syslog(port(12345)); - }; - - destination { - logscale( - token("your-secret-humio-ingest-token") - ); +collector: + config: + raw: | + @version: {{% param "product.techversion" %}} + @include "scl.conf" + + log { + source { + syslog(port(12345)); + }; + + destination { + logscale( + token("your-secret-humio-ingest-token") + ); + }; + + flags(flow-control); }; - flags(flow-control); - }; - daemonset: hostNetworking: true ``` @@ -65,10 +66,12 @@ Send logs over the network, conforming to RFC3164 using the [`network()`]({{< re For example: ```yaml -config: - destinations: - network: - - transport: tcp +collector: + config: + destinations: + syslog: + enabled: true + transport: tcp address: localhost port: 12345 template: "$(format-json .*)" @@ -96,18 +99,19 @@ Send logs to OpenSearch over HTTP or HTTPS. For example: ```yaml -config: - destinations: - opensearch: - - address: 10.104.232.94 - index: "test-axoflow-index" - tls: - CAFile: "/path/to/CAFile.pem" - CADir: "/path/to/CADir/" - Cert: "/path/to/Cert.pem" - Key: "/path/to/Key.pem" - peerVerify: true - template: "$(format-json .*)" +collector: + config: + destinations: + opensearch: + - address: 10.104.232.94 + index: "test-axoflow-index" + tls: + CAFile: "/path/to/CAFile.pem" + CADir: "/path/to/CADir/" + Cert: "/path/to/Cert.pem" + Key: "/path/to/Key.pem" + peerVerify: true + template: "$(format-json .*)" ``` ### syslogNgOtlp destination {#collector-syslogngotlp-destination} @@ -241,7 +245,6 @@ Send logs to OpenSearch over HTTP or HTTPS. For example: ```yaml -... syslog: enabled: true bufferStorage: @@ -285,7 +288,6 @@ Send logs over the network, conforming to RFC3164 using the [`network()`]({{< re For example: ```yaml -... syslog: enabled: true bufferStorage: @@ -322,7 +324,6 @@ Send data using the [`syslog-ng-otlp()`]({{< relref "/chapter-destinations/desti For example: ```yaml -... syslog: enabled: true bufferStorage: