mirror of
https://github.com/nikdoof/hg612-exporter.git
synced 2025-12-13 18:22:15 +00:00
adds identifier
This commit is contained in:
7
main.go
7
main.go
@@ -24,6 +24,11 @@ func main() {
|
||||
Usage: "the fully qualified host for the hg612 modem",
|
||||
Required: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "identifier",
|
||||
Usage: "the identifier for the line and modem",
|
||||
Required: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "bind",
|
||||
Usage: "the bind string for the http server ie :8080",
|
||||
@@ -38,7 +43,7 @@ func main() {
|
||||
Action: func(c *cli.Context) error {
|
||||
client := hg612.New(fmt.Sprintf("http://%s", c.String("host")), http.DefaultClient)
|
||||
|
||||
collector := metrics.New(client, c.String("host"), c.Int("interval"))
|
||||
collector := metrics.New(client, c.String("host"), c.String("identifier"), c.Int("interval"))
|
||||
defer collector.Stop()
|
||||
collector.Start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user