Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/31616.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
vault/diagnose: fix false-positive about missing Stackdriver keys when checking telemetry configuration
```
2 changes: 1 addition & 1 deletion command/operator_diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (c *OperatorDiagnoseCommand) offlineDiagnostics(ctx context.Context) error
}

// If any Stackdriver setting is present but we're missing the basic fields...
if coalesce(t.StackdriverNamespace, t.StackdriverLocation, t.StackdriverDebugLogs, t.StackdriverNamespace) != nil {
if coalesce(t.StackdriverNamespace, t.StackdriverLocation, t.StackdriverNamespace) != nil || t.StackdriverDebugLogs {
if t.StackdriverProjectID == "" {
return errors.New("incomplete Stackdriver telemetry configuration, missing stackdriver_project_id")
}
Expand Down
12 changes: 12 additions & 0 deletions command/operator_diagnose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,18 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) {
},
},
},
{
"diagnose_telemetry_ok_dogstatsd",
[]string{
"-config", "./server/test-fixtures/diagnose_ok_dogstatsd_telemetry.hcl",
},
[]*diagnose.Result{
{
Name: "Check Telemetry",
Status: diagnose.OkStatus,
},
},
},
{
"diagnose_telemetry_partial_stackdriver",
[]string{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright IBM Corp. 2016, 2025
# SPDX-License-Identifier: BUSL-1.1

disable_cache = true
disable_mlock = true
ui = true

listener "tcp" {
address = "127.0.0.1:8200"
}

backend "consul" {
advertise_addr = "foo"
token = "foo"
}

telemetry {
dogstatsd_tags = ["tag1:value"]
dogstatsd_addr = "127.0.0.1:8164"
}

cluster_addr = "127.0.0.1:8201"