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 <jesse.szwedko@datadoghq.com>

* Add note about fallback to the peer IP

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Feedback

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed Sep 6, 2023
1 parent 1164f55 commit dd460a0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions website/cue/reference/components/sources/syslog.cue
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 dd460a0

Please sign in to comment.