mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/promscrape/discovery/openstack: use port 80 for the discovered target by default if it isnt specified in the config
This commit is contained in:
parent
27b3209816
commit
e6616c74a2
@ -69,6 +69,10 @@ func getAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) {
|
||||
}
|
||||
|
||||
func newAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) {
|
||||
port := sdc.Port
|
||||
if port == 0 {
|
||||
port = 80
|
||||
}
|
||||
cfg := &apiConfig{
|
||||
client: &http.Client{
|
||||
Transport: &http.Transport{
|
||||
@ -78,7 +82,7 @@ func newAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) {
|
||||
availability: sdc.Availability,
|
||||
region: sdc.Region,
|
||||
allTenants: sdc.AllTenants,
|
||||
port: sdc.Port,
|
||||
port: port,
|
||||
}
|
||||
if sdc.TLSConfig != nil {
|
||||
opts := &promauth.Options{
|
||||
|
Loading…
Reference in New Issue
Block a user