|
| 1 | +--- |
| 2 | +weight: 2 |
| 3 | +title: VictoriaLogs Agent |
| 4 | +menu: |
| 5 | + docs: |
| 6 | + parent: helm |
| 7 | + weight: 2 |
| 8 | + identifier: helm-victorialogs-agent |
| 9 | +url: /helm/victoria-logs-agent |
| 10 | +aliases: |
| 11 | + - /helm/victorialogs-agent/index.html |
| 12 | + - /helm/victorialogs-agent/ |
| 13 | +tags: |
| 14 | + - logs |
| 15 | + - kubernetes |
| 16 | +--- |
| 17 | +{{ template "chart.badges" . }} |
| 18 | + |
| 19 | +{{ template "chart.description" . }} |
| 20 | + |
| 21 | +{{ template "chart.prerequisites" . }} |
| 22 | +## Quick start |
| 23 | + |
| 24 | +This Helm chart deploys the log receiver agent as a StatefulSet or Deployment (configurable via values in the chart). |
| 25 | +It receives logs using [supported protocols](https://docs.victoriametrics.com/victorialogs/data-ingestion/) |
| 26 | +(for example: syslog, Elasticsearch, OpenTelemetry) from cluster workloads and forwards them to the configured VictoriaLogs destinations. |
| 27 | +If more than one destination is specified, collected logs are replicated to all configured destinations. |
| 28 | + |
| 29 | +- To quickly install single-node version of VictoriaLogs and `victoria-logs-agent`, see [these docs](https://docs.victoriametrics.com/helm/victoria-logs-single/#quick-start). |
| 30 | +- To start with a VictoriaLogs cluster and `victoria-logs-agent`, see [these docs](https://docs.victoriametrics.com/helm/victoria-logs-cluster/#quick-start). |
| 31 | + |
| 32 | +## Chart configuration |
| 33 | + |
| 34 | +The simplest working configuration includes specifying the `remoteWrite` array and setting CPU and memory resources for the chart. |
| 35 | + |
| 36 | +Example of a minimal working configuration: |
| 37 | + |
| 38 | +```yaml |
| 39 | +remoteWrite: |
| 40 | + - url: http://victoria-logs:9428 |
| 41 | + |
| 42 | +resources: |
| 43 | + limits: |
| 44 | + cpu: 100m |
| 45 | + memory: 128Mi |
| 46 | + requests: |
| 47 | + cpu: 100m |
| 48 | + memory: 128Mi |
| 49 | +``` |
| 50 | + |
| 51 | +If multiple `remoteWrite` entries are defined, logs are replicated to all the specified destinations. |
| 52 | + |
| 53 | +### Basic auth |
| 54 | + |
| 55 | +If you need to use basic auth, define the secrets via environment variables and fill out the `basicAuth` object as shown below: |
| 56 | + |
| 57 | +```yaml |
| 58 | +remoteWrite: |
| 59 | + - url: http://victoria-logs:9428 |
| 60 | + basicAuth: |
| 61 | + passwordEnvKey: 'VL_PASSWORD' |
| 62 | + usernameEnvKey: 'VL_USERNAME' |
| 63 | + |
| 64 | +env: |
| 65 | + - name: VL_PASSWORD |
| 66 | + valueFrom: |
| 67 | + secretKeyRef: |
| 68 | + name: auth-secret |
| 69 | + key: VL_PASSWORD |
| 70 | + - name: VL_USERNAME |
| 71 | + valueFrom: |
| 72 | + secretKeyRef: |
| 73 | + name: auth-secret |
| 74 | + key: VL_USERNAME |
| 75 | +``` |
| 76 | + |
| 77 | +### Multitenancy |
| 78 | + |
| 79 | +To define [tenant](https://docs.victoriametrics.com/victorialogs/#multitenancy), use `projectID` and `accountID` as shown below: |
| 80 | + |
| 81 | +```yaml |
| 82 | +remoteWrite: |
| 83 | + - url: http://localhost:9428 |
| 84 | + projectID: 12 |
| 85 | + accountID: 42 |
| 86 | +``` |
| 87 | + |
| 88 | +### TLS |
| 89 | + |
| 90 | +To enable TLS verification for the remoteWrite target, you can specify the `tls` block inside each remoteWrite entry. |
| 91 | + |
| 92 | +At a minimum, you should provide the `caFile` path so that the agent can verify the server's TLS certificate. |
| 93 | +This is useful when the target endpoint uses a certificate signed by a custom or self-signed Certificate Authority (CA). |
| 94 | + |
| 95 | +```yaml |
| 96 | +remoteWrite: |
| 97 | + - url: https://victoria-logs:9428 |
| 98 | + tls: |
| 99 | + caFile: "/etc/tls/ca.crt" |
| 100 | + |
| 101 | +extraVolumes: |
| 102 | + - name: tls-certs |
| 103 | + secret: |
| 104 | + secretName: tls-secret |
| 105 | + |
| 106 | +extraVolumeMounts: |
| 107 | + - name: tls-certs |
| 108 | + mountPath: /etc/tls |
| 109 | + readOnly: true |
| 110 | +``` |
| 111 | + |
| 112 | +If you want to disable TLS certificate verification (not recommended in production), you can set `insecureSkipVerify` to true. |
| 113 | + |
| 114 | +This will skip verification of the server's certificate and allow connecting to targets with self-signed or invalid certificates. |
| 115 | + |
| 116 | +```yaml |
| 117 | +remoteWrite: |
| 118 | + - url: https://victoria-logs:9428 |
| 119 | + tls: |
| 120 | + insecureSkipVerify: true |
| 121 | +``` |
| 122 | + |
| 123 | +### Ignore fields |
| 124 | + |
| 125 | +VictoriaLogs efficiently compresses repeated values, such as pod and node labels. |
| 126 | +However, if you prefer not to store certain fields, you can ignore them using the `ignoreFields` option. |
| 127 | +For example: |
| 128 | + |
| 129 | +```yaml |
| 130 | +remoteWrite: |
| 131 | + - url: http://victoria-logs:9428 |
| 132 | + ignoreFields: |
| 133 | + - file |
| 134 | + - kubernetes.container_id |
| 135 | + - kubernetes.pod_annotations* |
| 136 | + - kubernetes.node_labels* |
| 137 | + - kubernetes.namespace_labels* |
| 138 | + - kubernetes.pod_labels* |
| 139 | +``` |
| 140 | + |
| 141 | +This allows you to exclude unnecessary or sensitive fields from being ingested. |
| 142 | +If sensitive data has already been ingested, see how to |
| 143 | +[exclude logs from search result](https://docs.victoriametrics.com/victorialogs/security-and-lb/#access-control-inside-a-single-tenant). |
| 144 | + |
| 145 | +### Extra fields |
| 146 | + |
| 147 | +You can add custom fields to your logs by including the `extraFields` section in your configuration. |
| 148 | +For example: |
| 149 | + |
| 150 | +```yaml |
| 151 | +remoteWrite: |
| 152 | + - url: http://victoria-logs:9428/ |
| 153 | + extraFields: |
| 154 | + zone: us-east1-c |
| 155 | + source: victoria-logs-agent |
| 156 | +``` |
| 157 | + |
| 158 | +This feature lets you attach metadata to every log entry, |
| 159 | +making it easier to filter, group, or analyze logs based on these additional attributes. |
| 160 | + |
| 161 | +{{ include "chart.installSection" . }} |
| 162 | + |
| 163 | +{{ include "chart.uninstallSection" . }} |
| 164 | + |
| 165 | +{{ include "chart.helmDocs" . }} |
| 166 | + |
| 167 | +## Parameters |
| 168 | + |
| 169 | +The following tables lists the configurable parameters of the chart and their default values. |
| 170 | + |
| 171 | +Change the values according to the need of the environment in ``victoria-logs-agent/values.yaml`` file. |
| 172 | + |
| 173 | +{{ template "chart.valuesTableHtml" . }} |
0 commit comments