Skip to content

Commit cef6c27

Browse files
authored
Merge pull request #5 from rtkwlf/update
[AWN-66436] Update our fork to upstream main
2 parents 0a66364 + fb9492d commit cef6c27

File tree

88 files changed

+7044
-1551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+7044
-1551
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
version: 2.1
3+
orbs:
4+
prometheus: prometheus/prometheus@0.17.1
5+
executors:
6+
# This must match .promu.yml.
7+
golang:
8+
docker:
9+
- image: cimg/go:1.20
10+
jobs:
11+
test:
12+
executor: golang
13+
steps:
14+
- prometheus/setup_environment
15+
- run: make
16+
- prometheus/store_artifact:
17+
file: elasticsearch_exporter
18+
workflows:
19+
version: 2
20+
elasticsearch_exporter:
21+
jobs:
22+
- test:
23+
filters:
24+
tags:
25+
only: /.*/
26+
- prometheus/build:
27+
name: build
28+
filters:
29+
tags:
30+
only: /.*/
31+
- prometheus/publish_master:
32+
context: org-context
33+
docker_hub_organization: prometheuscommunity
34+
quay_io_organization: prometheuscommunity
35+
requires:
36+
- test
37+
- build
38+
filters:
39+
branches:
40+
only: master
41+
- prometheus/publish_release:
42+
context: org-context
43+
docker_hub_organization: prometheuscommunity
44+
quay_io_organization: prometheuscommunity
45+
requires:
46+
- test
47+
- build
48+
filters:
49+
tags:
50+
only: /^v.*/
51+
branches:
52+
ignore: /.*/

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/golangci-lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# This action is synced from https://github.com/prometheus/prometheus
3+
name: golangci-lint
4+
on:
5+
push:
6+
paths:
7+
- "go.sum"
8+
- "go.mod"
9+
- "**.go"
10+
- "scripts/errcheck_excludes.txt"
11+
- ".github/workflows/golangci-lint.yml"
12+
- ".golangci.yml"
13+
pull_request:
14+
15+
jobs:
16+
golangci:
17+
name: lint
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
22+
- name: install Go
23+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
24+
with:
25+
go-version: 1.20.x
26+
- name: Install snmp_exporter/generator dependencies
27+
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
28+
if: github.repository == 'prometheus/snmp_exporter'
29+
- name: Lint
30+
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
31+
with:
32+
version: v1.54.2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ elasticsearch_exporter
33
*.tar.gz
44
*-stamp
55
.tarballs
6+
/vendor

.golangci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
linters:
3+
enable:
4+
- revive
5+
6+
issues:
7+
exclude-rules:
8+
- path: _test.go
9+
linters:
10+
- errcheck
11+
12+
linters-settings:
13+
errcheck:
14+
exclude: scripts/errcheck_excludes.txt
15+
revive:
16+
rules:
17+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
18+
- name: unused-parameter
19+
severity: warning
20+
disabled: true

.gometalinter.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.promu.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
go:
2-
cgo: false
2+
# This must match .circle/config.yml.
3+
version: 1.20
34
repository:
4-
path: github.com/justwatchcom/elasticsearch_exporter
5+
path: github.com/prometheus-community/elasticsearch_exporter
56
build:
7+
binaries:
8+
- name: elasticsearch_exporter
69
flags: -a -tags netgo
710
ldflags: |
811
-s
@@ -19,27 +22,3 @@ tarball:
1922
- examples/grafana/dashboard.json
2023
- examples/kubernetes/deployment.yml
2124
- examples/prometheus/elasticsearch.rules
22-
crossbuild:
23-
platforms:
24-
- linux/amd64
25-
- linux/386
26-
- darwin/amd64
27-
- darwin/386
28-
- windows/amd64
29-
- windows/386
30-
- freebsd/amd64
31-
- freebsd/386
32-
- openbsd/amd64
33-
- openbsd/386
34-
- netbsd/amd64
35-
- netbsd/386
36-
- dragonfly/amd64
37-
- linux/arm
38-
- linux/arm64
39-
- freebsd/arm
40-
- openbsd/arm
41-
- netbsd/arm
42-
- linux/ppc64
43-
- linux/ppc64le
44-
- linux/mips64
45-
- linux/mips64le

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.yamllint

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
braces:
6+
max-spaces-inside: 1
7+
level: error
8+
brackets:
9+
max-spaces-inside: 1
10+
level: error
11+
commas: disable
12+
comments: disable
13+
comments-indentation: disable
14+
document-start: disable
15+
indentation:
16+
spaces: consistent
17+
indent-sequences: consistent
18+
key-duplicates:
19+
ignore: |
20+
config/testdata/section_key_dup.bad.yml
21+
line-length: disable
22+
truthy:
23+
check-keys: false

