adds identifier

This commit is contained in:
Jake Keeys
2020-01-26 13:23:26 +00:00
parent f5de88e5bb
commit 542060a14b
3 changed files with 61 additions and 54 deletions

View File

@@ -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()