mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-14 17:06:36 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
890fdc2996 | ||
|
|
d1a807840c |
@@ -67,7 +67,7 @@ type Win32_ComputerSystem struct {
|
|||||||
TotalPhysicalMemory uint64
|
TotalPhysicalMemory uint64
|
||||||
DNSHostname string
|
DNSHostname string
|
||||||
Domain string
|
Domain string
|
||||||
Workgroup string
|
Workgroup *string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
func (c *CSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||||
@@ -93,7 +93,7 @@ func (c *CSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, er
|
|||||||
)
|
)
|
||||||
|
|
||||||
var fqdn string
|
var fqdn string
|
||||||
if dst[0].Domain != dst[0].Workgroup {
|
if dst[0].Workgroup == nil || dst[0].Domain != *dst[0].Workgroup {
|
||||||
fqdn = dst[0].DNSHostname + "." + dst[0].Domain
|
fqdn = dst[0].DNSHostname + "." + dst[0].Domain
|
||||||
} else {
|
} else {
|
||||||
fqdn = dst[0].DNSHostname
|
fqdn = dst[0].DNSHostname
|
||||||
|
|||||||
Reference in New Issue
Block a user