Skip to content

Commit d13522e

Browse files
authored
Merge branch 'main' into pr/478
2 parents cb639f5 + 4c51d37 commit d13522e

File tree

913 files changed

+5088
-271738
lines changed

Some content is hidden

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

913 files changed

+5088
-271738
lines changed

.circleci/config.yml

Lines changed: 75 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,99 @@
11
---
22
version: 2.1
3-
43
orbs:
5-
prometheus: prometheus/[email protected]
6-
4+
prometheus: prometheus/[email protected]
75
executors:
86
# Whenever the Go version is updated here, .promu.yml
97
# should also be updated.
108
golang:
119
docker:
12-
- image: circleci/golang:1.14
13-
10+
- image: circleci/golang:1.17
1411
jobs:
1512
test:
1613
executor: golang
17-
1814
steps:
19-
- prometheus/setup_environment
20-
- run: make check_license style staticcheck unused build test-short
21-
- prometheus/store_artifact:
22-
file: mysqld_exporter
23-
15+
- prometheus/setup_environment
16+
- run: make check_license style staticcheck unused build test-short
17+
- prometheus/store_artifact:
18+
file: mysqld_exporter
2419
integration:
25-
machine:
26-
image: ubuntu-1604:202004-01
27-
20+
docker:
21+
- image: circleci/golang:1.16
22+
- image: << parameters.mysql_image >>
23+
environment:
24+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
25+
MYSQL_ROOT_HOST: '%'
2826
parameters:
2927
mysql_image:
3028
type: string
31-
3229
steps:
33-
- checkout
34-
- run: docker version
35-
- run: docker-compose --version
36-
- run: make build
37-
- run:
38-
name: Run integration test
39-
command: |
40-
MYSQL_IMAGE=<< parameters.mysql_image >> docker-compose up -d
41-
make test
42-
30+
- checkout
31+
- setup_remote_docker
32+
- run: docker version
33+
- run: docker-compose --version
34+
- run: make build
35+
- run: make test
4336
codespell:
4437
docker:
45-
- image: circleci/python
46-
38+
- image: circleci/python
39+
steps:
40+
- checkout
41+
- run: sudo pip install codespell
42+
- run: codespell --skip=".git,./vendor,ttar,Makefile.common" -L uint,ist,keypair
43+
mixin:
44+
executor: golang
4745
steps:
48-
- checkout
49-
- run: sudo pip install codespell
50-
- run: codespell --skip=".git,./vendor,ttar,Makefile.common" -L uint,ist,keypair
51-
46+
- checkout
47+
- run: go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
48+
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
49+
- run: make -C mysqld-mixin lint build
5250
workflows:
5351
version: 2
5452
mysqld_exporter:
5553
jobs:
56-
- test:
57-
filters:
58-
tags:
59-
only: /.*/
60-
- integration:
61-
matrix:
62-
parameters:
63-
mysql_image:
64-
- mysql/mysql-server:5.6
65-
- mysql/mysql-server:5.7
66-
- mysql/mysql-server:8.0
67-
- mariadb:10.1
68-
- mariadb:10.2
69-
- mariadb:10.3
70-
- mariadb:10.4
71-
- prometheus/build:
72-
name: build
73-
filters:
74-
tags:
75-
only: /.*/
76-
- codespell:
77-
filters:
78-
tags:
79-
only: /.*/
80-
- prometheus/publish_master:
81-
context: org-context
82-
requires:
83-
- test
84-
- build
85-
filters:
86-
branches:
87-
only: master
88-
- prometheus/publish_release:
89-
context: org-context
90-
requires:
91-
- test
92-
- build
93-
filters:
94-
tags:
95-
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
96-
branches:
97-
ignore: /.*/
54+
- test:
55+
filters:
56+
tags:
57+
only: /.*/
58+
- integration:
59+
matrix:
60+
parameters:
61+
mysql_image:
62+
- mysql/mysql-server:5.6
63+
- mysql/mysql-server:5.7.33
64+
- mysql/mysql-server:8.0
65+
- mariadb:10.2
66+
- mariadb:10.3
67+
- mariadb:10.4
68+
- mariadb:10.5
69+
- prometheus/build:
70+
name: build
71+
filters:
72+
tags:
73+
only: /.*/
74+
- codespell:
75+
filters:
76+
tags:
77+
only: /.*/
78+
- mixin:
79+
filters:
80+
tags:
81+
only: /.*/
82+
- prometheus/publish_main:
83+
context: org-context
84+
requires:
85+
- test
86+
- build
87+
filters:
88+
branches:
89+
only: main
90+
- prometheus/publish_release:
91+
context: org-context
92+
requires:
93+
- test
94+
- build
95+
filters:
96+
tags:
97+
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
98+
branches:
99+
ignore: /.*/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
paths:
5+
- "go.sum"
6+
- "go.mod"
7+
- "**.go"
8+
- "scripts/errcheck_excludes.txt"
9+
- ".github/workflows/golangci-lint.yml"
10+
- ".golangci.yml"
11+
pull_request:
12+
paths:
13+
- "go.sum"
14+
- "go.mod"
15+
- "**.go"
16+
- "scripts/errcheck_excludes.txt"
17+
- ".github/workflows/golangci-lint.yml"
18+
- ".golangci.yml"
19+
20+
jobs:
21+
golangci:
22+
name: lint
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Lint
29+
uses: golangci/golangci-lint-action@v2
30+
with:
31+
version: v1.42.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
*-stamp
99
.idea
1010
*.iml
11+
/vendor

