diff --git a/main.go b/main.go
index dc8ae82..4b71a50 100644
--- a/main.go
+++ b/main.go
@@ -41,6 +41,13 @@ var (
mystromDurationCounterVec *prometheus.CounterVec
mystromRequestsCounterVec *prometheus.CounterVec
)
+var landingPage = []byte(`
+
myStrom switch report Exporter
+
+myStrom Exporter
+Metrics
+
+`)
func main() {
@@ -97,13 +104,7 @@ func main() {
}),
)
router.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte(`
- myStrom switch report Exporter
-
- myStrom Exporter
- Metrics
-
- `))
+ w.Write(landingPage)
})
log.Infoln("Listening on address " + *listenAddress)
log.Fatal(http.ListenAndServe(*listenAddress, router))
diff --git a/pkg/mystrom/mystrom.go b/pkg/mystrom/mystrom.go
index 8b00aea..e54c53b 100644
--- a/pkg/mystrom/mystrom.go
+++ b/pkg/mystrom/mystrom.go
@@ -15,8 +15,8 @@ const namespace = "mystrom"
type switchReport struct {
Power float64 `json:"power"`
WattPerSec float64 `json:"Ws"`
- Relay bool `json:relay`
- Temperature float64 `json:"temperature`
+ Relay bool `json:"relay"`
+ Temperature float64 `json:"temperature"`
}
type Exporter struct {