mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00: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
25a9017a72
commit
f9b3409ee3
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue