Merge 32ffa87221
into 22c3226377
This commit is contained in:
commit
8f4ffb9256
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,7 @@ package collector
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
@ -46,10 +47,15 @@ func buildNS(namespace, class string) string {
|
|||
if namespace == "" {
|
||||
namespace = "all"
|
||||
}
|
||||
|
||||
if class == "" {
|
||||
class = "all"
|
||||
}
|
||||
|
||||
if strings.Compare(system, namespace) == 1 {
|
||||
namespace = ""
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v_%v", namespace, class)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue