We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cc5029 commit dfb8f5aCopy full SHA for dfb8f5a
pkg/daemon/exporter_metric.go
@@ -58,7 +58,7 @@ func (c *Controller) setCheckSumErrMetric() {
58
}
59
60
func (c *Controller) setDNSSearchMetric() {
61
- file, err := resolvconf.Get()
+ file, err := resolvconf.GetSpecific("/etc/resolv.conf")
62
if err != nil {
63
klog.Errorf("failed to get /etc/resolv.conf content: %v", err)
64
return
@@ -67,7 +67,8 @@ func (c *Controller) setDNSSearchMetric() {
67
68
found := false
69
for _, domain := range domains {
70
- if strings.Contains(domain, "local") {
+ if domain == "." {
71
+ // Ignore the root domain
72
continue
73
74
0 commit comments