diff --git a/cmd/tivan/tivan.go b/cmd/tivan/tivan.go index d1ef8d94e..6cb5e4733 100644 --- a/cmd/tivan/tivan.go +++ b/cmd/tivan/tivan.go @@ -2,6 +2,7 @@ package main import ( "flag" + "fmt" "log" "os" "os/signal" @@ -14,10 +15,18 @@ import ( var fDebug = flag.Bool("debug", false, "show metrics as they're generated to stdout") var fTest = flag.Bool("test", false, "gather metrics, print them out, and exit") var fConfig = flag.String("config", "", "configuration file to load") +var fVersion = flag.Bool("version", false, "display the version") + +var Version = "unreleased" func main() { flag.Parse() + if *fVersion { + fmt.Printf("InfluxDB Tivan agent - Version %s\n", Version) + return + } + var ( config *tivan.Config err error