Skip to content

Commit

Permalink
rpadmin: Added MetricsUUID
Browse files Browse the repository at this point in the history
Added method to GET /v1/clsuter/metrics_uuid which is a new endpoint
added that will be fetched by the debug bundle.

Signed-off-by: Michael Boquard <[email protected]>
  • Loading branch information
michael-redpanda committed Jan 24, 2025
1 parent 12ac78a commit 17459ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rpadmin/api_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ type ClusterUUID struct {
UUID string `json:"cluster_uuid"`
}

// MetricsUUID holds the UUID reported by the Metrics telemetry system.
type MetricsUUID struct {
UUID string `json:"uuid"`
}

// ClusterView represents a cluster view as seen by one node. There are
// many keys returned, so the raw response is just unmarshalled into an
// interface.
Expand Down Expand Up @@ -117,3 +122,10 @@ func (a *AdminAPI) ClusterUUID(ctx context.Context) (ClusterUUID, error) {
var response ClusterUUID
return response, a.sendToLeader(ctx, http.MethodGet, "/v1/cluster/uuid", nil, &response)
}

// MetricsUUID returns the UUID reported by the metrics telemetry system.
// This may also be the cluster ID unless that is specified by the user.
func (a *AdminAPI) MetricsUUID(ctx context.Context) (MetricsUUID, error) {
var response MetricsUUID
return response, a.sendToLeader(ctx, http.MethodGet, "/v1/cluster/metrics_uuid", nil, &response)
}

0 comments on commit 17459ca

Please sign in to comment.