CHANGELOG.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
## master / unreleased
2+
3+
BREAKING CHANGES:
4+
5+
The flag `--es.snapshots` has been renamed to `--collector.snapshots`.
6+
7+
* [CHANGE] Rename --es.snapshots to --collector.snapshots #XXX
8+
9+
## 1.6.0 / 2023-06-22
10+
11+
BREAKING CHANGES:
12+
13+
The flag `--es.cluster_settings` has been renamed to `--collector.clustersettings`.
14+
15+
* [CHANGE] Rename --es.cluster_settings to --collector.clustersettings
16+
* [FEATURE] Add ILM metrics #513
17+
* [ENHANCEMENT] Add ElasticCloud node roles to role label #652
18+
* [ENHANCEMENT] Add ability to use AWS IAM role for authentication #653
19+
* [ENHANCEMENT] Add metric for index replica count #483
20+
* [BUGFIX] Set elasticsearch_clusterinfo_version_info guage to 1 #728
21+
* [BUGFIX] Fix index field counts with nested fields #675
22+
23+
24+
## 1.5.0 / 2022-07-28
25+
26+
* [FEATURE] Add metrics collection for data stream statistics #592
27+
* [FEATURE] Support for AWS Elasticsearch using AWS SDK v2 #597
28+
* [BUGFIX] Fix cluster settings collection when max_shards_per_node is manually set. #603
29+
30+
## 1.4.0 / 2022-06-29
31+
32+
* [BREAKING] Remove ENV var support for most non-sensitive options. #518
33+
* [BREAKING] Rename elasticsearch_process_cpu_time_seconds_sum to elasticsearch_process_cpu_seconds_total #520
34+
* [FEATURE] Add metric for index aliases #563
35+
* [FEATURE] Add metric for number of shards on a node #535
36+
* [FEATURE] Add metrics for SLM (snapshot lifecycle management) #558
37+
* [FEATURE] Add metric for JVM uptime #537
38+
* [FEATURE] Add metrics for current searches and current indexing documents #485
39+
* [BUGFIX] Remove the elasticsearch_process_cpu_time_seconds_sum metric as it was never used #498
40+
41+
## 1.3.0 / 2021-10-21
42+
43+
* [FEATURE] Add support for passing elasticsearch credentials via the ES_USERNAME and ES_PASSWORD environment varialbes #461
44+
* [FEATURE] Add support for API keys for elasticsearch authentication (Elastic cloud) #459
45+
* [BUGFIX] Fix index stats when shards are unavailable #445
46+
47+
## 1.2.1 / 2021-06-29
48+
49+
* [BUGFIX] Fixed elasticsearch 7.13 node stats metrics #439
50+
* [BUGFIX] Fixed snapshot stats metrics for some snapshot repository types #442
51+
52+
## 1.2.0 / 2021-06-10
53+
54+
This release marks the first release under the prometheus-community organization.
55+
56+
* [FEATURE] Added elasticsearch_clustersettings_stats_max_shards_per_node metric. #277
57+
* [FEATURE] Added elasticsearch_indices_shards_store_size_in_bytes metric. #292
58+
* [FEATURE] Added --es.indices_mappings flag to scrape elasticsearch index mapping stats and elasticsearch_indices_mappings_stats collector. #411
59+
* [FEATURE] Added elasticsearch_snapshot_stats_latest_snapshot_timestamp_seconds metric. #318
60+
* [ENHANCEMENT] Added support for reloading the tls client certificate in case it changes on disk. #414
61+
* [BUGFIX] Fixed the elasticsearch_indices_shards_docs metric name. #291
62+
163
## 1.1.0
264

365
repeating the breaking changes introduced in 1.1.0rc1:
@@ -39,10 +101,10 @@ build fix: remove unnecessary conversion
39101
* [FEATURE] new collector for cluster settings
40102
* [FEATURE] new collector for indices settings
41103
* [FEATURE] cluster info collector. The collector periodically queries the / endpoints and provides the other collectors with a semi up-to-date cluster label
42-
*
104+
*
43105
* [FEATURE]/ [BUGFIX] grafana dashboard improvements and fixes
44106
* [BUGFIX] Fixed createTLSConfig function. Return full tls configuration when ca, crt, key and insecure flag are set
45-
*
107+
*
46108
* [INTERNAL] added code linting to build pipeline
47109

48110
## 1.0.4rc1

0 commit comments

Comments
 (0)