2018-05-30 15:03:44 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
2018-09-28 19:08:44 +01:00
|
|
|
"fmt"
|
2018-05-30 15:03:44 +01:00
|
|
|
|
2018-06-27 09:02:49 +01:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2018-05-30 15:03:44 +01:00
|
|
|
"storj.io/storj/pkg/process"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2018-09-28 19:08:44 +01:00
|
|
|
err := flag.Set("metrics.interval", "1s")
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
}
|
|
|
|
|
2018-08-13 16:07:05 +01:00
|
|
|
process.Exec(&cobra.Command{
|
|
|
|
Use: "metric-sender",
|
|
|
|
Short: "send metrics",
|
|
|
|
RunE: run,
|
|
|
|
})
|
2018-05-30 15:03:44 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 16:07:05 +01:00
|
|
|
func run(cmd *cobra.Command, args []string) error {
|
2018-05-30 15:03:44 +01:00
|
|
|
// just go to sleep and let the background telemetry start sending
|
|
|
|
select {}
|
|
|
|
}
|