x unknown field token
, expected one of strategy
, username
, password
, source
#23636
Answered
by
pront
chrisdeeming
asked this question in
Q&A
-
QuestionAccording to the documentation, I should be able to setup auth via a shared secret using the Vector Configsources:
http_logs:
type: http_server
address: 0.0.0.0:9000
auth:
strategy: bearer
token: "itsasecret"
transforms:
add_hostname:
type: remap
inputs: [http_logs]
source: |
.hostname = .headers."x-server-name"[0] ?? "unknown"
.program = "nginx"
sinks:
to_files:
type: file
inputs: [add_hostname]
encoding:
codec: text
path: "/var/log/remote/{{hostname}}/nginx.log"
compression: gzip
idle_timeout_secs: 3600 Vector Logs
|
Beta Was this translation helpful? Give feedback.
Answered by
pront
Aug 22, 2025
Replies: 1 comment
-
Hi @chrisdeeming, this component doesn't support Here is a working example: sources:
http_logs:
type: http_server
address: 0.0.0.0:9000
auth:
strategy: "custom"
source: |-
.headers.authorization == "test"
transforms:
add_hostname:
type: remap
inputs: [http_logs]
source: |
.hostname = .headers."x-server-name"[0]
.program = "nginx"
# same as above Or auth:
strategy: basic
username: foo
password: xxx |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pront
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @chrisdeeming, this component doesn't support
bearer
strategy.Here is a working example:
Or