.golangci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
run:
2-
modules-download-mode: vendor
3-
1+
---
42
# Run only staticcheck for now. Additional linters will be enabled one-by-one.
53
linters:
64
enable:

.promu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
go:
22
# Whenever the Go version is updated here, .circle/config.yml should also
33
# be updated.
4-
version: 1.14
4+
version: 1.17
55
repository:
66
path: github.com/prometheus/mysqld_exporter
77
build:
8-
flags: -mod=vendor -a -tags netgo
8+
flags: -a -tags netgo
99
ldflags: |
1010
-X github.com/prometheus/common/version.Version={{.Version}}
1111
-X github.com/prometheus/common/version.Revision={{.Revision}}

CHANGELOG.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
11
## master / unreleased
22

3-
### BREAKING CHANGES:
3+
BREAKING CHANGES:
44

5-
### Changes:
5+
Changes:
66

77
* [CHANGE]
8-
* [BUGFIX]
9-
* [ENHANCEMENT]
108
* [FEATURE]
9+
* [ENHANCEMENT]
10+
* [BUGFIX]
1111

12-
* [FEATURE] Add `tls.insecure-skip-verify` flag to ignore tls verification errors (PR #417) #348
13-
* [FEATURE] Add new metrics to `replication_group_member_stats` collector to support MySQL 8.x.
14-
* [FEATURE] Add collector for `replication_group_members` (PR #459) #362
15-
* [BUGFIX] Fixed output value of wsrep_cluster_status #473
12+
* [FEATURE] Add collector for `replica_host_status` #496
1613

17-
### BREAKING CHANGES:
14+
## 0.13.0 / 2021-05-18
15+
16+
BREAKING CHANGES:
1817

1918
Changes related to `replication_group_member_stats` collector:
2019
* metric "transaction_in_queue" was Counter instead of Gauge
2120
* renamed 3 metrics starting with `mysql_perf_schema_transaction_` to start with `mysql_perf_schema_transactions_` to be consistent with column names
2221
* exposing only server's own stats by matching MEMBER_ID with @@server_uuid resulting "member_id" label to be dropped.
2322

23+
Changes:
24+
25+
* [CHANGE] Switch to go-kit for logs. #433
26+
* [FEATURE] Add `tls.insecure-skip-verify` flag to ignore tls verification errors #417
27+
* [FEATURE] Add collector for AWS Aurora information_schema.replica_host_status #435
28+
* [FEATURE] Add collector for `replication_group_members` #459
29+
* [FEATURE] Add new metrics to `replication_group_member_stats` collector to support MySQL 8.x. #462
30+
* [FEATURE] Add collector for `performance_schema.memory_summary_global_by_event_name` #515
31+
* [FEATURE] Support authenticating using mTLS client cert and no password #539
32+
* [FEATURE] Add TLS and basic authentication #522
33+
* [ENHANCEMENT] Support heartbeats in UTC #471
34+
* [ENHANCEMENT] Improve parsing of boolean strings #548
35+
* [BUGFIX] Fix binlog metrics on mysql 8.x #419
36+
* [BUGFIX] Fix output value of wsrep_cluster_status #473
37+
* [BUGFIX] Fix collect.info_schema.innodb_metrics for new field names (mariadb 10.5+) #494
38+
* [BUGFIX] Fix log output of collect[] params #505
39+
* [BUGFIX] Fix collect.info_schema.innodb_tablespaces for new table names #516
40+
* [BUGFIX] Fix innodb_metrics for mariadb 10.5+ #523
41+
* [BUGFIX] Allow perf_schema.memory summary current_bytes to be negative #517
42+
43+
2444
## 0.12.1 / 2019-07-10
2545

2646
### Changes:

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Prometheus Community Code of Conduct
2+
3+
Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
ARG ARCH="amd64"
22
ARG OS="linux"
3-
FROM quay.io/prometheus/busybox:latest
4-
LABEL maintainer="The Prometheus Authors <[email protected]>"
3+
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
4+
LABEL maintainer="The Prometheus Authors <[email protected]>"
55

66
ARG ARCH="amd64"
77
ARG OS="linux"
88
COPY .build/${OS}-${ARCH}/mysqld_exporter /bin/mysqld_exporter
99

10-
USER nobody
1110
EXPOSE 9104
11+
USER nobody
1212
ENTRYPOINT [ "/bin/mysqld_exporter" ]

LICENSE

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

@@ -178,15 +178,15 @@ Apache License
178178
APPENDIX: How to apply the Apache License to your work.
179179

180180
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "{}"
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182182
replaced with your own identifying information. (Don't include
183183
the brackets!) The text should be enclosed in the appropriate
184184
comment syntax for the file format. We also recommend that a
185185
file or class name and description of purpose be included on the
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.
@@ -199,4 +199,3 @@ Apache License
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-

0 commit comments

Comments
 (0)