You've already forked prometheus-fail2ban-exporter
Compare commits
207 Commits
0.4.0
..
9a6871863d
| Author | SHA1 | Date | |
|---|---|---|---|
|
9a6871863d
|
|||
| 2e9b64ce31 | |||
|
48ea1cef0b
|
|||
| 0f669f204c | |||
|
62f87708f0
|
|||
| 1996ecc9a0 | |||
|
e8c61c3653
|
|||
| af95d28d4f | |||
|
d0e4daab5a
|
|||
| 34bad90a29 | |||
|
719e7abf69
|
|||
| d36038087b | |||
|
1eb7bd0412
|
|||
| d4af8b1e2f | |||
|
07bee88a52
|
|||
| 17fb66558e | |||
|
3995ede93e
|
|||
| 083fddc3ed | |||
|
049ef72e31
|
|||
| 3f1bf76276 | |||
|
5ca75f3302
|
|||
| 3d323407ff | |||
|
453e2fc691
|
|||
| 1078ae1d49 | |||
|
a638770036
|
|||
| 89a5d7509c | |||
|
ed3166d8a9
|
|||
| 575b31a59a | |||
|
0dd3918bde
|
|||
| ec261e640f | |||
|
87c71f4878
|
|||
| 249ef41706 | |||
|
35a9880e7b
|
|||
| 9860dbc22c | |||
|
0d33d9256b
|
|||
| b582961732 | |||
|
972987e6d8
|
|||
| fd987cdf1f | |||
|
e1f1eeafeb
|
|||
| 794d11e890 | |||
|
6a86c9466e
|
|||
| b0ebb02095 | |||
|
15d5fff9dd
|
|||
| bc684f1abf | |||
|
45438b8000
|
|||
| 4b7ac12721 | |||
|
efd011a258
|
|||
| 9f432dce1c | |||
|
9ebdc3c02c
|
|||
| 492d0f9a14 | |||
|
227fd5268d
|
|||
| 1c262f908b | |||
|
2533b0a472
|
|||
| 540d403114 | |||
|
764994f9c2
|
|||
|
2eb6da3302
|
|||
|
84b85fdd37
|
|||
| 45e9558e57 | |||
|
633d272b58
|
|||
| 1a412f3948 | |||
| b608d324c6 | |||
|
9a4f259d84
|
|||
|
b30d4f5c94
|
|||
| e70f532c7e | |||
|
8b969b2b61
|
|||
| 9417cf9566 | |||
|
4a9fd36973
|
|||
| 94cbe998fa | |||
|
aa72133799
|
|||
| 5c1db30f0b | |||
|
df7e3e9b90
|
|||
| 74c064ec30 | |||
|
9e68b3239b
|
|||
| be4fb9d59d | |||
|
0868d47725
|
|||
| 688993d262 | |||
|
93c2c5208d
|
|||
| b4a16a0187 | |||
|
0c520566f0
|
|||
|
b8b84a5384
|
|||
| 14cd5ef6bf | |||
|
6b1ab49ffd
|
|||
| 0b0c20bc15 | |||
|
3e17167703
|
|||
| 4151ae3770 | |||
|
a7af92e0f9
|
|||
| 859b741108 | |||
|
06ceef2de8
|
|||
| 12611efc28 | |||
|
ef340f50b5
|
|||
| 3438cb04a8 | |||
|
2d343b6c70
|
|||
|
878a0194ae
|
|||
|
95f3b6b56f
|
|||
| 7d95e6407e | |||
|
6f5dbbba3f
|
|||
| 425c5777c4 | |||
|
3f2d9103f3
|
|||
| e312ba9d12 | |||
|
7a6c5e497b
|
|||
| 2a9a3a3eb1 | |||
|
211d8aec18
|
|||
| be8df93ac9 | |||
|
766bec03de
|
|||
|
533c019b80
|
|||
|
8a5ebcab7c
|
|||
|
7540303fa3
|
|||
|
5388f53963
|
|||
|
4d3847ca67
|
|||
|
be67170a6f
|
|||
|
e4d457d73c
|
|||
|
3810acad34
|
|||
|
b8cb19ea7b
|
|||
|
9eed0fe492
|
|||
|
76f5437ab3
|
|||
|
b291247c3f
|
|||
|
e7d99c78d1
|
|||
|
ec377df034
|
|||
|
43fbbc015e
|
|||
|
064cf42743
|
|||
|
35155770c8
|
|||
|
e9c4f60cb5
|
|||
|
5ae780517a
|
|||
|
451b3659a1
|
|||
|
218c04b34b
|
|||
|
4a1297b9b8
|
|||
|
9cf687c7e4
|
|||
|
ce09c1b5df
|
|||
|
5d52473015
|
|||
|
8c8a721e39
|
|||
|
005648f7d4
|
|||
|
1766f00c01
|
|||
|
97c2294035
|
|||
|
026f8d2d18
|
|||
|
3e966f5260
|
|||
|
50e213e6e6
|
|||
|
c5678e572a
|
|||
|
9f28dacf85
|
|||
|
01af95399d
|
|||
|
d1bc3d6ae8
|
|||
|
8834e8d7b8
|
|||
|
4d47b0d1d0
|
|||
|
af099ca73a
|
|||
|
9727e49a3f
|
|||
|
d330eb6f52
|
|||
|
e880ea9041
|
|||
|
4773d68b06
|
|||
|
4177d66ae6
|
|||
|
e6f4e1ea66
|
|||
|
36c53a93b3
|
|||
|
005927bbf7
|
|||
|
78c4eb4123
|
|||
|
9d63537a1f
|
|||
|
5153fce32a
|
|||
|
78d1498fe7
|
|||
|
3faf6f0e73
|
|||
|
c73d3e7600
|
|||
|
b3d8632b72
|
|||
|
2ff3ef5f22
|
|||
|
e6b727ac7e
|
|||
|
25b2e1fe7b
|
|||
|
667fecc556
|
|||
|
9020506418
|
|||
|
4b75d9769b
|
|||
|
531baeb282
|
|||
|
6ef94c27de
|
|||
| c81fbacdae | |||
|
f542535d6b
|
|||
|
3f79e2617e
|
|||
|
996c717eb8
|
|||
|
5169a4aea3
|
|||
|
f7ca500dcd
|
|||
|
5adf9e2bab
|
|||
|
c421c25769
|
|||
|
bf7d914c18
|
|||
|
960bcdb812
|
|||
|
431b82f579
|
|||
|
f7db4b9303
|
|||
|
6872f7bd5d
|
|||
|
608651dfda
|
|||
|
1b11f4c729
|
|||
|
8604651311
|
|||
|
1a99a90bb0
|
|||
| 44a5e0a437 | |||
| 8ce5d09c5c | |||
| ac62565f44 | |||
| 082e304ce2 | |||
|
af5bf0d6f0
|
|||
| 8295b2a73e | |||
| a51317daac | |||
|
7a3ba4652c
|
|||
| 97ef7e9967 | |||
| c48e3f13eb | |||
| 1fad408e86 | |||
| e9a90bbf43 | |||
| 39b871a2ed | |||
| a05a8f10a2 | |||
| a2398f50a4 | |||
|
a98ab32805
|
|||
| 0d7925f991 | |||
| 9201ed2150 | |||
| cbafc01739 | |||
| 9d98a39082 | |||
| 3428e9b0fa | |||
| 384b181c95 | |||
|
c5a5fc336b
|
|||
|
3998f9e2c2
|
@@ -0,0 +1 @@
|
|||||||
|
prometheus-fail2ban-exporter
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Editor configuration, see http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[{Makefile,*.go}]
|
||||||
|
indent_style = tab
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: "Lint Golang files"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
tags-ignore: [ '**' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
golangci:
|
||||||
|
name: "Run golang CI linter"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: [ stable ]
|
||||||
|
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: actions/setup-go@v6.2.0
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- uses: golangci/golangci-lint-action@v9.2.0
|
||||||
|
with:
|
||||||
|
version: v2.8.0 # renovate: datasource=github-releases depName=golangci/golangci-lint
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
name: "Run Golang tests"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
tags-ignore: [ '**' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# integration-test:
|
||||||
|
# name: "Run integration tests"
|
||||||
|
# runs-on: ${{ matrix.os }}
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# go: [ stable ]
|
||||||
|
# os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v4.3.0
|
||||||
|
# - uses: actions/setup-go@v5.5.0
|
||||||
|
# with:
|
||||||
|
# go-version: ${{ matrix.go }}
|
||||||
|
# - env:
|
||||||
|
# GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
# run: make test/integration
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
name: "Run unit tests"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: [ stable ]
|
||||||
|
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: actions/setup-go@v6.2.0
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- env:
|
||||||
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
run: make test/unit
|
||||||
|
- id: coverage
|
||||||
|
name: Check coverage
|
||||||
|
run: |
|
||||||
|
coverage="$(make test/coverage | grep total | awk '{ print substr($3, 1, length($3)-1); }')"
|
||||||
|
echo "total_coverage=$coverage" >> $GITHUB_OUTPUT
|
||||||
|
echo "Total coverage: ${coverage}%"
|
||||||
|
- name: Fail if coverage is to low
|
||||||
|
run: |
|
||||||
|
threshold=5
|
||||||
|
total_coverage=${{ steps.coverage.outputs.total_coverage }}
|
||||||
|
|
||||||
|
if (( ${total_coverage%.*} < ${threshold} )); then
|
||||||
|
echo "ERROR: Coverage (${total_coverage}%) is below the threshold (${threshold}%)." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
name: "Lint Markdown files"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '*' ]
|
||||||
|
tags-ignore: [ '*' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
markdown-lint:
|
||||||
|
name: "Run markdown linter"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: DavidAnson/markdownlint-cli2-action@v21.0.0
|
||||||
|
with:
|
||||||
|
globs: '**/*.md'
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
name: "Release"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: [ '**' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: "Release application"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: docker/setup-qemu-action@v3.7.0
|
||||||
|
- uses: actions/setup-go@v6.2.0
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
- uses: docker/login-action@v3.7.0
|
||||||
|
with:
|
||||||
|
registry: git.cryptic.systems
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
- env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||||
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
uses: goreleaser/goreleaser-action@v6.4.0
|
||||||
|
with:
|
||||||
|
version: v2.13.3 # renovate: datasource=github-releases depName=goreleaser/goreleaser
|
||||||
|
args: release --clean
|
||||||
|
|
||||||
|
sync-to-hub-docker-io:
|
||||||
|
name: "Upload Images to docker.io"
|
||||||
|
needs:
|
||||||
|
- release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Copy images to docker.io
|
||||||
|
run: |
|
||||||
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
||||||
|
|
||||||
|
apt-get update --yes
|
||||||
|
apt-get install --yes skopeo
|
||||||
|
skopeo copy \
|
||||||
|
--all \
|
||||||
|
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
||||||
|
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
|
||||||
|
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
||||||
|
--src-username volker.raschek \
|
||||||
|
docker://git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter:${TAG} \
|
||||||
|
docker://docker.io/volkerraschek/prometheus-fail2ban-exporter:${TAG}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
name: Update Docker Hub Description
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'master' ]
|
||||||
|
paths: [ 'README.md' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-description-on-hub-docker-io:
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: peter-evans/dockerhub-description@v5.0.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||||
|
repository: volkerraschek/prometheus-fail2ban-exporter
|
||||||
|
readme-filepath: README.md
|
||||||
+3
-6
@@ -1,6 +1,3 @@
|
|||||||
.idea/
|
prometheus-fail2ban-exporter
|
||||||
vendor/
|
coverage.*
|
||||||
*.iml
|
dist
|
||||||
|
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
image: golang:latest
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- make go/dependencies
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
- build
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- make go/checkDependencies
|
|
||||||
|
|
||||||
format:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- make go/checkFmt
|
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- make go/test
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- git fetch --tags
|
|
||||||
- make build/snapshot
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- dist/*.tar.gz
|
|
||||||
- dist/checksums.txt
|
|
||||||
expire_in: 1 day
|
|
||||||
|
|
||||||
docker/gitlab:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
- tags
|
|
||||||
image: docker:stable
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
before_script:
|
|
||||||
- apk add git
|
|
||||||
- apk add make
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
script:
|
|
||||||
- make docker/build/latest
|
|
||||||
- make docker/build/tag
|
|
||||||
- docker push registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
version: "2"
|
||||||
|
linters:
|
||||||
|
default: standard
|
||||||
|
enable:
|
||||||
|
- errname
|
||||||
|
- gosec
|
||||||
|
|
||||||
|
exclusions:
|
||||||
|
rules: []
|
||||||
|
warn-unused: true
|
||||||
|
|
||||||
|
run:
|
||||||
|
tests: true
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
project_name: prometheus-fail2ban-exporter
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- formats: [ "tar.xz" ]
|
||||||
|
files:
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- main: main.go
|
||||||
|
binary: >-
|
||||||
|
{{ .ProjectName }}-
|
||||||
|
{{- .Version }}-
|
||||||
|
{{- .Os }}-
|
||||||
|
{{- if eq .Arch "amd64" }}amd64
|
||||||
|
{{- else if eq .Arch "amd64_v1" }}amd64
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
- GONOSUMDB={{ .Env.GONOSUMDB }}
|
||||||
|
- GOPROXY={{ .Env.GOPROXY }}
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
- riscv64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}' -X 'main.date={{ time "2006-01-02T15:04:05Z07:00" }}'
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- '^chore'
|
||||||
|
- '^docs'
|
||||||
|
- '^test'
|
||||||
|
- Merge pull request
|
||||||
|
- Merge branch
|
||||||
|
- go mod tidy
|
||||||
|
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
|
||||||
|
groups:
|
||||||
|
- title: Features
|
||||||
|
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 0
|
||||||
|
- title: "Bug fixes"
|
||||||
|
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 1
|
||||||
|
- title: Others
|
||||||
|
order: 999
|
||||||
|
sort: asc
|
||||||
|
use: git
|
||||||
|
|
||||||
|
dockers:
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/amd64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: amd64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm/v6
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm
|
||||||
|
goarm: "6"
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm/v7
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm
|
||||||
|
goarm: "7"
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/riscv64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: riscv64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
docker_manifests:
|
||||||
|
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
||||||
|
|
||||||
|
gitea_urls:
|
||||||
|
api: https://git.cryptic.systems/api/v1
|
||||||
|
download: https://git.cryptic.systems
|
||||||
|
|
||||||
|
version: 2
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# This is an example goreleaser.yaml file with some sane defaults.
|
|
||||||
# Make sure to check the documentation at http://goreleaser.com
|
|
||||||
before:
|
|
||||||
hooks:
|
|
||||||
- make go/dependencies
|
|
||||||
builds:
|
|
||||||
-
|
|
||||||
dir: src
|
|
||||||
goos:
|
|
||||||
- linux
|
|
||||||
- darwin
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- "386"
|
|
||||||
- arm
|
|
||||||
- arm64
|
|
||||||
goarm:
|
|
||||||
- "6"
|
|
||||||
- "7"
|
|
||||||
|
|
||||||
archives:
|
|
||||||
-
|
|
||||||
files:
|
|
||||||
- LICENSE
|
|
||||||
- README.md
|
|
||||||
- CHANGELOG.md
|
|
||||||
checksum:
|
|
||||||
name_template: 'checksums.txt'
|
|
||||||
changelog:
|
|
||||||
skip: true
|
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
# markdownlint YAML configuration
|
||||||
|
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
|
||||||
|
|
||||||
|
# Default state for all rules
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# Path to configuration file to extend
|
||||||
|
extends: null
|
||||||
|
|
||||||
|
# MD003/heading-style/header-style - Heading style
|
||||||
|
MD003:
|
||||||
|
# Heading style
|
||||||
|
style: "atx"
|
||||||
|
|
||||||
|
# MD004/ul-style - Unordered list style
|
||||||
|
MD004:
|
||||||
|
style: "dash"
|
||||||
|
|
||||||
|
# MD007/ul-indent - Unordered list indentation
|
||||||
|
MD007:
|
||||||
|
# Spaces for indent
|
||||||
|
indent: 2
|
||||||
|
# Whether to indent the first level of the list
|
||||||
|
start_indented: false
|
||||||
|
|
||||||
|
# MD009/no-trailing-spaces - Trailing spaces
|
||||||
|
MD009:
|
||||||
|
# Spaces for line break
|
||||||
|
br_spaces: 2
|
||||||
|
# Allow spaces for empty lines in list items
|
||||||
|
list_item_empty_lines: false
|
||||||
|
# Include unnecessary breaks
|
||||||
|
strict: false
|
||||||
|
|
||||||
|
# MD010/no-hard-tabs - Hard tabs
|
||||||
|
MD010:
|
||||||
|
# Include code blocks
|
||||||
|
code_blocks: true
|
||||||
|
|
||||||
|
# MD012/no-multiple-blanks - Multiple consecutive blank lines
|
||||||
|
MD012:
|
||||||
|
# Consecutive blank lines
|
||||||
|
maximum: 1
|
||||||
|
|
||||||
|
# MD013/line-length - Line length
|
||||||
|
MD013:
|
||||||
|
# Number of characters
|
||||||
|
line_length: 120
|
||||||
|
# Number of characters for headings
|
||||||
|
heading_line_length: 120
|
||||||
|
# Number of characters for code blocks
|
||||||
|
code_block_line_length: 120
|
||||||
|
# Include code blocks
|
||||||
|
code_blocks: false
|
||||||
|
# Include tables
|
||||||
|
tables: false
|
||||||
|
# Include headings
|
||||||
|
headings: true
|
||||||
|
# Strict length checking
|
||||||
|
strict: false
|
||||||
|
# Stern length checking
|
||||||
|
stern: false
|
||||||
|
|
||||||
|
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
|
||||||
|
MD022:
|
||||||
|
# Blank lines above heading
|
||||||
|
lines_above: 1
|
||||||
|
# Blank lines below heading
|
||||||
|
lines_below: 1
|
||||||
|
|
||||||
|
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
||||||
|
MD025:
|
||||||
|
# Heading level
|
||||||
|
level: 1
|
||||||
|
# RegExp for matching title in front matter
|
||||||
|
front_matter_title: "^\\s*title\\s*[:=]"
|
||||||
|
|
||||||
|
# MD026/no-trailing-punctuation - Trailing punctuation in heading
|
||||||
|
MD026:
|
||||||
|
# Punctuation characters
|
||||||
|
punctuation: ".,;:!。,;:!"
|
||||||
|
|
||||||
|
# MD029/ol-prefix - Ordered list item prefix
|
||||||
|
MD029:
|
||||||
|
# List style
|
||||||
|
style: "one_or_ordered"
|
||||||
|
|
||||||
|
# MD030/list-marker-space - Spaces after list markers
|
||||||
|
MD030:
|
||||||
|
# Spaces for single-line unordered list items
|
||||||
|
ul_single: 1
|
||||||
|
# Spaces for single-line ordered list items
|
||||||
|
ol_single: 1
|
||||||
|
# Spaces for multi-line unordered list items
|
||||||
|
ul_multi: 1
|
||||||
|
# Spaces for multi-line ordered list items
|
||||||
|
ol_multi: 1
|
||||||
|
|
||||||
|
# MD033/no-inline-html - Inline HTML
|
||||||
|
MD033:
|
||||||
|
# Allowed elements
|
||||||
|
allowed_elements: []
|
||||||
|
|
||||||
|
# MD035/hr-style - Horizontal rule style
|
||||||
|
MD035:
|
||||||
|
# Horizontal rule style
|
||||||
|
style: "---"
|
||||||
|
|
||||||
|
# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
|
||||||
|
MD036:
|
||||||
|
# Punctuation characters
|
||||||
|
punctuation: ".,;:!?。,;:!?"
|
||||||
|
|
||||||
|
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
|
||||||
|
MD041:
|
||||||
|
# Heading level
|
||||||
|
level: 1
|
||||||
|
# RegExp for matching title in front matter
|
||||||
|
front_matter_title: "^\\s*title\\s*[:=]"
|
||||||
|
|
||||||
|
# MD044/proper-names - Proper names should have the correct capitalization
|
||||||
|
MD044:
|
||||||
|
# List of proper names
|
||||||
|
names: []
|
||||||
|
# Include code blocks
|
||||||
|
code_blocks: false
|
||||||
|
|
||||||
|
# MD046/code-block-style - Code block style
|
||||||
|
MD046:
|
||||||
|
# Block style
|
||||||
|
style: "fenced"
|
||||||
|
|
||||||
|
# MD048/code-fence-style - Code fence style
|
||||||
|
MD048:
|
||||||
|
# Code fence syle
|
||||||
|
style: "backtick"
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
# CHANGELOG
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
|
|
||||||
|
|
||||||
## [Unreleased]
|
|
||||||
*Nothing yet*
|
|
||||||
|
|
||||||
## [0.4.0] - 2021-10-18
|
|
||||||
*Add new fail2ban config metrics*
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- (56730c8) feat: add new jail config metrics
|
|
||||||
- (5a107cc) feat: support for textfile metrics ([#13](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/13))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- (b268f86) remove: database-based metrics
|
|
||||||
- (0b6a941) remove: windows builds
|
|
||||||
|
|
||||||
## [0.3.0] - 2021-09-27
|
|
||||||
*Export new version metrics ([#12](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/12))*
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- (3c9a005) feat: render basic html page at root url
|
|
||||||
- (22a165d) feat: improve startup logging
|
|
||||||
- (fba9ee2) feat: export new version metric ([#12](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/12))
|
|
||||||
|
|
||||||
## [0.2.0] - 2021-08-31
|
|
||||||
*Collect metrics through fail2ban socket - based on [#11](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/11)*
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- (39133d0) feat: collect new up metric from fail2ban socket
|
|
||||||
- (4da46f3) feat: export metrics with socket errors
|
|
||||||
- (bd841c3) feat: set up metric to 0 if errors found
|
|
||||||
- (1964dde) feat: export metrics for failed/banned counts
|
|
||||||
- (2ab1f7d) feat: support reading fail2ban socket in docker
|
|
||||||
- (1282d63) feat: new metric for enabled jails ([#1](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/1))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- (526b1c7) fix: update banned metrics to exclude expired bans ([#11](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/11))
|
|
||||||
|
|
||||||
### Deprecated
|
|
||||||
- Use of the fail2ban database has been deprecated. The exporter now collects metrics through the fail2ban socket file. See [#11](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/issues/11) for more details.
|
|
||||||
|
|
||||||
## [0.1.0] - 2021-03-28
|
|
||||||
*Initial release*
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- (6355c9e) feat: fail on startup if database file does not exist ([#8](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/8))
|
|
||||||
- (4f18bf3) feat: add cli parameters for db path and metrics port ([#4](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/issues/4))
|
|
||||||
- (91cba80) feat: export number of banned ips
|
|
||||||
- (4b96501) feat: export bad ip count per jail
|
|
||||||
- (0b40e5d) feat: connect to fail2ban db and extract total bad ips
|
|
||||||
- (7ced846) feat: initial setup of metric exporter
|
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- (0842419) fix: compile tool without cgo_enabled flag
|
|
||||||
|
|
||||||
## 0.0.0 - 2021-02-05
|
|
||||||
*Repository creation*
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
|
|
||||||
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
|
|
||||||
[Unreleased]: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/compare/0.1.0...main
|
|
||||||
[0.1.0]: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/compare/0.0.0...0.1.0
|
|
||||||
[0.2.0]: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/compare/0.1.0...0.2.0
|
|
||||||
[0.3.0]: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/compare/0.2.0...0.3.0
|
|
||||||
[0.4.0]: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/compare/0.3.0...0.4.0
|
|
||||||
+3
-24
@@ -1,26 +1,5 @@
|
|||||||
# Using golang:latest instead of alpine because of issues with sqlite3
|
FROM scratch AS build
|
||||||
FROM golang:latest AS build
|
|
||||||
|
|
||||||
# Create build folder to compile tool
|
COPY prometheus-fail2ban-exporter-* /usr/bin/prometheus-fail2ban-exporter
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
# Copy source files to build folder and link to the /go folder
|
ENTRYPOINT [ "/usr/bin/prometheus-fail2ban-exporter" ]
|
||||||
COPY . /build
|
|
||||||
RUN ln -s /go/src/ /build/src
|
|
||||||
|
|
||||||
# Compile the tool using a Make command
|
|
||||||
RUN make build/docker
|
|
||||||
|
|
||||||
|
|
||||||
FROM debian:buster-slim
|
|
||||||
|
|
||||||
# Create main app folder to run from
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy compiled binary to release image
|
|
||||||
COPY --from=build /build/src/exporter /app/fail2ban-prometheus-exporter
|
|
||||||
|
|
||||||
# Copy init script into main app folder and set as entry point
|
|
||||||
COPY docker/run.sh /app/
|
|
||||||
RUN chmod +x /app/*
|
|
||||||
ENTRYPOINT /app/run.sh
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Hector
|
Copyright (c) 2021 Hector
|
||||||
|
Copyright (c) 2023 Markus Pesch
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,36 +1,118 @@
|
|||||||
go/dependencies:
|
EXECUTABLE=prometheus-fail2ban-exporter
|
||||||
cd src/ && go mod download
|
VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
# Make sure no unnecessary dependencies are present
|
# Destination directory and prefix to place the compiled binaries, documentaions
|
||||||
go/checkDependencies:
|
# and other files.
|
||||||
cd src/ && go mod tidy -v
|
DESTDIR?=
|
||||||
git diff-index --quiet HEAD
|
PREFIX?=/usr/local
|
||||||
|
|
||||||
# Standard go test
|
# CONTAINER_RUNTIME
|
||||||
go/test:
|
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||||
cd src/ && go test ./... -v -race
|
# container runtime. This is needed to start and run a container image.
|
||||||
|
CONTAINER_RUNTIME?=$(shell which podman)
|
||||||
|
|
||||||
go/fmt:
|
# PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_NAME
|
||||||
cd src/ && go fmt ./...
|
# Defines the name of the new container to be built using several variables.
|
||||||
|
PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_NAME:=git.cryptic.systems
|
||||||
|
PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_USER:=volker.raschek
|
||||||
|
|
||||||
go/checkFmt:
|
PROM_FAIL2BAN_EXP_IMAGE_NAMESPACE?=${PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_USER}
|
||||||
test -z $(shell gofmt -l .)
|
PROM_FAIL2BAN_EXP_IMAGE_NAME:=${EXECUTABLE}
|
||||||
|
PROM_FAIL2BAN_EXP_IMAGE_VERSION?=latest
|
||||||
|
PROM_FAIL2BAN_EXP_IMAGE_FULLY_QUALIFIED=${PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_NAME}/${PROM_FAIL2BAN_EXP_IMAGE_NAMESPACE}/${PROM_FAIL2BAN_EXP_IMAGE_NAME}:${PROM_FAIL2BAN_EXP_IMAGE_VERSION}
|
||||||
|
|
||||||
docs/genChangelog:
|
# BIN
|
||||||
./tools/git-chglog_linux_amd64 --config tools/chglog/config.yml 0.0.0.. > CHANGELOG_gen.md
|
# ==============================================================================
|
||||||
|
prometheus-fail2ban-exporter:
|
||||||
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go build -ldflags "-X 'main.version=${VERSION}' -X 'main.date=$(shell date --rfc-3339=seconds )'" -o ${@} main.go
|
||||||
|
|
||||||
build/snapshot:
|
# CLEAN
|
||||||
./tools/goreleaser_linux_amd64 --snapshot --rm-dist --skip-publish
|
# ==============================================================================
|
||||||
|
PHONY+=clean
|
||||||
|
clean:
|
||||||
|
rm --force --recursive prometheus-fail2ban-exporter
|
||||||
|
|
||||||
build/release:
|
# TESTS
|
||||||
./tools/goreleaser_linux_amd64 --rm-dist --skip-publish
|
# ==============================================================================
|
||||||
|
PHONY+=test/unit
|
||||||
|
test/unit:
|
||||||
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go test -v -p 1 -coverprofile=coverage.out -covermode=count -timeout 1200s ./...
|
||||||
|
|
||||||
build/docker:
|
PHONY+=test/integration
|
||||||
cd src/ && go build -o exporter \
|
test/integration:
|
||||||
-ldflags '-X main.version=$(shell git describe --tags) -X main.commit=${shell git rev-parse HEAD} -X "main.date=${shell date --rfc-3339=seconds}" -X main.builtBy=docker' exporter.go
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go test -v -p 1 -count=1 -timeout 1200s ./it/...
|
||||||
|
|
||||||
docker/build/latest:
|
PHONY+=test/coverage
|
||||||
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest .
|
test/coverage:
|
||||||
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go tool cover -func=coverage.out
|
||||||
|
|
||||||
docker/build/tag:
|
# GOLANGCI-LINT
|
||||||
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:$(shell git describe --tags) .
|
# ==============================================================================
|
||||||
|
PHONY+=golangci-lint
|
||||||
|
golangci-lint:
|
||||||
|
golangci-lint run --concurrency=$(shell nproc)
|
||||||
|
|
||||||
|
# INSTALL
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY+=uninstall
|
||||||
|
install: prometheus-fail2ban-exporter
|
||||||
|
install --directory ${DESTDIR}/etc/bash_completion.d
|
||||||
|
./prometheus-fail2ban-exporter completion bash > ${DESTDIR}/etc/bash_completion.d/${EXECUTABLE}
|
||||||
|
|
||||||
|
install --directory ${DESTDIR}${PREFIX}/bin
|
||||||
|
install --mode 0755 ${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE}
|
||||||
|
|
||||||
|
install --directory ${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}
|
||||||
|
install --mode 0644 LICENSE ${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}/LICENSE
|
||||||
|
|
||||||
|
install --directory ${DESTDIR}${PREFIX}/systemd/system
|
||||||
|
install --mode 0644 systemd/systemd.service ${DESTDIR}${PREFIX}/systemd/system/${EXECUTABLE}.service
|
||||||
|
sed --in-place --regexp-extended 's/EXECUTABLE/${EXECUTABLE}/gm' ${DESTDIR}${PREFIX}/systemd/system/${EXECUTABLE}.service
|
||||||
|
|
||||||
|
# UNINSTALL
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY+=uninstall
|
||||||
|
uninstall:
|
||||||
|
-rm --force --recursive \
|
||||||
|
${DESTDIR}/etc/bash_completion.d/${EXECUTABLE} \
|
||||||
|
${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \
|
||||||
|
${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}
|
||||||
|
|
||||||
|
# BUILD CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY+=container-image/build
|
||||||
|
container-image/build:
|
||||||
|
${CONTAINER_RUNTIME} build \
|
||||||
|
--build-arg VERSION=${VERSION} \
|
||||||
|
--file Dockerfile \
|
||||||
|
--no-cache \
|
||||||
|
--pull \
|
||||||
|
--tag ${PROM_FAIL2BAN_EXP_IMAGE_FULLY_QUALIFIED} \
|
||||||
|
.
|
||||||
|
|
||||||
|
# DELETE CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY:=container-image/delete
|
||||||
|
container-image/delete:
|
||||||
|
- ${CONTAINER_RUNTIME} image rm ${PROM_FAIL2BAN_EXP_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
|
# PUSH CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY+=container-image/push
|
||||||
|
container-image/push:
|
||||||
|
echo ${PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_NAME} --username ${PROM_FAIL2BAN_EXP_IMAGE_REGISTRY_USER} --password-stdin
|
||||||
|
${CONTAINER_RUNTIME} push ${PROM_FAIL2BAN_EXP_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
|
# PHONY
|
||||||
|
# ==============================================================================
|
||||||
|
# Declare the contents of the PHONY variable as phony. We keep that information
|
||||||
|
# in a variable so we can use it in if_changed.
|
||||||
|
.PHONY: ${PHONY}
|
||||||
@@ -1,105 +1,56 @@
|
|||||||
# Fail2Ban Prometheus Exporter
|
# prometheus-fail2ban-exporter
|
||||||
|
|
||||||
Go tool to collect and export metrics on Fail2Ban
|
This is a fork of Hector's fail2ban [exporter](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter). This fork
|
||||||
|
contains some changes to get the application running in a kubernetes cluster.
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
1. Introduction
|
|
||||||
2. Running the Exporter
|
|
||||||
3. Running in Docker
|
|
||||||
4. Metrics
|
|
||||||
|
|
||||||
## 1. Introduction
|
1. Quick Start
|
||||||
The exporter can collect metrics from 2 locations: the fail2ban server socket and the fail2ban server database.
|
2. Metrics
|
||||||
|
3. Configuration
|
||||||
|
4. Building from source
|
||||||
|
5. Textfile metrics
|
||||||
|
|
||||||
Once the exporter is running, metrics are available at `localhost:9191/metrics`.
|
## 1. Quick Start
|
||||||
|
|
||||||
(The default port is `9191` but can be modified with the `-port` flag)
|
The exporter can be run as a standalone binary or a docker container.
|
||||||
|
|
||||||
The exporter communicates with the fail2ban server over its socket.
|
### 1.1. Standalone
|
||||||
This allows the data collected by the exporter to always align with the output of the `fail2ban-client`.
|
|
||||||
|
|
||||||
The default location of the socket is: `/var/run/fail2ban/fail2ban.sock`
|
The following command will start collecting metrics from the `/var/run/fail2ban/fail2ban.sock` file and expose them on
|
||||||
|
port `9191`.
|
||||||
|
|
||||||
## 2. Running the Exporter
|
```bash
|
||||||
|
$ fail2ban_exporter --collector.f2b.socket=/var/run/fail2ban/fail2ban.sock --web.listen-address=":9191"
|
||||||
|
|
||||||
The exporter is compiled and released as a single binary.
|
2022/02/20 09:54:06 fail2ban exporter version 0.8.1
|
||||||
This makes it very easy to run in any environment.
|
2022/02/20 09:54:06 starting server at :9191
|
||||||
No additional runtime dependencies are required.
|
2022/02/20 09:54:06 reading metrics from fail2ban socket: /var/run/fail2ban/fail2ban.sock
|
||||||
|
2022/02/20 09:54:06 metrics available at '/metrics'
|
||||||
Compiled binaries for various platforms are provided in each release.
|
2022/02/20 09:54:06 ready
|
||||||
See the [releases page](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases) for more information.
|
|
||||||
|
|
||||||
**Usage**
|
|
||||||
```
|
|
||||||
$ fail2ban-prometheus-exporter -h
|
|
||||||
|
|
||||||
-port int
|
|
||||||
port to use for the metrics server (default 9191)
|
|
||||||
-socket string
|
|
||||||
path to the fail2ban server socket
|
|
||||||
-version
|
|
||||||
show version info and exit
|
|
||||||
-collector.textfile
|
|
||||||
enable the textfile collector
|
|
||||||
-collector.textfile.directory string
|
|
||||||
directory to read text files with metrics from
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example**
|
Binary files for each release can be found on the
|
||||||
|
[releases](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases) page.
|
||||||
|
|
||||||
```
|
There is also an [example systemd service file](/_examples/systemd/fail2ban_exporter.service) included in the
|
||||||
fail2ban-prometheus-exporter -socket /var/run/fail2ban/fail2ban.sock -port 9191
|
repository. This is a starting point to run the exporter as a service.
|
||||||
```
|
|
||||||
|
|
||||||
Note that the exporter will need read access to the fail2ban socket.
|
### 1.2. Docker
|
||||||
|
|
||||||
### 2.1. Compile from Source
|
#### Docker run
|
||||||
|
|
||||||
The code can be compiled from source by running `go build` inside the `src/` folder.
|
```bash
|
||||||
Go version `1.15` or greater is required.
|
$ docker run -d \
|
||||||
|
|
||||||
Run `go mod download` to download all necessary dependencies before running the build.
|
|
||||||
|
|
||||||
## 3. Running in Docker
|
|
||||||
|
|
||||||
An official docker image is available on the Gitlab container registry.
|
|
||||||
Use it by pulling the following image:
|
|
||||||
|
|
||||||
```
|
|
||||||
registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
Use the `:latest` tag to get the most up to date code (less stable) or use one of the version tagged images to use a specific release.
|
|
||||||
See the [registry page](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/container_registry) for all available tags.
|
|
||||||
|
|
||||||
### 3.1. Volumes
|
|
||||||
|
|
||||||
The docker image is designed to run by mounting the fail2ban run folder.
|
|
||||||
The run folder should be mounted in the container at: `/var/run/fail2ban`.
|
|
||||||
|
|
||||||
The folder can be mounted with read-only (`ro`) permissions.
|
|
||||||
|
|
||||||
**NOTE:** While it is possible to mount the `fail2ban.sock` file directly, it is recommended to mount the parent folder instead.
|
|
||||||
The `.sock` file is deleted by fail2ban on shutdown and re-created on startup and this causes problems for the docker mount.
|
|
||||||
See [this reply](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/issues/11#note_665003499) for more details.
|
|
||||||
|
|
||||||
### 3.2. Docker run
|
|
||||||
|
|
||||||
Use the following command to run the exporter as a docker container.
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run -d \
|
|
||||||
--name "fail2ban-exporter" \
|
--name "fail2ban-exporter" \
|
||||||
-v /var/run/fail2ban:/var/run/fail2ban:ro \
|
-v /var/run/fail2ban:/var/run/fail2ban:ro \
|
||||||
-p "9191:9191" \
|
-p "9191:9191" \
|
||||||
registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest
|
registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3.3. Docker compose
|
#### Docker compose
|
||||||
|
|
||||||
The following is a simple docker-compose file to run the exporter.
|
```yaml
|
||||||
|
|
||||||
```
|
|
||||||
version: "2"
|
version: "2"
|
||||||
services:
|
services:
|
||||||
exporter:
|
exporter:
|
||||||
@@ -110,92 +61,42 @@ services:
|
|||||||
- "9191:9191"
|
- "9191:9191"
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4. Metrics
|
Use the `:latest` tag to get the latest stable release. See the [registry
|
||||||
|
page](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/container_registry) for all available tags.
|
||||||
|
|
||||||
Access exported metrics at the `/metrics` path on the configured port.
|
**NOTE:** While it is possible to mount the `fail2ban.sock` file directly, it is recommended to mount the parent folder
|
||||||
|
instead. The `.sock` file is deleted by fail2ban on shutdown and re-created on startup and this causes problems for the
|
||||||
|
docker mount. See [this reply](https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/issues/11#note_665003499)
|
||||||
|
for more details.
|
||||||
|
|
||||||
**Note on Fail2Ban Jails**
|
## 2. Metrics
|
||||||
|
|
||||||
fail2ban can be configured to process different log files and use different rules for each one.
|
The exporter exposes the following metrics:
|
||||||
These separate configurations are referred to as *jails*.
|
|
||||||
|
|
||||||
For example, fail2ban can be configured to watch the system logs for failed SSH connections and Nextcloud logs for failed logins.
|
*All metric names are prefixed with `f2b_`*
|
||||||
In this configuration, there will be two jails - one for IPs banned from the SSH logs, and one for IPs banned from the Nextcloud logs.
|
|
||||||
|
|
||||||
This tool exports several metrics *per jail*, meaning that it is possible to track how many IPs are being banned in each jail as well as the overall total.
|
| Metric | Description | Example |
|
||||||
This can be useful to track what services are seeing more failed logins.
|
|------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|
|
||||||
|
| `up` | Returns 1 if the exporter is up and running | `f2b_up 1` |
|
||||||
|
| `errors` | Count the number of errors since startup by type | |
|
||||||
|
| `errors{type="socket_conn"}` | Errors connecting to the fail2ban socket (e.g. connection refused) | `f2b_errors{type="socket_conn"} 0` |
|
||||||
|
| `errors{type="socket_req"}` | Errors sending requests to the fail2ban server (e.g. invalid responses) | `f2b_errors{type="socket_req"} 0` |
|
||||||
|
| `jail_count` | Number of jails configured in fail2ban | `f2b_jail_count 2` |
|
||||||
|
| `jail_banned_current` | Number of IPs currently banned per jail | `f2b_jail_banned_current{jail="sshd"} 15` |
|
||||||
|
| `jail_banned_total` | Total number of banned IPs since fail2ban startup per jail (includes expired bans) | `f2b_jail_banned_total{jail="sshd"} 31` |
|
||||||
|
| `jail_failed_current` | Number of current failures per jail | `f2b_jail_failed_current{jail="sshd"} 6` |
|
||||||
|
| `jail_failed_total` | Total number of failures since fail2ban startup per jail | `f2b_jail_failed_total{jail="sshd"} 125` |
|
||||||
|
| `jail_config_ban_time` | How long an IP is banned for in this jail (in seconds) | `f2b_config_jail_ban_time{jail="sshd"} 600` |
|
||||||
|
| `jail_config_find_time` | How far back the filter will look for failures in this jail (in seconds) | `f2b_config_jail_find_time{jail="sshd"} 600` |
|
||||||
|
| `jail_config_max_retry` | The max number of failures allowed before banning an IP in this jail | `f2b_config_jail_max_retries{jail="sshd"} 5` |
|
||||||
|
| `version` | Version string of the exporter and fail2ban | `f2b_version{exporter="0.5.0",fail2ban="0.11.1"} 1` |
|
||||||
|
|
||||||
### 4.1. Socket-based Metrics
|
The metrics above correspond to the matching fields in the `fail2ban-client
|
||||||
|
status <jail>` command:
|
||||||
|
|
||||||
These are the metrics exported by reading data from the fail2ban server socket.
|
```text
|
||||||
All metrics are prefixed with `f2b_`.
|
Status for the jail: sshd
|
||||||
|
|- Filter
|
||||||
Exposed metrics:
|
|
||||||
* `up` - Returns 1 if the fail2ban server is up and connection succeeds
|
|
||||||
* `errors` - Number of errors since startup
|
|
||||||
* `db` - Errors connecting to the database
|
|
||||||
* `socket_conn` - Errors connecting to the fail2ban socket (e.g. connection refused)
|
|
||||||
* `socket_req` - Errors sending requests to the fail2ban server (e.g. invalid responses)
|
|
||||||
* `jail_count` - Number of jails configured in fail2ban
|
|
||||||
* `jail_banned_current` (per jail) - Number of IPs currently banned
|
|
||||||
* `jail_banned_total` (per jail) - Total number of banned IPs since fail2ban startup (includes expired bans)
|
|
||||||
* `jail_failed_current` (per jail) - Number of current failures
|
|
||||||
* `jail_failed_total` (per jail) - Total number of failures since fail2ban startup
|
|
||||||
* `jail_config_ban_time` (per jail) - How long an IP is banned for in this jail (in seconds)
|
|
||||||
* `jail_config_find_time` (per jail) - How far back the filter will look for failures in this jail (in seconds)
|
|
||||||
* `jail_config_max_retry` (per jail) - The max number of failures allowed before banning an IP in this jail
|
|
||||||
* `version` - Version string of the exporter and fail2ban
|
|
||||||
|
|
||||||
**Sample**
|
|
||||||
|
|
||||||
```
|
|
||||||
# HELP f2b_errors Number of errors found since startup
|
|
||||||
# TYPE f2b_errors counter
|
|
||||||
f2b_errors{type="db"} 0
|
|
||||||
f2b_errors{type="socket_conn"} 0
|
|
||||||
f2b_errors{type="socket_req"} 0
|
|
||||||
# HELP f2b_jail_banned_current Number of IPs currently banned in this jail
|
|
||||||
# TYPE f2b_jail_banned_current gauge
|
|
||||||
f2b_jail_banned_current{jail="recidive"} 5
|
|
||||||
f2b_jail_banned_current{jail="sshd"} 15
|
|
||||||
# HELP f2b_jail_banned_total Total number of IPs banned by this jail (includes expired bans)
|
|
||||||
# TYPE f2b_jail_banned_total gauge
|
|
||||||
f2b_jail_banned_total{jail="recidive"} 6
|
|
||||||
f2b_jail_banned_total{jail="sshd"} 31
|
|
||||||
# HELP f2b_jail_count Number of defined jails
|
|
||||||
# TYPE f2b_jail_count gauge
|
|
||||||
f2b_jail_count 2
|
|
||||||
# HELP f2b_jail_failed_current Number of current failures on this jail's filter
|
|
||||||
# TYPE f2b_jail_failed_current gauge
|
|
||||||
f2b_jail_failed_current{jail="recidive"} 5
|
|
||||||
f2b_jail_failed_current{jail="sshd"} 6
|
|
||||||
# HELP f2b_jail_failed_total Number of total failures on this jail's filter
|
|
||||||
# TYPE f2b_jail_failed_total gauge
|
|
||||||
f2b_jail_failed_total{jail="recidive"} 7
|
|
||||||
f2b_jail_failed_total{jail="sshd"} 125
|
|
||||||
# HELP f2b_config_jail_ban_time How long an IP is banned for in this jail (in seconds)
|
|
||||||
# TYPE f2b_config_jail_ban_time gauge
|
|
||||||
f2b_config_jail_ban_time{jail="recidive"} 604800
|
|
||||||
f2b_config_jail_ban_time{jail="sshd"} 600
|
|
||||||
# HELP f2b_config_jail_find_time How far back will the filter look for failures in this jail (in seconds)
|
|
||||||
# TYPE f2b_config_jail_find_time gauge
|
|
||||||
f2b_config_jail_find_time{jail="recidive"} 86400
|
|
||||||
f2b_config_jail_find_time{jail="sshd"} 600
|
|
||||||
# HELP f2b_config_jail_max_retries The number of failures allowed until the IP is banned by this jail
|
|
||||||
# TYPE f2b_config_jail_max_retries gauge
|
|
||||||
f2b_config_jail_max_retries{jail="recidive"} 5
|
|
||||||
f2b_config_jail_max_retries{jail="sshd"} 5
|
|
||||||
# HELP f2b_up Check if the fail2ban server is up
|
|
||||||
# TYPE f2b_up gauge
|
|
||||||
f2b_up 1
|
|
||||||
# HELP f2b_version Version of the exporter and fail2ban server
|
|
||||||
# TYPE f2b_version gauge
|
|
||||||
f2b_version{exporter="0.3.0",fail2ban="0.11.1"} 1
|
|
||||||
```
|
|
||||||
|
|
||||||
The metrics above correspond to the matching fields in the `fail2ban-client status <jail>` command:
|
|
||||||
```
|
|
||||||
Status for the jail: sshd|- Filter
|
|
||||||
| |- Currently failed: 6
|
| |- Currently failed: 6
|
||||||
| |- Total failed: 125
|
| |- Total failed: 125
|
||||||
| `- File list: /var/log/auth.log
|
| `- File list: /var/log/auth.log
|
||||||
@@ -205,23 +106,109 @@ Status for the jail: sshd|- Filter
|
|||||||
`- Banned IP list: ...
|
`- Banned IP list: ...
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.2. Textfile Metrics
|
### 2.1. Grafana
|
||||||
|
|
||||||
|
The metrics exported by this tool are compatible with Prometheus and Grafana. A sample grafana dashboard can be found in
|
||||||
|
the [grafana.json](/_examples/grafana/dashboard.json) file. Just import the contents of this file into a new Grafana
|
||||||
|
dashboard to get started.
|
||||||
|
|
||||||
|
The dashboard supports displaying data from multiple exporters. Use the `instance` dashboard variable to select which
|
||||||
|
ones to display.
|
||||||
|
|
||||||
|
*(Sample dashboard is compatible with Grafana `9.1.8` and above)*
|
||||||
|
|
||||||
|
## 3. Configuration
|
||||||
|
|
||||||
|
The exporter is configured with CLI flags and environment variables. There are no configuration files.
|
||||||
|
|
||||||
|
### CLI flags
|
||||||
|
|
||||||
|
```text
|
||||||
|
🚀 Collect prometheus metrics from a running Fail2Ban instance
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
-h, --help Show context-sensitive help.
|
||||||
|
-v, --version Show version info and exit
|
||||||
|
--dry-run Attempt to connect to the fail2ban socket then exit
|
||||||
|
before starting the server
|
||||||
|
--web.listen-address=":9191" Address to use for the metrics server
|
||||||
|
($F2B_WEB_LISTEN_ADDRESS)
|
||||||
|
--collector.f2b.socket="/var/run/fail2ban/fail2ban.sock"
|
||||||
|
Path to the fail2ban server socket
|
||||||
|
($F2B_COLLECTOR_SOCKET)
|
||||||
|
--collector.f2b.exit-on-socket-connection-error
|
||||||
|
When set to true the exporter will immediately
|
||||||
|
exit on a fail2ban socket connection error
|
||||||
|
($F2B_EXIT_ON_SOCKET_CONN_ERROR)
|
||||||
|
--collector.textfile.directory=STRING
|
||||||
|
Directory to read text files with metrics from
|
||||||
|
($F2B_COLLECTOR_TEXT_PATH)
|
||||||
|
--web.basic-auth.username=STRING
|
||||||
|
Username to use to protect endpoints with basic auth
|
||||||
|
($F2B_WEB_BASICAUTH_USER)
|
||||||
|
--web.basic-auth.password=STRING
|
||||||
|
Password to use to protect endpoints with basic auth
|
||||||
|
($F2B_WEB_BASICAUTH_PASS)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Environment variables
|
||||||
|
|
||||||
|
Each environment variable corresponds to a CLI flag. If both are specified, the CLI flag takes precedence.
|
||||||
|
|
||||||
|
| Environment variable | Corresponding CLI flag |
|
||||||
|
|---------------------------------|---------------------------------------------------|
|
||||||
|
| `F2B_COLLECTOR_SOCKET` | `--collector.f2b.socket` |
|
||||||
|
| `F2B_COLLECTOR_TEXT_PATH` | `--collector.textfile.directory` |
|
||||||
|
| `F2B_WEB_LISTEN_ADDRESS` | `--web.listen-address` |
|
||||||
|
| `F2B_WEB_BASICAUTH_USER` | `--web.basic-auth.username` |
|
||||||
|
| `F2B_WEB_BASICAUTH_PASS` | `--web.basic-auth.password` |
|
||||||
|
| `F2B_EXIT_ON_SOCKET_CONN_ERROR` | `--collector.f2b.exit-on-socket-connection-error` |
|
||||||
|
|
||||||
|
## 4. Building from source
|
||||||
|
|
||||||
|
Building from source has the following dependencies:
|
||||||
|
|
||||||
|
- Go v1.20
|
||||||
|
- Make
|
||||||
|
|
||||||
|
From there, simply run `make build`
|
||||||
|
|
||||||
|
This will download the necessary dependencies and build a `fail2ban_exporter` binary in the root of the project.
|
||||||
|
|
||||||
|
## 5. Textfile metrics
|
||||||
|
|
||||||
For more flexibility the exporter also allows exporting metrics collected from a text file.
|
For more flexibility the exporter also allows exporting metrics collected from a text file.
|
||||||
|
|
||||||
To enable textfile metrics:
|
To enable textfile metrics provide the directory to read files from with the `--collector.textfile.directory` flag.
|
||||||
1. Enable the collector with `-collector.textfile=true`
|
|
||||||
2. Provide the directory to read files from with the `-collector.textfile.directory` flag
|
|
||||||
|
|
||||||
Metrics collected from these files will be exposed directly alongside the other metrics without any additional processing.
|
Metrics collected from these files will be exposed directly alongside the other metrics without any additional
|
||||||
This means that it is the responsibility of the file creator to ensure the format is correct.
|
processing. This means that it is the responsibility of the file creator to ensure the format is correct.
|
||||||
|
|
||||||
By exporting textfile metrics an extra metric is also exported with an error count for each file:
|
By exporting textfile metrics an extra metric is also exported with an error count for each file:
|
||||||
|
|
||||||
```
|
```text
|
||||||
# HELP textfile_error Checks for errors while reading text files
|
# HELP textfile_error Checks for errors while reading text files
|
||||||
# TYPE textfile_error gauge
|
# TYPE textfile_error gauge
|
||||||
textfile_error{path="file.prom"} 0
|
textfile_error{path="file.prom"} 0
|
||||||
```
|
```
|
||||||
|
|
||||||
**NOTE:** Any file not ending with `.prom` will be ignored.
|
**NOTE:** Any file not ending with `.prom` will be ignored.
|
||||||
|
|
||||||
|
### Running in Docker
|
||||||
|
|
||||||
|
To collect textfile metrics inside a docker container, a couple of things need to be done:
|
||||||
|
|
||||||
|
1. Mount the folder with the metrics files
|
||||||
|
2. Set the `F2B_COLLECTOR_TEXT_PATH` environment variable
|
||||||
|
|
||||||
|
*For example:*
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker run -d \
|
||||||
|
--name "fail2ban-exporter" \
|
||||||
|
-v /var/run/fail2ban:/var/run/fail2ban:ro \
|
||||||
|
-v /path/to/metrics:/app/metrics/:ro \
|
||||||
|
-e F2B_COLLECTOR_TEXT_PATH=/app/metrics \
|
||||||
|
-p "9191:9191" \
|
||||||
|
registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,877 @@
|
|||||||
|
{
|
||||||
|
"__inputs": [
|
||||||
|
{
|
||||||
|
"name": "DS_PROMETHEUS",
|
||||||
|
"label": "Prometheus",
|
||||||
|
"description": "",
|
||||||
|
"type": "datasource",
|
||||||
|
"pluginId": "prometheus",
|
||||||
|
"pluginName": "Prometheus"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__elements": {},
|
||||||
|
"__requires": [
|
||||||
|
{
|
||||||
|
"type": "grafana",
|
||||||
|
"id": "grafana",
|
||||||
|
"name": "Grafana",
|
||||||
|
"version": "9.1.8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "datasource",
|
||||||
|
"id": "prometheus",
|
||||||
|
"name": "Prometheus",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "table",
|
||||||
|
"name": "Table",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "timeseries",
|
||||||
|
"name": "Time series",
|
||||||
|
"version": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": {
|
||||||
|
"type": "datasource",
|
||||||
|
"uid": "grafana"
|
||||||
|
},
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"target": {
|
||||||
|
"limit": 100,
|
||||||
|
"matchAny": false,
|
||||||
|
"tags": [],
|
||||||
|
"type": "dashboard"
|
||||||
|
},
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"editable": true,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"graphTooltip": 2,
|
||||||
|
"id": null,
|
||||||
|
"links": [],
|
||||||
|
"liveNow": false,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"align": "auto",
|
||||||
|
"displayMode": "auto",
|
||||||
|
"inspect": false
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byRegexp",
|
||||||
|
"options": ".*Time"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "unit",
|
||||||
|
"value": "s"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 6,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 206,
|
||||||
|
"options": {
|
||||||
|
"footer": {
|
||||||
|
"fields": "",
|
||||||
|
"reducer": [
|
||||||
|
"sum"
|
||||||
|
],
|
||||||
|
"show": false
|
||||||
|
},
|
||||||
|
"showHeader": true
|
||||||
|
},
|
||||||
|
"pluginVersion": "9.1.8",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": false,
|
||||||
|
"expr": "f2b_config_jail_max_retries{instance=~\"$instance\"}",
|
||||||
|
"format": "table",
|
||||||
|
"instant": true,
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}}",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": false,
|
||||||
|
"expr": "f2b_config_jail_ban_time{instance=~\"$instance\"}",
|
||||||
|
"format": "table",
|
||||||
|
"hide": false,
|
||||||
|
"instant": true,
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}}",
|
||||||
|
"refId": "B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": false,
|
||||||
|
"expr": "f2b_config_jail_find_time{instance=~\"$instance\"}",
|
||||||
|
"format": "table",
|
||||||
|
"hide": false,
|
||||||
|
"instant": true,
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}}",
|
||||||
|
"refId": "C"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "F2B Config",
|
||||||
|
"transformations": [
|
||||||
|
{
|
||||||
|
"id": "merge",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "groupBy",
|
||||||
|
"options": {
|
||||||
|
"fields": {
|
||||||
|
"Value #A": {
|
||||||
|
"aggregations": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"operation": "aggregate"
|
||||||
|
},
|
||||||
|
"Value #B": {
|
||||||
|
"aggregations": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"operation": "aggregate"
|
||||||
|
},
|
||||||
|
"Value #C": {
|
||||||
|
"aggregations": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"operation": "aggregate"
|
||||||
|
},
|
||||||
|
"instance": {
|
||||||
|
"aggregations": [],
|
||||||
|
"operation": "groupby"
|
||||||
|
},
|
||||||
|
"jail": {
|
||||||
|
"aggregations": [],
|
||||||
|
"operation": "groupby"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {},
|
||||||
|
"indexByName": {},
|
||||||
|
"renameByName": {
|
||||||
|
"Value #A (lastNotNull)": "Max Retries",
|
||||||
|
"Value #B (lastNotNull)": "Ban Time",
|
||||||
|
"Value #C (lastNotNull)": "Find Time",
|
||||||
|
"jail": "Jail"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transparent": true,
|
||||||
|
"type": "table"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 6
|
||||||
|
},
|
||||||
|
"id": 190,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_jail_failed_total{instance=~\"$instance\"}",
|
||||||
|
"hide": false,
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}} ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Failures (Total)",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 6
|
||||||
|
},
|
||||||
|
"id": 191,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_jail_banned_total{instance=~\"$instance\"}",
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}} ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Bans (Total)",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 14
|
||||||
|
},
|
||||||
|
"id": 208,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_jail_failed_current{instance=~\"$instance\"}",
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}} ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Failures (Current)",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 14
|
||||||
|
},
|
||||||
|
"id": 209,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_jail_banned_current{instance=~\"$instance\"}",
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{jail}} ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Bans (Current)",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 22
|
||||||
|
},
|
||||||
|
"id": 203,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_up{instance=~\"$instance\"}",
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "Up ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Up",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisCenteredZero": false,
|
||||||
|
"axisColorMode": "text",
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": true,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"max": 1,
|
||||||
|
"min": 0,
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "short"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 5,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 22
|
||||||
|
},
|
||||||
|
"id": 204,
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"displayMode": "table",
|
||||||
|
"placement": "right",
|
||||||
|
"showLegend": true
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single",
|
||||||
|
"sort": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"editorMode": "code",
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "f2b_errors{instance=~\"$instance\"}",
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "{{type}} ({{instance}})",
|
||||||
|
"range": true,
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Fail2Ban Exporter Errors",
|
||||||
|
"transparent": true,
|
||||||
|
"type": "timeseries"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": "30s",
|
||||||
|
"schemaVersion": 37,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"selected": false,
|
||||||
|
"text": "Prometheus",
|
||||||
|
"value": "Prometheus"
|
||||||
|
},
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Data Source",
|
||||||
|
"multi": false,
|
||||||
|
"name": "DataSource",
|
||||||
|
"options": [],
|
||||||
|
"query": "prometheus",
|
||||||
|
"queryValue": "",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"type": "datasource"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "prometheus"
|
||||||
|
},
|
||||||
|
"definition": "f2b_up",
|
||||||
|
"description": "Select which instance(s) to show",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Instance",
|
||||||
|
"multi": true,
|
||||||
|
"name": "instance",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"query": "f2b_up",
|
||||||
|
"refId": "StandardVariableQuery"
|
||||||
|
},
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "/.*instance=\"([^\"]+)\"/",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"type": "query"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-6h",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "F2B",
|
||||||
|
"uid": "cTkH9AT7z",
|
||||||
|
"version": 3,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Systemd
|
||||||
|
|
||||||
|
The `.service` file in this directory should be copied to the `/etc/systemd/system/` folder.
|
||||||
|
|
||||||
|
- It expects the binary file to be installed at `/usr/sbin/fail2ban_exporter`.
|
||||||
|
- It expects a user named `fail2ban_exporter` to exist. This user should not have a shell or any special privileges
|
||||||
|
aside from read-access to the fail2ban socket file.
|
||||||
|
|
||||||
|
The `ExecStart` line can be modified to add any custom CLI flags.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Fail2Ban Exporter
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=fail2ban_exporter
|
||||||
|
ExecStart=/usr/sbin/fail2ban_exporter
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewBasicAuthProvider(username, password string) AuthProvider {
|
||||||
|
return &basicAuthProvider{
|
||||||
|
hashedAuth: encodeBasicAuth(username, password),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type basicAuthProvider struct {
|
||||||
|
hashedAuth string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *basicAuthProvider) IsAllowed(request *http.Request) bool {
|
||||||
|
username, password, ok := request.BasicAuth()
|
||||||
|
if !ok {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
requestAuth := encodeBasicAuth(username, password)
|
||||||
|
return p.hashedAuth == requestAuth
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeBasicAuth(username, password string) string {
|
||||||
|
return HashString(fmt.Sprintf("%s:%s", username, password))
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_GIVEN_BasicAuthSet_WHEN_CallingIsAllowedWithCorrectCreds_THEN_TrueReturned(t *testing.T) {
|
||||||
|
// assemble
|
||||||
|
username := "u1"
|
||||||
|
password := HashString("abc")
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
request.SetBasicAuth(username, password)
|
||||||
|
provider := NewBasicAuthProvider(username, password)
|
||||||
|
|
||||||
|
// act
|
||||||
|
result := provider.IsAllowed(request)
|
||||||
|
|
||||||
|
// assert
|
||||||
|
if !result {
|
||||||
|
t.Errorf("expected request to be allowed, but failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_GIVEN_BasicAuthSet_WHEN_CallingIsAllowedWithoutCreds_THEN_FalseReturned(t *testing.T) {
|
||||||
|
// assemble
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
provider := NewBasicAuthProvider("u1", "p1")
|
||||||
|
|
||||||
|
// act
|
||||||
|
result := provider.IsAllowed(request)
|
||||||
|
|
||||||
|
// assert
|
||||||
|
if result {
|
||||||
|
t.Errorf("expected request to be denied, but was allowed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_GIVEN_BasicAuthSet_WHEN_CallingIsAllowedWithWrongCreds_THEN_FalseReturned(t *testing.T) {
|
||||||
|
// assemble
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
request.SetBasicAuth("wrong", "pw")
|
||||||
|
provider := NewBasicAuthProvider("u1", "p1")
|
||||||
|
|
||||||
|
// act
|
||||||
|
result := provider.IsAllowed(request)
|
||||||
|
|
||||||
|
// assert
|
||||||
|
if result {
|
||||||
|
t.Errorf("expected request to be denied, but was allowed")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
func NewEmptyAuthProvider() AuthProvider {
|
||||||
|
return &emptyAuthProvider{}
|
||||||
|
}
|
||||||
|
|
||||||
|
type emptyAuthProvider struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *emptyAuthProvider) IsAllowed(request *http.Request) bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_GIVEN_EmptyAuth_WHEN_CallingIsAllowedWithoutAuth_THEN_TrueReturned(t *testing.T) {
|
||||||
|
// assemble
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
provider := NewEmptyAuthProvider()
|
||||||
|
|
||||||
|
// act
|
||||||
|
response := provider.IsAllowed(request)
|
||||||
|
|
||||||
|
// assert
|
||||||
|
if !response {
|
||||||
|
t.Errorf("expected request to be allowed, but failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_GIVEN_EmptyAuth_WHEN_CallingIsAllowedWithAuth_THEN_TrueReturned(t *testing.T) {
|
||||||
|
// assemble
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
request.SetBasicAuth("user", "pass")
|
||||||
|
provider := NewEmptyAuthProvider()
|
||||||
|
|
||||||
|
// act
|
||||||
|
response := provider.IsAllowed(request)
|
||||||
|
|
||||||
|
// assert
|
||||||
|
if !response {
|
||||||
|
t.Errorf("expected request to be allowed, but failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/sha256"
|
||||||
|
"encoding/hex"
|
||||||
|
)
|
||||||
|
|
||||||
|
func hash(data []byte) []byte {
|
||||||
|
if len(data) == 0 {
|
||||||
|
return []byte{}
|
||||||
|
}
|
||||||
|
b := sha256.Sum256(data)
|
||||||
|
return b[:]
|
||||||
|
}
|
||||||
|
|
||||||
|
func HashString(data string) string {
|
||||||
|
return hex.EncodeToString(hash([]byte(data)))
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"reflect"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestHashString(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args string
|
||||||
|
want string
|
||||||
|
}{
|
||||||
|
{"Happy path #1", "123", "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"},
|
||||||
|
{"Happy path #2", "hello world", "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"},
|
||||||
|
{"Happy path #3", "H3Ll0_W0RLD", "d58a27fe9a6e73a1d8a67189fb8acace047e7a1a795276a0056d3717ad61bd0e"},
|
||||||
|
{"Blank string", "", ""},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
if got := HashString(tt.args); !reflect.DeepEqual(got, tt.want) {
|
||||||
|
t.Errorf("HashString() = %v, want %v", got, tt.want)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AuthProvider interface {
|
||||||
|
IsAllowed(*http.Request) bool
|
||||||
|
}
|
||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
package cfg
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
|
"github.com/alecthomas/kong"
|
||||||
|
)
|
||||||
|
|
||||||
|
var cliStruct struct {
|
||||||
|
VersionMode bool `name:"version" short:"v" help:"Show version info and exit"`
|
||||||
|
DryRunMode bool `name:"dry-run" help:"Attempt to connect to the fail2ban socket then exit before starting the server"`
|
||||||
|
ServerAddress string `name:"web.listen-address" env:"F2B_WEB_LISTEN_ADDRESS" help:"Address to use for the metrics server" default:"${default_address}"`
|
||||||
|
F2bSocketPath string `name:"collector.f2b.socket" env:"F2B_COLLECTOR_SOCKET" help:"Path to the fail2ban server socket" default:"${default_socket}"`
|
||||||
|
ExitOnSocketError bool `name:"collector.f2b.exit-on-socket-connection-error" env:"F2B_EXIT_ON_SOCKET_CONN_ERROR" help:"When set to true the exporter will immediately exit on a fail2ban socket connection error"`
|
||||||
|
TextFileExporterPath string `name:"collector.textfile.directory" env:"F2B_COLLECTOR_TEXT_PATH" help:"Directory to read text files with metrics from"`
|
||||||
|
BasicAuthUser string `name:"web.basic-auth.username" env:"F2B_WEB_BASICAUTH_USER" help:"Username to use to protect endpoints with basic auth"`
|
||||||
|
BasicAuthPass string `name:"web.basic-auth.password" env:"F2B_WEB_BASICAUTH_PASS" help:"Password to use to protect endpoints with basic auth"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func Parse() *AppSettings {
|
||||||
|
ctx := kong.Parse(
|
||||||
|
&cliStruct,
|
||||||
|
kong.Vars{
|
||||||
|
"default_socket": "/var/run/fail2ban/fail2ban.sock",
|
||||||
|
"default_address": ":9191",
|
||||||
|
},
|
||||||
|
kong.Name("fail2ban_exporter"),
|
||||||
|
kong.Description("🚀 Export prometheus metrics from a running Fail2Ban instance"),
|
||||||
|
kong.UsageOnError(),
|
||||||
|
)
|
||||||
|
|
||||||
|
validateFlags(ctx)
|
||||||
|
settings := &AppSettings{
|
||||||
|
VersionMode: cliStruct.VersionMode,
|
||||||
|
DryRunMode: cliStruct.DryRunMode,
|
||||||
|
MetricsAddress: cliStruct.ServerAddress,
|
||||||
|
Fail2BanSocketPath: cliStruct.F2bSocketPath,
|
||||||
|
FileCollectorPath: cliStruct.TextFileExporterPath,
|
||||||
|
ExitOnSocketConnError: cliStruct.ExitOnSocketError,
|
||||||
|
AuthProvider: createAuthProvider(),
|
||||||
|
}
|
||||||
|
return settings
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAuthProvider() auth.AuthProvider {
|
||||||
|
username := cliStruct.BasicAuthUser
|
||||||
|
password := cliStruct.BasicAuthPass
|
||||||
|
|
||||||
|
if len(username) == 0 && len(password) == 0 {
|
||||||
|
return auth.NewEmptyAuthProvider()
|
||||||
|
}
|
||||||
|
log.Print("basic auth enabled")
|
||||||
|
return auth.NewBasicAuthProvider(username, password)
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateFlags(cliCtx *kong.Context) {
|
||||||
|
var flagsValid = true
|
||||||
|
var messages = []string{}
|
||||||
|
if !cliStruct.VersionMode {
|
||||||
|
if cliStruct.F2bSocketPath == "" {
|
||||||
|
messages = append(messages, "error: fail2ban socket path must not be blank")
|
||||||
|
flagsValid = false
|
||||||
|
}
|
||||||
|
if cliStruct.ServerAddress == "" {
|
||||||
|
messages = append(messages, "error: invalid server address, must not be blank")
|
||||||
|
flagsValid = false
|
||||||
|
}
|
||||||
|
if (len(cliStruct.BasicAuthUser) > 0) != (len(cliStruct.BasicAuthPass) > 0) {
|
||||||
|
messages = append(messages, "error: to enable basic auth both the username and the password must be provided")
|
||||||
|
flagsValid = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !flagsValid {
|
||||||
|
_ = cliCtx.PrintUsage(false)
|
||||||
|
fmt.Println()
|
||||||
|
for i := 0; i < len(messages); i++ {
|
||||||
|
fmt.Println(messages[i])
|
||||||
|
}
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package cfg
|
||||||
|
|
||||||
|
import "git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
|
|
||||||
|
type AppSettings struct {
|
||||||
|
VersionMode bool
|
||||||
|
DryRunMode bool
|
||||||
|
MetricsAddress string
|
||||||
|
Fail2BanSocketPath string
|
||||||
|
FileCollectorPath string
|
||||||
|
AuthProvider auth.AuthProvider
|
||||||
|
ExitOnSocketConnError bool
|
||||||
|
}
|
||||||
@@ -1,29 +1,33 @@
|
|||||||
package f2b
|
package f2b
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fail2ban-prometheus-exporter/cfg"
|
|
||||||
"fail2ban-prometheus-exporter/socket"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/socket"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
socketPath string
|
socketPath string
|
||||||
exporterVersion string
|
exporterVersion string
|
||||||
lastError error
|
lastError error
|
||||||
dbErrorCount int
|
|
||||||
socketConnectionErrorCount int
|
socketConnectionErrorCount int
|
||||||
socketRequestErrorCount int
|
socketRequestErrorCount int
|
||||||
|
exitOnSocketConnError bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewExporter(appSettings *cfg.AppSettings, exporterVersion string) *Collector {
|
func NewExporter(appSettings *cfg.AppSettings, exporterVersion string) *Collector {
|
||||||
|
log.Printf("reading fail2ban metrics from socket file: %s", appSettings.Fail2BanSocketPath)
|
||||||
|
printFail2BanServerVersion(appSettings.Fail2BanSocketPath)
|
||||||
return &Collector{
|
return &Collector{
|
||||||
socketPath: appSettings.Fail2BanSocketPath,
|
socketPath: appSettings.Fail2BanSocketPath,
|
||||||
exporterVersion: exporterVersion,
|
exporterVersion: exporterVersion,
|
||||||
lastError: nil,
|
lastError: nil,
|
||||||
dbErrorCount: 0,
|
|
||||||
socketConnectionErrorCount: 0,
|
socketConnectionErrorCount: 0,
|
||||||
socketRequestErrorCount: 0,
|
socketRequestErrorCount: 0,
|
||||||
|
exitOnSocketConnError: appSettings.ExitOnSocketConnError,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,8 +46,11 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error opening socket: %v", err)
|
log.Printf("error opening socket: %v", err)
|
||||||
c.socketConnectionErrorCount++
|
c.socketConnectionErrorCount++
|
||||||
|
if c.exitOnSocketConnError {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
defer s.Close()
|
defer func() { _ = s.Close() }()
|
||||||
}
|
}
|
||||||
|
|
||||||
c.collectServerUpMetric(ch, s)
|
c.collectServerUpMetric(ch, s)
|
||||||
@@ -53,3 +60,17 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {
|
|||||||
}
|
}
|
||||||
c.collectErrorCountMetric(ch)
|
c.collectErrorCountMetric(ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func printFail2BanServerVersion(socketPath string) {
|
||||||
|
s, err := socket.ConnectToSocket(socketPath)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error connecting to socket: %v", err)
|
||||||
|
} else {
|
||||||
|
version, err := s.GetServerVersion()
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error interacting with socket: %v", err)
|
||||||
|
} else {
|
||||||
|
log.Printf("successfully connected to fail2ban socket! fail2ban version: %s", version)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package f2b
|
package f2b
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fail2ban-prometheus-exporter/socket"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/socket"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -69,9 +70,6 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (c *Collector) collectErrorCountMetric(ch chan<- prometheus.Metric) {
|
func (c *Collector) collectErrorCountMetric(ch chan<- prometheus.Metric) {
|
||||||
ch <- prometheus.MustNewConstMetric(
|
|
||||||
metricErrorCount, prometheus.CounterValue, float64(c.dbErrorCount), "db",
|
|
||||||
)
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
metricErrorCount, prometheus.CounterValue, float64(c.socketConnectionErrorCount), "socket_conn",
|
metricErrorCount, prometheus.CounterValue, float64(c.socketConnectionErrorCount), "socket_conn",
|
||||||
)
|
)
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package textfile
|
package textfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fail2ban-prometheus-exporter/cfg"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
@@ -20,12 +21,12 @@ type fileData struct {
|
|||||||
|
|
||||||
func NewCollector(appSettings *cfg.AppSettings) *Collector {
|
func NewCollector(appSettings *cfg.AppSettings) *Collector {
|
||||||
collector := &Collector{
|
collector := &Collector{
|
||||||
enabled: appSettings.FileCollectorEnabled,
|
enabled: appSettings.FileCollectorPath != "",
|
||||||
folderPath: appSettings.FileCollectorPath,
|
folderPath: appSettings.FileCollectorPath,
|
||||||
fileMap: make(map[string]*fileData),
|
fileMap: make(map[string]*fileData),
|
||||||
}
|
}
|
||||||
if collector.enabled {
|
if collector.enabled {
|
||||||
log.Printf("collector.textfile directory: %s", collector.folderPath)
|
log.Printf("reading textfile metrics from: %s", collector.folderPath)
|
||||||
}
|
}
|
||||||
return collector
|
return collector
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
package textfile
|
package textfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const namespace = "textfile"
|
const namespace = "textfile"
|
||||||
@@ -19,7 +20,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (c *Collector) collectFileContents() {
|
func (c *Collector) collectFileContents() {
|
||||||
files, err := ioutil.ReadDir(c.folderPath)
|
files, err := os.ReadDir(c.folderPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error reading directory '%s': %v", c.folderPath, err)
|
log.Printf("error reading directory '%s': %v", c.folderPath, err)
|
||||||
return
|
return
|
||||||
@@ -36,7 +37,8 @@ func (c *Collector) collectFileContents() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fullPath := filepath.Join(c.folderPath, fileName)
|
fullPath := filepath.Join(c.folderPath, fileName)
|
||||||
content, err := ioutil.ReadFile(fullPath)
|
// #nosec G304
|
||||||
|
content, err := os.ReadFile(fullPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.appendErrorForPath(fileName)
|
c.appendErrorForPath(fileName)
|
||||||
log.Printf("error reading contents of file '%s': %v", fileName, err)
|
log.Printf("error reading contents of file '%s': %v", fileName, err)
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#/bin/sh
|
|
||||||
|
|
||||||
# Print version to logs for debugging purposes
|
|
||||||
/app/fail2ban-prometheus-exporter -version
|
|
||||||
|
|
||||||
socket_path=/var/run/fail2ban/fail2ban.sock
|
|
||||||
textfile_dir=/app/textfile/
|
|
||||||
textfile_enabled=false
|
|
||||||
|
|
||||||
# Enable textfile metrics if the folder exists (i.e. was mounted by docker)
|
|
||||||
if [ -d $textfile_dir ]; then
|
|
||||||
textfile_enabled=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start the exporter (use exec to support graceful shutdown)
|
|
||||||
# Inspired by: https://akomljen.com/stopping-docker-containers-gracefully/
|
|
||||||
exec /app/fail2ban-prometheus-exporter \
|
|
||||||
-socket "$socket_path" \
|
|
||||||
-collector.textfile=$textfile_enabled \
|
|
||||||
-collector.textfile.directory="$textfile_dir"
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# F2B_COLLECTOR_SOCKET=""
|
||||||
|
# F2B_COLLECTOR_TEXT_PATH=""
|
||||||
|
# F2B_WEB_LISTEN_ADDRESS=""
|
||||||
|
# F2B_WEB_BASICAUTH_USER=""
|
||||||
|
# F2B_WEB_BASICAUTH_PASS=""
|
||||||
|
# F2B_EXIT_ON_SOCKET_CONN_ERROR=""
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
module git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
|
|
||||||
|
toolchain go1.26.0
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/alecthomas/kong v1.14.0
|
||||||
|
github.com/kisielk/og-rek v1.3.0
|
||||||
|
github.com/nlpodyssey/gopickle v0.3.0
|
||||||
|
github.com/prometheus/client_golang v1.23.2
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/aristanetworks/gomap v0.0.0-20240919214256-2b26376628e1 // indirect
|
||||||
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
|
github.com/kr/text v0.2.0 // indirect
|
||||||
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
|
github.com/prometheus/client_model v0.6.2 // indirect
|
||||||
|
github.com/prometheus/common v0.66.1 // indirect
|
||||||
|
github.com/prometheus/procfs v0.16.1 // indirect
|
||||||
|
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||||
|
golang.org/x/sys v0.35.0 // indirect
|
||||||
|
golang.org/x/text v0.28.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.36.8 // indirect
|
||||||
|
)
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
||||||
|
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||||
|
github.com/alecthomas/kong v1.14.0 h1:gFgEUZWu2ZmZ+UhyZ1bDhuutbKN1nTtJTwh19Wsn21s=
|
||||||
|
github.com/alecthomas/kong v1.14.0/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I=
|
||||||
|
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
|
||||||
|
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||||
|
github.com/aristanetworks/gomap v0.0.0-20240919214256-2b26376628e1 h1:D5mrqTj0YyG8O2A2SUCuPc2Qf68vyTBaWChSBAJtYJk=
|
||||||
|
github.com/aristanetworks/gomap v0.0.0-20240919214256-2b26376628e1/go.mod h1:v/+Hpx3wuPnPWEwT1unZJsNUe4Pu/y1Y+qAf+xj0Ykg=
|
||||||
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||||
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
|
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||||
|
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
||||||
|
github.com/kisielk/og-rek v1.3.0 h1:lTXdQXqFETZKA//FWH4RBNAuiJ/dofxIwHAidoUZoMk=
|
||||||
|
github.com/kisielk/og-rek v1.3.0/go.mod h1:4at7oxyfBTDilURhNCf7irHWtosJlJl9uyqUqAkrP4w=
|
||||||
|
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||||
|
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||||
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
|
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||||
|
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||||
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||||
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
|
github.com/nlpodyssey/gopickle v0.3.0 h1:BLUE5gxFLyyNOPzlXxt6GoHEMMxD0qhsE4p0CIQyoLw=
|
||||||
|
github.com/nlpodyssey/gopickle v0.3.0/go.mod h1:f070HJ/yR+eLi5WmM1OXJEGaTpuJEUiib19olXgYha0=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||||
|
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||||
|
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||||
|
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||||
|
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
|
||||||
|
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
|
||||||
|
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||||
|
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||||
|
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||||
|
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||||
|
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
|
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||||
|
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||||
|
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||||
|
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
|
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||||
|
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||||
|
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
|
||||||
|
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/f2b"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/server"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
version = "dev"
|
||||||
|
date = "unknown"
|
||||||
|
)
|
||||||
|
|
||||||
|
func printAppVersion() {
|
||||||
|
fmt.Printf("Version: %s\n", version)
|
||||||
|
fmt.Printf("Build date: %s\n", date)
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
appSettings := cfg.Parse()
|
||||||
|
if appSettings.VersionMode {
|
||||||
|
printAppVersion()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
handleGracefulShutdown()
|
||||||
|
log.Printf("fail2ban exporter version %s", version)
|
||||||
|
log.Printf("starting server at %s", appSettings.MetricsAddress)
|
||||||
|
|
||||||
|
f2bCollector := f2b.NewExporter(appSettings, version)
|
||||||
|
prometheus.MustRegister(f2bCollector)
|
||||||
|
|
||||||
|
textFileCollector := textfile.NewCollector(appSettings)
|
||||||
|
prometheus.MustRegister(textFileCollector)
|
||||||
|
|
||||||
|
if !appSettings.DryRunMode {
|
||||||
|
svrErr := server.StartServer(appSettings, textFileCollector)
|
||||||
|
err := <-svrErr
|
||||||
|
log.Fatal(err)
|
||||||
|
} else {
|
||||||
|
log.Print("running in dry-run mode - exiting")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleGracefulShutdown() {
|
||||||
|
var signals = make(chan os.Signal, 1)
|
||||||
|
|
||||||
|
signal.Notify(signals, syscall.SIGTERM)
|
||||||
|
signal.Notify(signals, syscall.SIGINT)
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
sig := <-signals
|
||||||
|
log.Printf("caught signal: %+v", sig)
|
||||||
|
os.Exit(0)
|
||||||
|
}()
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>volker.raschek/renovate-config:default#master",
|
||||||
|
"local>volker.raschek/renovate-config:container#master",
|
||||||
|
"local>volker.raschek/renovate-config:actions#master",
|
||||||
|
"local>volker.raschek/renovate-config:golang#master",
|
||||||
|
"local>volker.raschek/renovate-config:regexp#master"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/auth"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AuthMiddleware(handlerFunc http.HandlerFunc, authProvider auth.AuthProvider) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if authProvider.IsAllowed(r) {
|
||||||
|
handlerFunc.ServeHTTP(w, r)
|
||||||
|
} else {
|
||||||
|
w.WriteHeader(http.StatusUnauthorized)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type testAuthProvider struct {
|
||||||
|
match bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p testAuthProvider) IsAllowed(request *http.Request) bool {
|
||||||
|
return p.match
|
||||||
|
}
|
||||||
|
|
||||||
|
func newTestRequest() *http.Request {
|
||||||
|
return httptest.NewRequest(http.MethodGet, "http://example.com", nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func executeAuthMiddlewareTest(t *testing.T, authMatches bool, expectedCode int, expectedCallCount int) {
|
||||||
|
callCount := 0
|
||||||
|
testHandler := func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
callCount++
|
||||||
|
}
|
||||||
|
|
||||||
|
handler := AuthMiddleware(testHandler, testAuthProvider{match: authMatches})
|
||||||
|
recorder := httptest.NewRecorder()
|
||||||
|
request := newTestRequest()
|
||||||
|
handler.ServeHTTP(recorder, request)
|
||||||
|
|
||||||
|
if recorder.Code != expectedCode {
|
||||||
|
t.Errorf("statusCode = %v, want %v", recorder.Code, expectedCode)
|
||||||
|
}
|
||||||
|
if callCount != expectedCallCount {
|
||||||
|
t.Errorf("callCount = %v, want %v", callCount, expectedCallCount)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_GIVEN_MatchingBasicAuth_WHEN_MethodCalled_THEN_RequestProcessed(t *testing.T) {
|
||||||
|
executeAuthMiddlewareTest(t, true, http.StatusOK, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_GIVEN_NonMatchingBasicAuth_WHEN_MethodCalled_THEN_RequestRejected(t *testing.T) {
|
||||||
|
executeAuthMiddlewareTest(t, false, http.StatusUnauthorized, 0)
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
metricsPath = "/metrics"
|
||||||
|
)
|
||||||
|
|
||||||
|
func rootHtmlHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
_, err := w.Write([]byte(
|
||||||
|
`<html>
|
||||||
|
<head><title>Fail2Ban Exporter</title></head>
|
||||||
|
<body>
|
||||||
|
<h1>Fail2Ban Exporter</h1>
|
||||||
|
<p><a href="` + metricsPath + `">Metrics</a></p>
|
||||||
|
</body>
|
||||||
|
</html>`))
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error handling root url: %v", err)
|
||||||
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func metricHandler(w http.ResponseWriter, r *http.Request, collector *textfile.Collector) {
|
||||||
|
promhttp.Handler().ServeHTTP(w, r)
|
||||||
|
collector.WriteTextFileMetrics(w, r)
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/cfg"
|
||||||
|
"git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter/collector/textfile"
|
||||||
|
)
|
||||||
|
|
||||||
|
func StartServer(
|
||||||
|
appSettings *cfg.AppSettings,
|
||||||
|
textFileCollector *textfile.Collector,
|
||||||
|
) chan error {
|
||||||
|
http.HandleFunc("/", AuthMiddleware(
|
||||||
|
rootHtmlHandler,
|
||||||
|
appSettings.AuthProvider,
|
||||||
|
))
|
||||||
|
http.HandleFunc(metricsPath, AuthMiddleware(
|
||||||
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
metricHandler(w, r, textFileCollector)
|
||||||
|
},
|
||||||
|
appSettings.AuthProvider,
|
||||||
|
))
|
||||||
|
log.Printf("metrics available at '%s'", metricsPath)
|
||||||
|
|
||||||
|
svrErr := make(chan error)
|
||||||
|
go func() {
|
||||||
|
httpServer := &http.Server{
|
||||||
|
Addr: appSettings.MetricsAddress,
|
||||||
|
ReadHeaderTimeout: 10 * time.Second,
|
||||||
|
ReadTimeout: 10 * time.Second,
|
||||||
|
WriteTimeout: 10 * time.Second,
|
||||||
|
IdleTimeout: 30 * time.Second,
|
||||||
|
}
|
||||||
|
svrErr <- httpServer.ListenAndServe()
|
||||||
|
}()
|
||||||
|
log.Print("ready")
|
||||||
|
return svrErr
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/nlpodyssey/gopickle/pickle"
|
"github.com/nlpodyssey/gopickle/pickle"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -59,10 +60,10 @@ func (s *Fail2BanSocket) read() (interface{}, error) {
|
|||||||
unpickler := pickle.NewUnpickler(bufReader)
|
unpickler := pickle.NewUnpickler(bufReader)
|
||||||
|
|
||||||
unpickler.FindClass = func(module, name string) (interface{}, error) {
|
unpickler.FindClass = func(module, name string) (interface{}, error) {
|
||||||
if module == "builtins" && name == "str" {
|
if (module == "builtins" || module == "__builtin__") && name == "str" {
|
||||||
return &Py_builtins_str{}, nil
|
return &Py_builtins_str{}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("class not found: " + module + " : " + name)
|
return nil, fmt.Errorf("class not found: %s: %s", module, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
return unpickler.Load()
|
return unpickler.Load()
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package cfg
|
|
||||||
|
|
||||||
import (
|
|
||||||
"flag"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
minServerPort = 1000
|
|
||||||
maxServerPort = 65535
|
|
||||||
)
|
|
||||||
|
|
||||||
type AppSettings struct {
|
|
||||||
VersionMode bool
|
|
||||||
MetricsPort int
|
|
||||||
Fail2BanSocketPath string
|
|
||||||
FileCollectorPath string
|
|
||||||
FileCollectorEnabled bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func Parse() *AppSettings {
|
|
||||||
appSettings := &AppSettings{}
|
|
||||||
flag.BoolVar(&appSettings.VersionMode, "version", false, "show version info and exit")
|
|
||||||
flag.IntVar(&appSettings.MetricsPort, "port", 9191, "port to use for the metrics server")
|
|
||||||
flag.StringVar(&appSettings.Fail2BanSocketPath, "socket", "", "path to the fail2ban server socket")
|
|
||||||
flag.BoolVar(&appSettings.FileCollectorEnabled, "collector.textfile", false, "enable the textfile collector")
|
|
||||||
flag.StringVar(&appSettings.FileCollectorPath, "collector.textfile.directory", "", "directory to read text files with metrics from")
|
|
||||||
|
|
||||||
// deprecated: to be removed in next version
|
|
||||||
_ = flag.String("db", "", "path to the fail2ban sqlite database (removed)")
|
|
||||||
|
|
||||||
flag.Parse()
|
|
||||||
appSettings.validateFlags()
|
|
||||||
return appSettings
|
|
||||||
}
|
|
||||||
|
|
||||||
func (settings *AppSettings) validateFlags() {
|
|
||||||
var flagsValid = true
|
|
||||||
if !settings.VersionMode {
|
|
||||||
if settings.Fail2BanSocketPath == "" {
|
|
||||||
fmt.Println("fail2ban socket path must not be blank")
|
|
||||||
flagsValid = false
|
|
||||||
}
|
|
||||||
if settings.MetricsPort < minServerPort || settings.MetricsPort > maxServerPort {
|
|
||||||
fmt.Printf("invalid server port, must be within %d and %d (found %d)\n",
|
|
||||||
minServerPort, maxServerPort, settings.MetricsPort)
|
|
||||||
flagsValid = false
|
|
||||||
}
|
|
||||||
if settings.FileCollectorEnabled && settings.FileCollectorPath == "" {
|
|
||||||
fmt.Printf("file collector directory path must not be empty if collector enabled\n")
|
|
||||||
flagsValid = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !flagsValid {
|
|
||||||
flag.Usage()
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fail2ban-prometheus-exporter/cfg"
|
|
||||||
"fail2ban-prometheus-exporter/collector/f2b"
|
|
||||||
"fail2ban-prometheus-exporter/collector/textfile"
|
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
metricsPath = "/metrics"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
version = "dev"
|
|
||||||
commit = "none"
|
|
||||||
date = "unknown"
|
|
||||||
builtBy = "unknown"
|
|
||||||
)
|
|
||||||
|
|
||||||
func printAppVersion() {
|
|
||||||
fmt.Println(version)
|
|
||||||
fmt.Printf(" build date: %s\r\n commit hash: %s\r\n built by: %s\r\n", date, commit, builtBy)
|
|
||||||
}
|
|
||||||
|
|
||||||
func rootHtmlHandler(w http.ResponseWriter, r *http.Request) {
|
|
||||||
_, err := w.Write([]byte(
|
|
||||||
`<html>
|
|
||||||
<head><title>Fail2Ban Exporter</title></head>
|
|
||||||
<body>
|
|
||||||
<h1>Fail2Ban Exporter</h1>
|
|
||||||
<p><a href="` + metricsPath + `">Metrics</a></p>
|
|
||||||
</body>
|
|
||||||
</html>`))
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("error handling root url: %v", err)
|
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func metricHandler(w http.ResponseWriter, r *http.Request, collector *textfile.Collector) {
|
|
||||||
promhttp.Handler().ServeHTTP(w, r)
|
|
||||||
collector.WriteTextFileMetrics(w, r)
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
appSettings := cfg.Parse()
|
|
||||||
if appSettings.VersionMode {
|
|
||||||
printAppVersion()
|
|
||||||
} else {
|
|
||||||
addr := fmt.Sprintf("0.0.0.0:%d", appSettings.MetricsPort)
|
|
||||||
|
|
||||||
log.Printf("starting fail2ban exporter at %s", addr)
|
|
||||||
|
|
||||||
f2bCollector := f2b.NewExporter(appSettings, version)
|
|
||||||
prometheus.MustRegister(f2bCollector)
|
|
||||||
|
|
||||||
textFileCollector := textfile.NewCollector(appSettings)
|
|
||||||
prometheus.MustRegister(textFileCollector)
|
|
||||||
|
|
||||||
http.HandleFunc("/", rootHtmlHandler)
|
|
||||||
http.HandleFunc(metricsPath, func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
metricHandler(w, r, textFileCollector)
|
|
||||||
})
|
|
||||||
log.Printf("metrics available at '%s'", metricsPath)
|
|
||||||
|
|
||||||
svrErr := make(chan error)
|
|
||||||
go func() {
|
|
||||||
svrErr <- http.ListenAndServe(addr, nil)
|
|
||||||
}()
|
|
||||||
log.Print("ready")
|
|
||||||
|
|
||||||
err := <-svrErr
|
|
||||||
log.Print(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
module fail2ban-prometheus-exporter
|
|
||||||
|
|
||||||
go 1.15
|
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/kisielk/og-rek v1.1.0
|
|
||||||
github.com/nlpodyssey/gopickle v0.1.0
|
|
||||||
github.com/prometheus/client_golang v1.9.0
|
|
||||||
)
|
|
||||||
-404
@@ -1,404 +0,0 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
|
||||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
|
||||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
|
||||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
|
||||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
|
||||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
|
||||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
|
||||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
|
||||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
|
||||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
|
||||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
|
||||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
|
||||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
|
||||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
|
||||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
|
||||||
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
|
|
||||||
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
|
||||||
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
|
|
||||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
|
||||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
|
||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
|
||||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
|
||||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
|
||||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
|
||||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
|
||||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
|
||||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
|
||||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
|
||||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
|
||||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
|
||||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
|
||||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
|
||||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
|
||||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
|
||||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
|
||||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
|
||||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
|
||||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
|
||||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
|
||||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
|
||||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
|
||||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
|
||||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
|
||||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
|
||||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
|
||||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
|
||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
|
||||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
|
||||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
|
||||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
|
||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
|
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
|
||||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
|
||||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
|
||||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
|
||||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
|
||||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
|
||||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
|
||||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
|
||||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
|
||||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
|
||||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
|
||||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
|
||||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
|
||||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
|
||||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
|
||||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
|
||||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
|
||||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
|
||||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
|
||||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
|
||||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
|
||||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
|
||||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
|
||||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
|
||||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
|
||||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
|
||||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
||||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
||||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
|
||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
|
||||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
|
||||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
||||||
github.com/kisielk/og-rek v1.1.0 h1:u10TvQbPtrlY/6H4+BiFsBywwSVTGFsx0YOVtpx3IbI=
|
|
||||||
github.com/kisielk/og-rek v1.1.0/go.mod h1:6ihsOSzSAxR/65S3Bn9zNihoEqRquhDQZ2c6I2+MG3c=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|
||||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
|
||||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
|
||||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
|
||||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
|
||||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
|
||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
|
||||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
|
||||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
|
||||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
|
||||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
|
||||||
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
|
|
||||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
|
||||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
|
||||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
|
||||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
|
||||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
|
||||||
github.com/nlpodyssey/gopickle v0.1.0 h1:9wjwRqXsOSYWZl4c4ko472b6RW+VB1I441ZcfFg1r5g=
|
|
||||||
github.com/nlpodyssey/gopickle v0.1.0/go.mod h1:YIUwjJ2O7+vnBsxUN+MHAAI3N+adqEGiw+nDpwW95bY=
|
|
||||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
|
||||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
|
||||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
|
||||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
|
||||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
|
||||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
|
||||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
|
||||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
|
||||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
|
|
||||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
|
||||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
|
||||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
|
||||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
|
|
||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
|
||||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
|
||||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
|
||||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
|
||||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
|
||||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
|
||||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
|
||||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
|
|
||||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
|
||||||
github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU=
|
|
||||||
github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
|
||||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
|
||||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
|
||||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
|
||||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
|
||||||
github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=
|
|
||||||
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
|
|
||||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
|
||||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
|
||||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
|
||||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
|
||||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
|
||||||
github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
|
|
||||||
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
|
||||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
|
||||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
|
||||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
|
||||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
|
||||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
|
||||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
|
||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
|
||||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
|
||||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
|
||||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
|
||||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
|
||||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
|
||||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
|
||||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
|
||||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
|
||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
|
||||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
|
||||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
|
||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
|
||||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
|
||||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
|
||||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
|
||||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
|
||||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
|
||||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
|
||||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
|
||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
|
||||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
|
||||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
|
||||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
|
||||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
|
||||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
|
||||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs=
|
|
||||||
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
||||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
|
||||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
|
||||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
|
||||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
|
||||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
|
||||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
|
||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
|
||||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
|
||||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
|
||||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
|
||||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
|
||||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
|
||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
|
||||||
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
|
||||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
|
||||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
|
||||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
|
||||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
|
||||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
|
||||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
|
||||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
|
||||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
|
||||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Prometheus exporter for fail2ban metrics
|
||||||
|
Requires=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=/etc/conf.d/EXECUTABLE
|
||||||
|
ExecStart=/usr/bin/EXECUTABLE
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
|
||||||
|
# NOTE: Would be great to create and use a dedicated user/group via
|
||||||
|
# sysusers.conf to access the fail2ban socket, but currently it is no possible
|
||||||
|
# without manual configuration of the fail2ban daemon.
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
# CHANGELOG
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
|
|
||||||
|
|
||||||
{{ if .Versions -}}
|
|
||||||
## [Unreleased]
|
|
||||||
{{- if .Unreleased.CommitGroups }}
|
|
||||||
{{ template "commits" .Unreleased.CommitGroups }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if .Unreleased.NoteGroups -}}
|
|
||||||
{{ template "notes" .Unreleased.NoteGroups }}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{ range .Versions -}}
|
|
||||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
|
|
||||||
{{ template "commits" .CommitGroups }}
|
|
||||||
{{- if .NoteGroups -}}
|
|
||||||
{{ template "notes" .NoteGroups }}
|
|
||||||
{{- end -}}
|
|
||||||
{{ end }}
|
|
||||||
---
|
|
||||||
|
|
||||||
*This changelog is automatically generated by [git-chglog]*
|
|
||||||
|
|
||||||
[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
|
|
||||||
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
|
|
||||||
[git-chglog]: https://github.com/git-chglog/git-chglog
|
|
||||||
|
|
||||||
{{- if .Versions }}
|
|
||||||
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...main
|
|
||||||
{{ range .Versions -}}
|
|
||||||
{{ if .Tag.Previous -}}
|
|
||||||
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{- define "notes" }}
|
|
||||||
{{- range . -}}
|
|
||||||
### {{ .Title }}
|
|
||||||
{{ range .Notes -}}
|
|
||||||
- {{ .Body }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{- define "commits" }}
|
|
||||||
{{- range . -}}
|
|
||||||
{{ if or (eq .RawTitle "feat") (eq .RawTitle "fix") }}
|
|
||||||
### {{ .Title }}
|
|
||||||
{{ range .Commits -}}
|
|
||||||
- ({{ .Hash.Short }}) {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Header }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
style: gitlab
|
|
||||||
template: CHANGELOG.tpl.md
|
|
||||||
info:
|
|
||||||
title: CHANGELOG
|
|
||||||
repository_url: https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
|
|
||||||
options:
|
|
||||||
commit_groups:
|
|
||||||
title_maps:
|
|
||||||
feat: Added
|
|
||||||
fix: Fixed
|
|
||||||
revert: Reverted
|
|
||||||
header:
|
|
||||||
pattern: "^(\\w*)\\:\\s(.*)$"
|
|
||||||
pattern_maps:
|
|
||||||
- Type
|
|
||||||
- Subject
|
|
||||||
notes:
|
|
||||||
keywords:
|
|
||||||
- BREAKING CHANGE
|
|
||||||
- Changed
|
|
||||||
- Deprecated
|
|
||||||
- Removed
|
|
||||||
- Security
|
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user