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 == "" {
|
||||
namespace = "all"
|
||||
}
|
||||
|
||||
if class == "" {
|
||||
class = "all"
|
||||
}
|
||||
|
||||
if strings.Compare(system, namespace) == 1 {
|
||||
namespace = ""
|
||||
}
|
||||
|
@ -65,7 +67,7 @@ func NewNginxStatus(namespace, class string, ngxHealthPort int, ngxVtsPath strin
|
|||
ngxVtsPath: ngxVtsPath,
|
||||
}
|
||||
|
||||
ns := buildNS(system, namespace, class)
|
||||
ns := buildNS(namespace, class)
|
||||
|
||||
p.data = &nginxStatusData{
|
||||
active: prometheus.NewDesc(
|
||||
|
|
|
@ -62,7 +62,7 @@ func NewNGINXVTSCollector(namespace, class string, ngxHealthPort int, ngxVtsPath
|
|||
ngxVtsPath: ngxVtsPath,
|
||||
}
|
||||
|
||||
ns := buildNS(system, namespace, class)
|
||||
ns := buildNS(namespace, class)
|
||||
|
||||
p.data = &vtsData{
|
||||
bytes: prometheus.NewDesc(
|
||||
|
|
Loading…
Reference in a new issue