We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e30bd08 commit d1ec1dcCopy full SHA for d1ec1dc
Makefile
@@ -2,7 +2,7 @@ GOCMD=go
2
GOTEST=$(GOCMD) test
3
GOVET=$(GOCMD) vet
4
BINARY_NAME=uptimerobot-exporter
5
-VERSION?=0.0.0
+VERSION?=0.2.0
6
DOCKER_REGISTRY?=ez3kiel
7
8
GREEN := $(shell tput -Txterm setaf 2)
main.go
@@ -3,6 +3,7 @@ package main
import (
"encoding/json"
"errors"
+ "fmt"
"io/ioutil"
"net/http"
9
"net/url"
@@ -126,6 +127,10 @@ func main() {
126
127
128
logrus.Info("starting metrics server")
129
http.Handle("/metrics", promhttp.Handler())
130
+ http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
131
+ w.WriteHeader(http.StatusOK)
132
+ fmt.Fprintln(w, "I'm alive! 8)")
133
+ })
134
http.ListenAndServe(a.address+":"+a.port, nil)
135
}
136
0 commit comments