mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch/Prometheus: Set correct service namespace for SigV4 (#39439)
Makes sure to set the SigV4 service namespace for Elasticsearch and Prometheus. Fixes #38440
This commit is contained in:
parent
bbf64722e4
commit
45a844e77e
@ -84,6 +84,11 @@ func newInstanceSettings() datasource.InstanceFactoryFunc {
|
||||
return nil, fmt.Errorf("error getting http options: %w", err)
|
||||
}
|
||||
|
||||
// Set SigV4 service namespace
|
||||
if httpCliOpts.SigV4 != nil {
|
||||
httpCliOpts.SigV4.Service = "es"
|
||||
}
|
||||
|
||||
version, err := coerceVersion(jsonData["esVersion"])
|
||||
|
||||
if err != nil {
|
||||
|
@ -94,6 +94,11 @@ func newInstanceSettings() datasource.InstanceFactoryFunc {
|
||||
return nil, fmt.Errorf("error getting http options: %w", err)
|
||||
}
|
||||
|
||||
// Set SigV4 service namespace
|
||||
if httpCliOpts.SigV4 != nil {
|
||||
httpCliOpts.SigV4.Service = "aps"
|
||||
}
|
||||
|
||||
httpMethod, ok := jsonData["httpMethod"].(string)
|
||||
if !ok {
|
||||
httpMethod = defaultHttpMethod
|
||||
|
Loading…
Reference in New Issue
Block a user