fix(inputs.prometheus): correctly default to 9102 port (#12282)

This commit is contained in:
Maxim Ivanov 2022-11-28 15:19:44 +00:00 committed by GitHub
parent ede6cfb920
commit 9d5c879cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@ func getScrapeURL(pod *corev1.Pod, p *Prometheus) (*url.URL, error) {
scheme = "http"
}
if port == "" {
if port == "" || port == "0" {
port = "9102"
}