#36 attempt to fix api login auth issue (#38)

* #36 attempt to fix api login auth issue
* update release version number
This commit is contained in:
Steve Brunton
2019-07-02 20:46:19 -04:00
committed by GitHub
parent dcaef1a51e
commit 8e1ece22dd
5 changed files with 76 additions and 10 deletions

View File

@@ -36,7 +36,7 @@ var (
withOptics = flag.Bool("with-optics", false, "retrieves optical diagnostic metrics")
withWlanSTA = flag.Bool("with-wlansta", false, "retrieves connected wlan station metrics")
withWlanIF = flag.Bool("with-wlanif", false, "retrieves wlan interface metrics")
timeout = flag.Duration("timeout", collector.DefaultTimeout, "timeout when connecting to routers")
timeout = flag.Duration("timeout", collector.DefaultTimeout, "timeout when connecting to devices")
tls = flag.Bool("tls", false, "use tls to connect to routers")
insecure = flag.Bool("insecure", false, "skips verification of server certificate when using TLS (not recommended)")
cfg *config.Config
@@ -118,11 +118,11 @@ func startServer() {
http.Handle(*metricsPath, h)
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("ok"))
_, _ = w.Write([]byte("ok"))
})
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<html>
_, _ = w.Write([]byte(`<html>
<head><title>Mikrotik Exporter</title></head>
<body>
<h1>Mikrotik Exporter</h1>