diff --git a/.travis.yml b/.travis.yml index 6c744c9..966e310 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,12 @@ install: - dep ensure script: - go test -v github.com/Cleafy/promqueen/model -- GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec.elf" -a -ldflags "-extldflags '-static' -X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec -- GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay.elf" -a -ldflags "-extldflags '-static' -X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay -- GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec.exe" -a -ldflags "-extldflags '-static' -X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec -- GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay.exe" -a -ldflags "-extldflags '-static'-X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay -- GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec" -a -ldflags "-extldflags '-static' -X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec -- GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay" -a -ldflags "-extldflags '-static' -X github.com/ropes/go-linker-vars-example/src/version.GitTag=$(git describe --tags) -X github.com/ropes/go-linker-vars-example/src/version.BuildUser=${USER} -X github.com/ropes/go-linker-vars-example/src/version.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay +- GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec.elf" -a -ldflags "-extldflags '-static' -X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec +- GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay.elf" -a -ldflags "-extldflags '-static' -X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay +- GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec.exe" -a -ldflags "-extldflags '-static' -X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec +- GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay.exe" -a -ldflags "-extldflags '-static'-X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay +- GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promrec" -a -ldflags "-extldflags '-static' -X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promrec +- GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -o "$GOPATH/bin/promplay" -a -ldflags "-extldflags '-static' -X main.Version=$(git describe --tags --abbrev=0)" github.com/Cleafy/promqueen/bin/promplay deploy: provider: releases api_key: diff --git a/README.md b/README.md index 70bbd0f..0c034e3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ usage: promrec [] Flags: --help Show context-sensitive help (also try --help-long and --help-man). --debug Enable debug mode. - --gzip Disable gzip mode. + --gzip Enable gzip mode. -i, --interval=60s Timeout waiting for ping. -u, --umap=UMAP ... stringmap [eg. service.name=http://get.uri:port/uri]. -o, --output="metrics" Output file. @@ -34,11 +34,11 @@ Flags: -d, --dir="/tmp" Input directory. --version Show application version. --storage.path="data" Directory path to create and fill the data store under. - --storage.retention-period=360h + --storage.retention-period=360h Period of time to store data for - --storage.checkpoint-interval=30m + --storage.checkpoint-interval=30m Period of time to store data for - --storage.checkpoint-dirty-series-limit=10000 + --storage.checkpoint-dirty-series-limit=10000 Period of time to store data for ``` diff --git a/bin/promplay/main.go b/bin/promplay/main.go index 3124720..3bee805 100644 --- a/bin/promplay/main.go +++ b/bin/promplay/main.go @@ -18,7 +18,6 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/storage/local" - "github.com/ropes/go-linker-vars-example/src/version" "github.com/sirupsen/logrus" kingpin "gopkg.in/alecthomas/kingpin.v2" filetype "gopkg.in/h2non/filetype.v1" @@ -39,7 +38,7 @@ var ( nopromcfg = kingpin.Flag("nopromcfg", "Disable the generation of the prometheus cfg file (prometheus.yml)").Bool() dir = kingpin.Flag("dir", "Input directory.").Short('d').OverrideDefaultFromEnvar("INPUT_DIRECTORY").Default(".").String() framereader = make(<-chan cm.Frame) - Version = version.GitTag + Version = "unversioned" cfgMemoryStorage = local.MemorySeriesStorageOptions{ MemoryChunks: 1024, MaxChunksToPersist: 1024, diff --git a/bin/promrec/main.go b/bin/promrec/main.go index 074dd64..a12b537 100644 --- a/bin/promrec/main.go +++ b/bin/promrec/main.go @@ -9,18 +9,17 @@ import ( "time" "github.com/cleafy/promqueen/model" - "github.com/ropes/go-linker-vars-example/src/version" "github.com/sirupsen/logrus" "gopkg.in/alecthomas/kingpin.v2" ) var ( debug = kingpin.Flag("debug", "Enable debug mode.").Bool() - enableGZIP = kingpin.Flag("gzip", "Disable gzip mode.").Bool() + enableGZIP = kingpin.Flag("gzip", "Enable gzip mode.").Bool() interval = kingpin.Flag("interval", "Timeout waiting for ping.").Default("60s").OverrideDefaultFromEnvar("ACTION_INTERVAL").Short('i').Duration() umap = kingpin.Flag("umap", "stringmap [eg. service.name=http://get.uri:port/uri].").Short('u').StringMap() output = kingpin.Flag("output", "Output file.").Short('o').OverrideDefaultFromEnvar("OUTPUT_FILE").Default("metrics").String() - Version = version.GitTag + Version = "unversioned" filewriter io.WriteCloser )