Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
9dc402e
Bump golangci/golangci-lint-action from 6.2.0 to 6.5.0 (#1012)
dependabot[bot] Mar 18, 2025
b6fd4be
Bump prometheus/promci from 0.4.6 to 0.4.7 (#1024)
dependabot[bot] Apr 2, 2025
1799ebe
Bump actions/setup-go from 5.3.0 to 5.4.0 (#1026)
dependabot[bot] Apr 2, 2025
fee0e4d
Bump github.com/prometheus/common from 0.62.0 to 0.63.0 (#1023)
dependabot[bot] Apr 2, 2025
3f41e5f
Bump github.com/prometheus/client_golang from 1.21.0 to 1.21.1 (#1022)
dependabot[bot] Apr 2, 2025
ff2a918
Bump the aws group with 3 updates (#1021)
dependabot[bot] Apr 2, 2025
0863684
feat: add support for _health_report (#1002)
richardklose Apr 2, 2025
78c2672
Update README for version compatibility
sysadmind Apr 4, 2025
8f67121
Merge pull request #1029 from sysadmind/opensearch-readme
SuperQ Apr 5, 2025
2645c58
Bump golang.org/x/net from 0.36.0 to 0.38.0 (#1032)
dependabot[bot] Apr 23, 2025
80a0be6
Bump github.com/prometheus/client_golang from 1.21.1 to 1.22.0 (#1036)
dependabot[bot] May 7, 2025
25c76fa
Bump the aws group with 3 updates (#1035)
dependabot[bot] May 7, 2025
4a54705
Update golangci-lint config for v2 (#1034)
sysadmind May 7, 2025
46721e1
Add pprof for profiling (#1033)
sysadmind May 7, 2025
abac1b9
Do not log input URL string
sysadmind Jun 12, 2025
8a1d851
Fix memleak for create a TimeTicker without stop (#1049)
YenchangChan Jun 18, 2025
00dfe05
Remove copyright dates (#1027)
sysadmind Jun 18, 2025
60f9e0c
Update common Prometheus files (#1053)
prombot Jun 18, 2025
33661b9
Bump github.com/prometheus/common from 0.63.0 to 0.65.0 (#1057)
dependabot[bot] Jul 1, 2025
b3e2aaa
Bump the aws group with 4 updates (#1056)
dependabot[bot] Jul 1, 2025
c463acc
Update common Prometheus files (#1059)
prombot Jul 15, 2025
2c91a65
Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 (#1065)
dependabot[bot] Aug 5, 2025
5ceff33
Bump the aws group with 4 updates (#1064)
dependabot[bot] Aug 13, 2025
ca4c313
Add multi-target support (#1063)
pincher95 Aug 19, 2025
1bb4b58
Bump actions/setup-go from 5.4.0 to 6.0.0 (#1086)
dependabot[bot] Oct 24, 2025
6d25270
Bump the aws group with 4 updates (#1081)
dependabot[bot] Oct 24, 2025
90bc111
Bump actions/checkout from 4.2.2 to 5.0.0 (#1085)
dependabot[bot] Oct 24, 2025
dbe29fe
Bump github.com/prometheus/client_golang from 1.23.0 to 1.23.2 (#1084)
dependabot[bot] Oct 24, 2025
1f8b5ad
Bump github.com/prometheus/exporter-toolkit from 0.14.0 to 0.14.1
dependabot[bot] Oct 24, 2025
078972d
Merge pull request #1051 from sysadmind/rm-unsanitized-url
SuperQ Oct 24, 2025
a04a789
Merge pull request #1083 from prometheus-community/dependabot/go_modu…
SuperQ Oct 24, 2025
1cd5ffe
Bump github.com/prometheus/common from 0.65.0 to 0.66.1
dependabot[bot] Oct 24, 2025
88c8fb6
Merge pull request #1082 from prometheus-community/dependabot/go_modu…
SuperQ Oct 24, 2025
91008f4
Update Go (#1088)
SuperQ Oct 24, 2025
7131333
Update common Prometheus files
prombot Oct 24, 2025
325e7dd
Fix mixed value types for disk watermark (#1055)
sysadmind Oct 28, 2025
bdfeeff
Merge pull request #1089 from prometheus-community/repo_sync
SuperQ Oct 28, 2025
56914a1
Don't log collector errors (#1050)
SuperQ Oct 28, 2025
b14c6c0
Add our remote info back
rtkkroland Mar 17, 2025
6e01ada
Add unit tests to remote info
rtkkroland Sep 19, 2025
09e81bf
Update docs
rtkkroland Nov 3, 2025
14d4917
fix snyk issues
rtkkroland Nov 3, 2025
5b0f34b
fix snyk issues
rtkkroland Nov 3, 2025
e5f60dc
Merge branch 'master' into docs
rtkkroland Nov 3, 2025
0280c14
fix snyk issues
rtkkroland Nov 3, 2025
2c2a3fa
santizie
rtkkroland Nov 3, 2025
b09e2b7
santizie
rtkkroland Nov 3, 2025
70736c4
fix path traverse vulnerability
rtkkroland Nov 3, 2025
52b883b
More path traversal fixes
rtkkroland Nov 3, 2025
7ab29df
Make synk work
rtkkroland Nov 3, 2025
fd09ced
updates from copilot
rtkkroland Nov 3, 2025
70e35c2
more copilot
rtkkroland Nov 3, 2025
dc2ad05
more copilot
rtkkroland Nov 3, 2025
1372a56
Clean up
rtkkroland Nov 3, 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
36 changes: 0 additions & 36 deletions .circleci/config.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
container:
# Whenever the Go version is updated here, .promu.yml
# should also be updated.
image: quay.io/prometheus/golang-builder:1.23-base
image: quay.io/prometheus/golang-builder:1.25-base
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 # v0.4.6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
- uses: ./.github/promci/actions/setup_environment
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1

Expand All @@ -33,8 +33,8 @@ jobs:
matrix:
thread: [ 0, 1, 2 ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 # v0.4.6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
- uses: ./.github/promci/actions/build
with:
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
Expand All @@ -59,8 +59,8 @@ jobs:
# Whenever the Go version is updated here, .promu.yml
# should also be updated.
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 # v0.4.6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
- uses: ./.github/promci/actions/build
with:
parallelism: 12
Expand All @@ -76,8 +76,8 @@ jobs:
||
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 # v0.4.6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
- uses: ./.github/promci/actions/publish_main
with:
docker_hub_organization: prometheuscommunity
Expand All @@ -94,8 +94,8 @@ jobs:
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 # v0.4.6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
- uses: ./.github/promci/actions/publish_release
with:
docker_hub_organization: prometheuscommunity
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/container_description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set docker hub repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
- name: Push README to Dockerhub
Expand All @@ -41,6 +43,8 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set quay.io org name
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
- name: Set quay.io repo name
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Get golangci-lint version
id: golangci-lint-version
run: echo "version=$(make print-golangci-lint-version)" >> $GITHUB_OUTPUT
- name: Lint
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
args: --verbose
version: v1.64.6
version: ${{ steps.golangci-lint-version.outputs.version }}
6 changes: 3 additions & 3 deletions .github/workflows/mixin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: 1.23.x
go-version: 1.25.x
- name: Install dependencies
run: |
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
Expand Down
129 changes: 117 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,124 @@
---
version: "2"

formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- prefix(github.com/prometheus-community/elasticsearch_exporter)
- default

linters:
enable:
- depguard
# TODO(@sysadmind): Enable and fix the issues.
# - errorlint
- exptostd
# TODO(@sysadmind): Enable and fix the issues.
# - gocritic
# - godot
- loggercheck
# TODO(@sysadmind): Enable and fix the issues.
# - misspell
- nilnesserr
- nolintlint
# TODO(@sysadmind): Enable and fix the issues.
# - perfsprint
- predeclared
- revive
- sloglint
- testifylint
- unconvert
- unused
- usestdlibvars
- whitespace
exclusions:
rules:
# Disable errcheck for test files.
- linters:
- errcheck
path: _test.go

issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
# Disable errcheck rule for some specific functions.
- linters:
- errcheck
# Taken from the default exclusions in v1.
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked

linters-settings:
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: true
settings:
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: blank-imports
- name: comment-spacings
- name: context-as-argument
arguments:
# Allow functions with test or bench signatures.
- allowTypesBefore: '*testing.T,testing.TB'
- name: context-keys-type
- name: dot-imports
- name: early-return
arguments:
- "preserveScope"
# A lot of false positives: incorrectly identifies channel draining as "empty code block".
# See https://github.com/mgechev/revive/issues/386
- name: empty-block
disabled: true
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
# TODO(@sysadmind): Enable and fix the issues.
# - name: exported
- name: increment-decrement
- name: indent-error-flow
arguments:
- "preserveScope"
- name: package-comments
# TODO(beorn7/sysadmind): Currently, we have a lot of missing package doc comments. Maybe we should have them.
disabled: true
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
arguments:
- "preserveScope"
- name: time-naming
# TODO(@sysadmind): Enable and fix the issues.
# - name: unexported-return
- name: unreachable-code
- name: unused-parameter
severity: warning
disabled: true
- name: var-declaration
- name: var-naming

depguard:
rules:
main:
deny:
- pkg: "sync/atomic"
desc: "Use go.uber.org/atomic instead of sync/atomic"
- pkg: "github.com/stretchr/testify/assert"
desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
- pkg: "github.com/go-kit/kit/log"
desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
- pkg: "io/ioutil"
desc: "Use corresponding 'os' or 'io' functions instead."
- pkg: "regexp"
desc: "Use github.com/grafana/regexp instead of regexp"
- pkg: "github.com/pkg/errors"
desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"
- pkg: "gzip"
desc: "Use github.com/klauspost/compress instead of gzip"
- pkg: "zlib"
desc: "Use github.com/klauspost/compress instead of zlib"
- pkg: "golang.org/x/exp/slices"
desc: "Use 'slices' instead."
issues:
max-issues-per-linter: 0
max-same-issues: 0
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here,
# .github/workflows should also be updated.
version: 1.23
version: 1.25
repository:
path: github.com/prometheus-community/elasticsearch_exporter
build:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## master / unreleased

### Added
- Multi-target scraping via `/probe` endpoint with optional auth modules (compatible with postgres_exporter style) #1063

BREAKING CHANGES:

* [CHANGE] Set `--es.uri` by default to empty string #1063

The flag `--es.data_stream` has been renamed to `--collector.data-stream`.
The flag `--es.ilm` has been renamed to `--collector.ilm`.

Expand Down
19 changes: 14 additions & 5 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.64.6
GOLANGCI_LINT_VERSION ?= v2.4.0
GOLANGCI_FMT_OPTS ?=
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down Expand Up @@ -138,7 +139,7 @@ common-deps:
update-go-deps:
@echo ">> updating Go dependencies"
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
$(GO) get -d $$m; \
$(GO) get $$m; \
done
$(GO) mod tidy

Expand All @@ -156,9 +157,13 @@ $(GOTEST_DIR):
@mkdir -p $@

.PHONY: common-format
common-format:
common-format: $(GOLANGCI_LINT)
@echo ">> formatting code"
$(GO) fmt $(pkgs)
ifdef GOLANGCI_LINT
@echo ">> formatting code with golangci-lint"
$(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS)
endif

.PHONY: common-vet
common-vet:
Expand Down Expand Up @@ -248,8 +253,8 @@ $(PROMU):
cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu
rm -r $(PROMU_TMP)

.PHONY: proto
proto:
.PHONY: common-proto
common-proto:
@echo ">> generating code from proto files"
@./scripts/genproto.sh

Expand All @@ -261,6 +266,10 @@ $(GOLANGCI_LINT):
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
endif

.PHONY: common-print-golangci-lint-version
common-print-golangci-lint-version:
@echo $(GOLANGCI_LINT_VERSION)

.PHONY: precheck
precheck::

Expand Down
Loading