Skip to content

Commit

Permalink
release 1.0.0.RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed Jan 5, 2020
1 parent dff7fec commit 6494cb6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 40 deletions.
44 changes: 9 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -102,32 +80,27 @@ 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
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
------------------

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
9 changes: 5 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

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

#=======================================================================================
# This is supposed to run on OS X.
# 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
Expand Down Expand Up @@ -229,5 +230,5 @@ case $1 in
echo ' - linux-arm32v6' >&2
echo ' - all-amd64' >&2
echo ' - all' >&2
exit -1
exit 255
esac
2 changes: 1 addition & 1 deletion smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6494cb6

Please sign in to comment.