fix exporter name
This commit is contained in:
parent
6efd4fbbca
commit
edd8b778f3
6
proxy.go
6
proxy.go
@ -176,7 +176,7 @@ shellyplug_temperature %.2f
|
|||||||
# HELP shellyplug_uptime Plug uptime in seconds
|
# HELP shellyplug_uptime Plug uptime in seconds
|
||||||
# TYPE shellyplug_uptime gauge
|
# TYPE shellyplug_uptime gauge
|
||||||
shellyplug_uptime %d
|
shellyplug_uptime %d
|
||||||
`, exporterName, ss.Status1.Meters[0].Counters[0], float32(0), 0, ss.Status1.Temperature, ss.Status1.Uptime)
|
`, *exporterName, ss.Status1.Meters[0].Counters[0], float32(0), 0, ss.Status1.Temperature, ss.Status1.Uptime)
|
||||||
case 2:
|
case 2:
|
||||||
c.String(http.StatusOK, `shellyplug_name %s
|
c.String(http.StatusOK, `shellyplug_name %s
|
||||||
# HELP shellyplug_power Current power drawn in watts
|
# HELP shellyplug_power Current power drawn in watts
|
||||||
@ -194,7 +194,7 @@ shellyplug_temperature %.2f
|
|||||||
# HELP shellyplug_uptime Plug uptime in seconds
|
# HELP shellyplug_uptime Plug uptime in seconds
|
||||||
# TYPE shellyplug_uptime gauge
|
# TYPE shellyplug_uptime gauge
|
||||||
shellyplug_uptime %d
|
shellyplug_uptime %d
|
||||||
`, exporterName, ss.Status2.Switch.Power, float32(0), 0, ss.Status2.Switch.Temperature.Celsius, ss.Status2.Sys.Uptime)
|
`, *exporterName, ss.Status2.Switch.Power, float32(0), 0, ss.Status2.Switch.Temperature.Celsius, ss.Status2.Sys.Uptime)
|
||||||
default:
|
default:
|
||||||
c.String(http.StatusOK, `shellyplug_name %s
|
c.String(http.StatusOK, `shellyplug_name %s
|
||||||
# HELP shellyplug_power Current power drawn in watts
|
# HELP shellyplug_power Current power drawn in watts
|
||||||
@ -212,7 +212,7 @@ shellyplug_temperature %.2f
|
|||||||
# HELP shellyplug_uptime Plug uptime in seconds
|
# HELP shellyplug_uptime Plug uptime in seconds
|
||||||
# TYPE shellyplug_uptime gauge
|
# TYPE shellyplug_uptime gauge
|
||||||
shellyplug_uptime %d
|
shellyplug_uptime %d
|
||||||
`, exporterName, float32(0), float32(0), 0, float32(0), 0)
|
`, *exporterName, float32(0), float32(0), 0, float32(0), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user