remove const system form buildDS
This commit is contained in:
parent
18d03d99d3
commit
32ffa87221
2 changed files with 5 additions and 3 deletions
|
@ -43,13 +43,15 @@ type (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func buildNS(system, namespace, class string) string {
|
func buildNS(namespace, class string) string {
|
||||||
if namespace == "" {
|
if namespace == "" {
|
||||||
namespace = "all"
|
namespace = "all"
|
||||||
}
|
}
|
||||||
|
|
||||||
if class == "" {
|
if class == "" {
|
||||||
class = "all"
|
class = "all"
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Compare(system, namespace) == 1 {
|
if strings.Compare(system, namespace) == 1 {
|
||||||
namespace = ""
|
namespace = ""
|
||||||
}
|
}
|
||||||
|
@ -65,7 +67,7 @@ func NewNginxStatus(namespace, class string, ngxHealthPort int, ngxVtsPath strin
|
||||||
ngxVtsPath: ngxVtsPath,
|
ngxVtsPath: ngxVtsPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
ns := buildNS(system, namespace, class)
|
ns := buildNS(namespace, class)
|
||||||
|
|
||||||
p.data = &nginxStatusData{
|
p.data = &nginxStatusData{
|
||||||
active: prometheus.NewDesc(
|
active: prometheus.NewDesc(
|
||||||
|
|
|
@ -62,7 +62,7 @@ func NewNGINXVTSCollector(namespace, class string, ngxHealthPort int, ngxVtsPath
|
||||||
ngxVtsPath: ngxVtsPath,
|
ngxVtsPath: ngxVtsPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
ns := buildNS(system, namespace, class)
|
ns := buildNS(namespace, class)
|
||||||
|
|
||||||
p.data = &vtsData{
|
p.data = &vtsData{
|
||||||
bytes: prometheus.NewDesc(
|
bytes: prometheus.NewDesc(
|
||||||
|
|
Loading…
Reference in a new issue