diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f5289981d0..19ed22f15989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ v0.37.2 (2023-10-16) - Fix an issue with the static to flow converter for blackbox exporter modules config not being included in the river output. (@erikbaranowski) +- Fix issue with default values in `discovery.nomad`. (@marctc) + ### Enhancements - Update Prometheus dependency to v2.47.2. (@tpaschalis) diff --git a/component/discovery/nomad/nomad.go b/component/discovery/nomad/nomad.go index 4608928e6545..a5868ab13cb3 100644 --- a/component/discovery/nomad/nomad.go +++ b/component/discovery/nomad/nomad.go @@ -27,10 +27,10 @@ func init() { type Arguments struct { AllowStale bool `river:"allow_stale,attr,optional"` HTTPClientConfig config.HTTPClientConfig `river:",squash"` - Namespace string `river:"namespace,attr"` + Namespace string `river:"namespace,attr,optional"` RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` Region string `river:"region,attr,optional"` - Server string `river:"server,attr"` + Server string `river:"server,attr,optional"` TagSeparator string `river:"tag_separator,attr,optional"` } diff --git a/docs/sources/flow/reference/components/discovery.nomad.md b/docs/sources/flow/reference/components/discovery.nomad.md index 6ae878357f7e..4797465ae9fb 100644 --- a/docs/sources/flow/reference/components/discovery.nomad.md +++ b/docs/sources/flow/reference/components/discovery.nomad.md @@ -16,7 +16,6 @@ description: Learn about discovery.nomad ```river discovery.nomad "LABEL" { - server = NOMAD_SERVER } ``` @@ -124,7 +123,6 @@ This example discovers targets from a Nomad server: ```river discovery.nomad "example" { - server = "localhost:8500" } prometheus.scrape "demo" {