File: main.go

package info (click to toggle)
prometheus-tplink-plug-exporter 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 168 kB
  • sloc: sh: 18; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main

import (
	"flag"
	"net/http"

	log "github.com/sirupsen/logrus"

	"github.com/fffonion/tplink-plug-exporter/exporter"
)

func main() {
	var metricsAddr = flag.String("metrics.listen-addr", ":9233", "listen address for tplink-plug exporter")

	flag.Parse()
	s := exporter.NewHttpServer()
	log.Infof("Accepting Prometheus Requests on %s", *metricsAddr)
	log.Fatal(http.ListenAndServe(*metricsAddr, s))
}