From 6494cb631626e8c00aa0ce35e9266125c4ee6b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20St=C3=A4ber?= Date: Sun, 5 Jan 2020 21:15:40 +0100 Subject: [PATCH] release 1.0.0.RC1 --- README.md | 44 +++++++++----------------------------------- go.mod | 1 + release.sh | 9 +++++---- smoke-test.sh | 2 +- 4 files changed, 16 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 5e5c7ac1..3c14d59c 100644 --- a/README.md +++ b/README.md @@ -56,31 +56,9 @@ server: [CONFIG.md] describes the `grok_exporter` configuration file and shows how to define Grok patterns, Prometheus metrics, and labels. It also details how to configure file, stdin, and webhook inputs. -Status ------- - -Operating system support: - -* Linux 64 Bit: [Supported](https://travis-ci.org/fstab/grok_exporter) -* Windows 64 Bit: [Supported](https://ci.appveyor.com/project/fstab/grok-exporter) -* mac OS 64 Bit: [Supported](https://travis-ci.org/fstab/grok_exporter) - -Grok pattern support: - -* We are able to compile all of Grok's default patterns on [github.com/logstash-plugins/logstash-patterns-core](https://github.com/logstash-plugins/logstash-patterns-core/tree/818b7aa60d3c2fea008ea673dbbc49179c6df2c8/patterns). - -Prometheus support: - -* [Counter] metrics: [Supported](CONFIG.md#metrics-section) -* [Gauge] metrics: [Supported](CONFIG.md#metrics-section) -* [Histogram] metrics: [Supported](CONFIG.md#metrics-section) -* [Summary] metrics: [Supported](CONFIG.md#metrics-section) - How to build from source ----------------------- -**Note: `grok_exporter` is currently refactored to support multiple logfiles, see [#5](https://github.com/fstab/grok_exporter/issues/5). During transition, the `master` branch is unstable. For a stable version, please get the latest release tag.** - In order to compile `grok_exporter` from source, you need * [Go] installed and `$GOPATH` set. @@ -102,15 +80,16 @@ sudo apt-get install libonig-dev **Installing the Oniguruma library from source** ```bash -wget https://github.com/kkos/oniguruma/releases/download/v6.7.0/onig-6.7.0.tar.gz -tar xfz onig-6.7.0.tar.gz -cd onig-6.7.0.tar.gz && ./configure && make && make install +curl -sLO https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz +tar xfz onig-6.9.4.tar.gz +cd /tmp/onig-6.9.4 +./configure +make +make install ``` **Installing grok_exporter** -With Go 1.11, you can use the new Modules (no need for `go get`). If you are working inside the GOPATH, you need to `export GO111MODULE=on` to enable Go 1.11 Modules. - ```bash git clone https://github.com/fstab/grok_exporter cd grok_exporter @@ -118,16 +97,10 @@ git submodule update --init --recursive go install . ``` -With Go 1.10, use `go get`: - -```bash -go get github.com/fstab/grok_exporter -cd $GOPATH/src/github.com/fstab/grok_exporter -git submodule update --init --recursive -``` - The resulting `grok_exporter` binary will be dynamically linked to the Oniguruma library, i.e. it needs the Oniguruma library to run. The [releases] are statically linked with Oniguruma, i.e. the releases don't require Oniguruma as a run-time dependency. The releases are built with `release.sh`. +_Note: Go 1.13 for Mac OS has a bug affecting the file input. It is recommended to use Go 1.12 on Mac OS until the bug is fixed. Go 1.13.5 is affected. [https://github.com/golang/go/issues/35767](https://github.com/golang/go/issues/35767)._ + More Documentation ------------------ @@ -172,6 +145,7 @@ You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE- [ELK stack]: https://www.elastic.co/webinars/introduction-elk-stack [Exim]: http://www.exim.org/ [Go]: https://golang.org/ +[gcc]: https://gcc.gnu.org/ [Oniguruma]: https://github.com/kkos/oniguruma [screenshot.png]: screenshot.png [releases]: https://github.com/fstab/grok_exporter/releases diff --git a/go.mod b/go.mod index 6e1e7aa4..d3e76577 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 github.com/prometheus/common v0.4.1 github.com/sirupsen/logrus v1.4.2 + golang.org/x/exp v0.0.0-20191227195350-da58074b4299 gopkg.in/yaml.v2 v2.2.2 ) diff --git a/release.sh b/release.sh index 7fd2f661..03c14462 100755 --- a/release.sh +++ b/release.sh @@ -2,12 +2,13 @@ set -e -if [[ $(go version) != *"go1.11"* && $(go version) != *"go1.12"* ]] ; then +if [[ $(go version) != *"go1.11"* && $(go version) != *"go1.12"* && $(go version) != *"go1.13"* ]] ; then echo "grok_exporter uses Go 1.11 Modules. Please use Go version >= 1.11." >&2 echo "Version found is $(go version)" >&2 exit 1 fi +# Needed for go1.11 and go1.12 export GO111MODULE=on #======================================================================================= @@ -15,9 +16,9 @@ export GO111MODULE=on # The Darwin release is built natively, Linux and Windows are built in a Docker container #======================================================================================== -cd $GOPATH/src/github.com/fstab/grok_exporter +cd ${GOPATH:=$HOME/go}/src/github.com/fstab/grok_exporter -export VERSION=0.2.9-SNAPSHOT +export VERSION=1.0.0.RC1 export VERSION_FLAGS="\ -X github.com/fstab/grok_exporter/exporter.Version=$VERSION @@ -229,5 +230,5 @@ case $1 in echo ' - linux-arm32v6' >&2 echo ' - all-amd64' >&2 echo ' - all' >&2 - exit -1 + exit 255 esac diff --git a/smoke-test.sh b/smoke-test.sh index fc6ee013..d073eff0 100755 --- a/smoke-test.sh +++ b/smoke-test.sh @@ -285,7 +285,7 @@ sleep 0.1 checkMetric 'grok_test_counter_retention{user="alice"}' 1 checkMetric 'grok_test_counter_retention{user="bob"}' 1 -sleep .7 +sleep .5 # Update 'bob' so this metric will not be deleted echo '30.07.2016 14:37:33 service_a bob retention_test 2.5' >> $log_file