Skip to content

Commit

Permalink
fix(syslog source, docs): Fix docs for host field for syslog source (
Browse files Browse the repository at this point in the history
…vectordotdev#18453)

* fix(syslog source, docs): Fix docs for `host` field for syslog source

It is incorrectly documented as using `gethostname` on the host receiving the data, but actually
extracts the host from the log message itself.

Closes: vectordotdev#18371

Signed-off-by: Jesse Szwedko <[email protected]>

* Add note about fallback to the peer IP

Signed-off-by: Jesse Szwedko <[email protected]>

* Feedback

Signed-off-by: Jesse Szwedko <[email protected]>

---------

Signed-off-by: Jesse Szwedko <[email protected]>
  • Loading branch information
jszwedko authored Sep 6, 2023
1 parent 4fba377 commit 0ef902d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions website/cue/reference/components/sources/syslog.cue
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,15 @@ components: sources: syslog: {
examples: ["app-name"]
}
}
host: fields._local_host
host: {
description: "Same as `hostname` if that field is set, or the IP address of the peer otherwise."
required: true
type: string: {
examples: ["my.host.com", "127.0.0.1"]
}
}
hostname: {
description: "The hostname extracted from the Syslog line. (`host` is also this value if it exists in the log.)"
description: "The `hostname` field extracted from the Syslog line. If a `hostname` field is found, `host` is also set to this value."
required: true
type: string: {
examples: ["my.host.com"]
Expand Down

0 comments on commit 0ef902d

Please sign in to comment.