Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from upstream #25

Open
wants to merge 107 commits into
base: scrape-all
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
aed00f2
fix order of steps
oliver006 Feb 25, 2023
75093a3
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Mar 3, 2023
aa3d9f1
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Mar 22, 2023
b6d1eba
fix: support tls for cluster refresh op (#781)
aballman Mar 29, 2023
6502d73
fix order of CI/CD steps
oliver006 Mar 30, 2023
c90630d
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Mar 30, 2023
ea61782
chore(deps): update alpine docker tag to v3.17.3 (#782)
renovate[bot] Mar 30, 2023
b855508
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Mar 30, 2023
b5e0200
feat: Add redis.password-file hot reload via `/-/reload` (#783)
Apr 9, 2023
3836219
remove renovate.json - no more renovate bot
oliver006 Apr 17, 2023
8b68a19
Bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0 (#788)
dependabot[bot] Apr 17, 2023
fba0438
update drone build status badge
oliver006 Apr 22, 2023
46174b4
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1 (#795)
dependabot[bot] May 9, 2023
501745b
Bump github.com/prometheus/client_model from 0.3.0 to 0.4.0 (#796)
dependabot[bot] May 9, 2023
877fcba
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 (#800)
dependabot[bot] May 26, 2023
18abadd
Update docs on multiple lua scripts evaluation (#804)
nantiferov Jun 3, 2023
b9919b0
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#805)
dependabot[bot] Jun 13, 2023
9c227bd
check redis config values, and skip non string replies. (#810)
sergelogvinov Jun 15, 2023
c3efa55
bump alpine container image to alpine:3.18.2
oliver006 Jun 15, 2023
a664031
feat: add option to disable exporting values of keys (#809)
vin01 Jun 17, 2023
812bd07
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0 (#813)
dependabot[bot] Jun 19, 2023
bf28734
Use go 1.20 in `go.mod` (#812)
Ma27 Jul 9, 2023
30861a9
add default build target to Makefile
oliver006 Jul 9, 2023
ba1843f
chore: remove refs to deprecated io/ioutil (#818)
testwill Jul 13, 2023
1b22581
feat: extend stream metrics for redis 7 (#817)
donovanvanheerden Jul 19, 2023
b49a8b8
adjust logging
oliver006 Aug 10, 2023
754f8f0
Fix stream info retrieval (#824)
oliver006 Aug 26, 2023
8d01651
Fix docker build
oliver006 Aug 26, 2023
4df89bf
Update Alpine image to fix security vulnerability (#828)
tunguyen9889 Sep 5, 2023
ef882bd
Bump actions/checkout from 3 to 4 (#829)
dependabot[bot] Sep 13, 2023
fe2c807
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#838)
dependabot[bot] Oct 2, 2023
bab9972
Add metric for pubsubshard_channels (#837)
DriverX Oct 4, 2023
c119fa6
Bump github.com/prometheus/client_model (#840)
dependabot[bot] Oct 9, 2023
82aa26f
Fix cluster refresh failed when using pasword file with isCluster mo…
chetratep Oct 11, 2023
5f819af
Bump github.com/mna/redisc from 1.3.2 to 1.4.0 (#845)
dependabot[bot] Oct 23, 2023
1926aee
fix: removed space before password (#852)
BurningDog Nov 13, 2023
d9341da
Fix nameserver in Dockerfile (#856)
jruatiny Dec 13, 2023
4a6b542
fix scrapping for redis < 4.0 (#860)
jcaspes Dec 17, 2023
fdfadbe
Bump github/codeql-action from 2 to 3 (#861)
dependabot[bot] Dec 20, 2023
a9d587f
feat: add redis sentinel master config (#857)
opan Dec 20, 2023
357e7ac
Add support for loading TLS system certificate store (#858)
stanhu Dec 20, 2023
8b2b2e9
update client info parsing to accept IPv6 addr (#864)
edward-milkey Dec 28, 2023
179216a
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#865)
dependabot[bot] Jan 6, 2024
809380b
Update metrics that missed labels (#866)
opan Jan 16, 2024
27e114b
Add graceful shutdown (#867)
wanghaowei0107 Jan 25, 2024
30ca90e
drone docker
oliver006 Jan 25, 2024
2de2acb
Bump actions/dependency-review-action from 3 to 4 (#871)
dependabot[bot] Jan 31, 2024
020bf3c
Update README.md (#873)
xogoodnow Jan 31, 2024
17d85ea
update golang to 1.21, golangci/golangci-lint to v1.55.2 (#872)
oliver006 Jan 31, 2024
227a050
Add missing rdb metrics (#880)
vin01 Feb 16, 2024
e457d85
Golang 1.22, update golangci/golangci-lint:v1.56.2-alpine, update alp…
oliver006 Feb 17, 2024
99ff138
update sample contrib dashboard with non-Angular widgets (#883)
oliver006 Feb 17, 2024
4b000df
Bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 (#884)
dependabot[bot] Feb 19, 2024
ce9bffb
Bump github.com/gomodule/redigo from 1.8.9 to 1.9.2 (#885)
dependabot[bot] Feb 26, 2024
b660352
Update prometheus/client_golang to v1.19.0, revert go.mod back to 1.2…
oliver006 Feb 28, 2024
1f5f4c9
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#892)
dependabot[bot] Mar 14, 2024
0362451
Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 (#897)
dependabot[bot] Apr 12, 2024
2abd8c1
ValKey changes (#899)
oliver006 Apr 21, 2024
46861ba
Support Docker Compose V2 in Makefile (#900)
bjosv Apr 21, 2024
ef10027
bump test redis 2.8 to redis:2.8.23
oliver006 May 17, 2024
f64528d
Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 (#903)
dependabot[bot] May 17, 2024
19da3bb
Feature: Add collection of mem_total_replication_buffers metric intro…
nantiferov May 24, 2024
2c968d5
Feature: Add option to exclude consumer from Stream metrics (#906)
nantiferov May 30, 2024
de84178
Feature: Add option to skip collecting latency histogram metric (#913)
Nklya May 31, 2024
4b1e805
Bump alpine 3.20 and golang modules (#912)
neiljain Jun 1, 2024
be09bff
update some dependencies
oliver006 Jun 9, 2024
e9871c1
Add flag to skip CONFIG call (#915)
oliver006 Jun 9, 2024
3c779e7
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Jun 26, 2024
9be2665
fix: compatible with stream entry id metric for redis version 6.x/5.x…
gitsang Jul 15, 2024
620cb99
Bump alpine to 3.20.1 to fix CVEs (#921)
neiljain Jul 17, 2024
7415c82
fix: add and update documentation about acl usage (#926)
joostdebruijn Jul 21, 2024
46d980e
fix: stop return metrics when parse float value err (#925)
wilkice Jul 21, 2024
5aeb972
feat: export client-output-buffer-limit (#933)
jdheyburn Aug 9, 2024
55476aa
feat: add label `master_replid` to metric`instance_info` (#924)
wilkice Aug 9, 2024
0d5b5e0
Bump github.com/prometheus/client_golang from 1.19.1 to 1.20.0 (#935)
dependabot[bot] Aug 19, 2024
94a57a2
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Aug 20, 2024
da19ef6
deps github.com/prometheus/client_golang v1.20.1
oliver006 Aug 20, 2024
ec32117
Bump github.com/prometheus/client_golang from 1.20.1 to 1.20.2 (#938)
dependabot[bot] Aug 27, 2024
3cf2d54
add a datasource variable to the dashboard template (#937)
sesxbt Aug 27, 2024
d2e711a
Use Github actions for build & tests (#737)
oliver006 Sep 9, 2024
2831e15
Build and attach release binaries in GH Action (#945)
oliver006 Sep 9, 2024
3526bf7
release cleanup
oliver006 Sep 9, 2024
a2ed356
Bump docker/setup-buildx-action from 2 to 3 (#947)
dependabot[bot] Sep 9, 2024
81b1ddd
Bump github.com/prometheus/client_golang from 1.20.2 to 1.20.3 (#946)
dependabot[bot] Sep 9, 2024
dbeb3c8
Bump actions/setup-go from 3 to 5 (#948)
dependabot[bot] Sep 9, 2024
05b096d
Bump actions/checkout from 3 to 4 (#949)
dependabot[bot] Sep 9, 2024
78631d1
run on PRs
oliver006 Sep 9, 2024
2e45f7e
Merge branch 'master' of https://github.com/oliver006/redis_exporter
oliver006 Sep 9, 2024
262770b
Add Replication Traffic To Exported Metrics (#951)
fluetm Sep 11, 2024
82cc804
Support exporting `configured_hz` from info server (#944)
justinmir Sep 19, 2024
827e6b5
fix gofmt
oliver006 Sep 21, 2024
3ae7e68
Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4 (#954)
dependabot[bot] Sep 29, 2024
1f06f2f
Feature: Add redis search module metrics (#953)
nantiferov Oct 5, 2024
f1bafc8
Re-implement connected_client to have deterministic cardinality (#950)
mindw Oct 5, 2024
c59f5c4
Add new Redis 7.x info metrics and other useful ones. (#957)
mindw Oct 8, 2024
6d86815
Hotfix: Fix search_total_indexing_time metric type (#958)
nantiferov Oct 8, 2024
b879136
Misc cleanup (#956)
oliver006 Oct 10, 2024
1928b50
Move docker build and push for releases to Github Actions
oliver006 Oct 14, 2024
267a715
Change total item per DB panel unit to short (#955)
guoard Oct 14, 2024
7ffe57f
support valkey:// and valkeys:// scheme (#959)
oliver006 Oct 15, 2024
8efb8fa
Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 (#960)
dependabot[bot] Oct 26, 2024
d9ccc72
Hotfix: Change type of search_total_cycles/search_total_ms_run metric…
nantiferov Oct 31, 2024
51783a5
Add basic authentication (#967)
joernchen Dec 15, 2024
e2bb7fd
Bump codecov/codecov-action from 4 to 5 (#965)
dependabot[bot] Dec 15, 2024
f163044
maxclients extracted info all (#968)
liuqian1990 Dec 25, 2024
64e3877
Fix: Update CI badge in readme to GH Actions (#970)
Nklya Jan 12, 2025
f99f69a
Fix typo in README.md (#974)
kstephan-wescale Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
622 changes: 0 additions & 622 deletions .drone.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -34,15 +34,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -56,4 +56,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/depsreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
105 changes: 105 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release-binaries:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Build binaries
run: |
make build-all-binaries
ls -la
ls -la .build/
./package-github-binaries.sh
ls -la dist/

- name: Add binaries to release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
allowUpdates: true
omitBodyDuringUpdate: true


build-and-push-docker-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
oliver006/redis_exporter
ghcr.io/oliver006/redis_exporter
quay.io/oliver006/redis_exporter

- name: Build and push scratch image
uses: docker/build-push-action@v6
with:
context: .
target: scratch-release
platforms: linux/amd64,linux/arm,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: "TAG=${{ github.ref_name }},SHA1=${{ github.sha }}"

- name: Build and push alpine image
uses: docker/build-push-action@v6
with:
context: .
target: alpine
platforms: linux/amd64,linux/arm,linux/arm64
push: true
tags: oliver006/redis_exporter:${{ github.ref_name }}-alpine,ghcr.io/oliver006/redis_exporter:${{ github.ref_name }}-alpine,quay.io/oliver006/redis_exporter:${{ github.ref_name }}-alpine,oliver006/redis_exporter:alpine,ghcr.io/oliver006/redis_exporter:alpine,quay.io/oliver006/redis_exporter:alpine
labels: ${{ steps.meta.outputs.labels }}
build-args: "TAG=${{ github.ref_name }},SHA1=${{ github.sha }}"
145 changes: 145 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: Tests

on:
pull_request:
push:
branches:
- master
- "v*"

jobs:
test-stuff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker
uses: docker/setup-buildx-action@v3

- name: Set up Docker Compose
run: sudo apt-get install docker-compose

# need to do this before we start the services as they need the TLS creds
- name: Create test certs for TLS
run: |
make test-certs
chmod 777 ./contrib/tls/*

- name: Start services
run: docker-compose up -d
working-directory: ./

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Install Dependencies
run: go mod tidy

- name: Docker logs
run: |
echo "${{ toJson(job) }}"
docker logs "redis_exporter_redis7-tls_1"
docker logs "redis_exporter_valkey8-tls_1"

- name: Run tests
env:
LOG_LEVEL: "info"
run: |
sleep 15
make checks
make test


- name: Run tests - valkey 8
env:
LOG_LEVEL: "info"
TEST_REDIS_URI: "redis://localhost:16382"
TEST_VALKEY8_TLS_URI: "valkeys://localhost:16386"
TEST_PWD_REDIS_URI: "redis://:redis-password@localhost:16380"
run: |
go test -v -race -p 1 ./...


- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.txt

- name: Stop services
run: docker-compose down
working-directory: ./


lint-stuff:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Install Dependencies
run: go mod tidy

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: "--tests=false"


build-stuff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Install Dependencies
run: go mod tidy

- name: Build some binaries
run: make build-some-amd64-binaries

- name: Generate mixin
run: make mixin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Test Docker Image Build - Alpine
uses: docker/build-push-action@v6
with:
push: false
target: alpine
tags: user/app:tst
file: Dockerfile
build-args: "GOARCH=amd64"

- name: Test Docker Image Build - Scratch
uses: docker/build-push-action@v6
with:
push: false
target: scratch-release
tags: user/app:tst
file: Dockerfile
build-args: "GOARCH=amd64"
18 changes: 11 additions & 7 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
ARG GOARCH
ARG TARGETPLATFORM

#
# build container
#
FROM --platform=linux/amd64 golang:1.20-alpine as builder
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
WORKDIR /go/src/github.com/oliver006/redis_exporter/

ADD . /go/src/github.com/oliver006/redis_exporter/

ARG SHA1="[no-sha]"
ARG TAG="[no-tag]"
ARG GOARCH
ARG TARGETOS
ARG TARGETARCH

#RUN printf "nameserver 1.1.1.1\nnameserver 8.8.8.8"> /etc/resolv.conf \ && apk --no-cache add ca-certificates git

RUN apk --no-cache add ca-certificates git
RUN BUILD_DATE=$(date +%F-%T) CGO_ENABLED=0 GOOS=linux GOARCH=$GOARCH go build -o /redis_exporter \
RUN BUILD_DATE=$(date +%F-%T) CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /redis_exporter \
-ldflags "-s -w -extldflags \"-static\" -X main.BuildVersion=$TAG -X main.BuildCommitSha=$SHA1 -X main.BuildDate=$BUILD_DATE" .

RUN [ "$GOARCH" = "amd64" ] && /redis_exporter -version || ls -la /redis_exporter
RUN [ "$TARGETARCH" = "amd64" ] && /redis_exporter -version || ls -la /redis_exporter

#
# scratch release container
#
FROM --platform=linux/$GOARCH scratch as scratch
FROM scratch AS scratch-release

COPY --from=builder /redis_exporter /redis_exporter
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
Expand All @@ -36,7 +40,7 @@ ENTRYPOINT [ "/redis_exporter" ]
#
# Alpine release container
#
FROM --platform=linux/$GOARCH alpine:3.17.2 as alpine
FROM alpine:3.20 AS alpine

COPY --from=builder /redis_exporter /redis_exporter
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
Expand Down
Loading