Skip to content

Commit

Permalink
Add linting for markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jul 25, 2023
1 parent db5f207 commit 003a71e
Show file tree
Hide file tree
Showing 11 changed files with 410 additions and 207 deletions.
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A clear and concise description of what the bug is.

**To reproduce**
Steps to reproduce the behavior:

1. Deploy using 'some_command'
2. View logs '....'
3. See error
Expand All @@ -17,10 +18,11 @@ Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.

**Your environment**
* Version of the Prometheus exporter - release version or a specific commit
* Version of Docker/Kubernetes
* [if applicable] Kubernetes platform (e.g. Mini-kube or GCP)
* Using NGINX or NGINX Plus

- Version of the Prometheus exporter - release version or a specific commit
- Version of Docker/Kubernetes
- [if applicable] Kubernetes platform (e.g. Mini-kube or GCP)
- Using NGINX or NGINX Plus

**Additional context**
Add any other context about the problem here. Any log files you want to share.
8 changes: 6 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
### Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue here in this description (not in the title of the PR).

Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to
that issue here in this description (not in the title of the PR).

### Checklist

Before creating a PR, run through this checklist and mark each as complete.

- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-prometheus-exporter/blob/main/CONTRIBUTING.md) guide
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-prometheus-exporter/blob/main/CONTRIBUTING.md)
guide
- [ ] I have proven my fix is effective or that my feature works
- [ ] I have checked that all unit tests pass after adding my changes
- [ ] I have ensured the README is up to date
Expand Down
18 changes: 18 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Rule configuration.
# For rule descriptions and how to fix: https://github.com/DavidAnson/markdownlint/tree/main#rules--aliases
config:
ul-style:
style: dash
no-duplicate-heading:
siblings_only: true
line-length:
line_length: 120
code_blocks: false
tables: false

# Define glob expressions to ignore
ignores:
- ".github/"

# Fix any fixable errors
fix: true
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repos:
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: fix-byte-order-marker

- repo: local
hooks:
- id: golang-diff
Expand All @@ -32,15 +33,22 @@ repos:
language: system
types: [go]
pass_filenames: false

- repo: https://github.com/golangci/golangci-lint
rev: v1.53.3
hooks:
- id: golangci-lint
args: [--new-from-patch=/tmp/diff.patch]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.17.0
hooks:
- id: gitleaks

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
hooks:
- id: markdownlint-cli2

ci:
skip: [golang-diff, golangci-lint]
198 changes: 122 additions & 76 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,156 +1,202 @@
# Changelog

### 0.11.0
## 0.11.0

A list of changes can be found on Github at: [Release v0.11.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.11.0)

### 0.10.0
## 0.10.0

A list of changes can be found on Github at: [Release v0.10.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.10.0)

### 0.9.0
## 0.9.0

A list of changes can be found on Github at: [Release v0.9.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.9.0)

### 0.8.0
## 0.8.0

CHANGES:
* [103](https://github.com/nginxinc/nginx-prometheus-exporter/pull/103): Switch to `gcr.io/distroless/static` image. Use a non-root user to run the exporter process by default. Thanks to [Alex SZAKALY](https://github.com/alex1989hu).
* Update Go version to 1.14

BUGFIXES:
* [99](https://github.com/nginxinc/nginx-prometheus-exporter/pull/99): Fix link to metrics path. Thanks to [Yoan Blanc](https://github.com/greut).
* [101](https://github.com/nginxinc/nginx-prometheus-exporter/pull/101): docs: fix dockerfile link. Thanks to [Eric Carboni](https://github.com/eric-hc).
- [103](https://github.com/nginxinc/nginx-prometheus-exporter/pull/103): Switch to `gcr.io/distroless/static` image. Use
a non-root user to run the exporter process by default. Thanks to [Alex SZAKALY](https://github.com/alex1989hu).
- Update Go version to 1.14

FIXES:

- [99](https://github.com/nginxinc/nginx-prometheus-exporter/pull/99): Fix link to metrics path. Thanks to [Yoan Blanc](https://github.com/greut).
- [101](https://github.com/nginxinc/nginx-prometheus-exporter/pull/101): docs: fix dockerfile link. Thanks to [Eric Carboni](https://github.com/eric-hc).

UPGRADE:
* Use the 0.8.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.8.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.8.0).

- Use the 0.8.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.8.0`
- Download the latest binaries from [GitHub releases
page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.8.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R19 or newer.

### 0.7.0
- NGINX 0.1.18 or newer.
- NGINX Plus R19 or newer.

## 0.7.0

FEATURES:
* [86](https://github.com/nginxinc/nginx-prometheus-exporter/pull/86): Implemented TLS client certificate authentication. Thanks to [Fabian Lüpke](https://github.com/Fluepke).

BUGFIXES:
* [96](https://github.com/nginxinc/nginx-prometheus-exporter/pull/96): Add const labels to upMetric. Thanks to [Robert Toth](https://github.com/robert-toth).
- [86](https://github.com/nginxinc/nginx-prometheus-exporter/pull/86): Implemented TLS client certificate
authentication. Thanks to [Fabian Lüpke](https://github.com/Fluepke).

FIXES:

- [96](https://github.com/nginxinc/nginx-prometheus-exporter/pull/96): Add const labels to upMetric. Thanks to [Robert
Toth](https://github.com/robert-toth).

UPGRADE:
* Use the 0.7.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.7.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.7.0).

- Use the 0.7.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.7.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.7.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R19 or newer.

### 0.6.0
- NGINX 0.1.18 or newer.
- NGINX Plus R19 or newer.

## 0.6.0

FEATURES:
* [77](https://github.com/nginxinc/nginx-prometheus-exporter/pull/77): Add constLabels support via cli arg/env variable.

- [77](https://github.com/nginxinc/nginx-prometheus-exporter/pull/77): Add constLabels support via cli arg/env variable.

CHANGES:
* Update alpine image.

- Update alpine image.

UPGRADE:
* Use the 0.6.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.6.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.6.0).

- Use the 0.6.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.6.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.6.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R19 or newer.

### 0.5.0
- NGINX 0.1.18 or newer.
- NGINX Plus R19 or newer.

## 0.5.0

FEATURES:
* [70](https://github.com/nginxinc/nginx-prometheus-exporter/pull/70): Set user agent on scrape requests to nginx.
* [68](https://github.com/nginxinc/nginx-prometheus-exporter/pull/68): Add ability to scrape and listen on unix domain sockets.
* [64](https://github.com/nginxinc/nginx-prometheus-exporter/pull/64): Add location zone and resolver metric support.

BUGFIXES:
* [73](https://github.com/nginxinc/nginx-prometheus-exporter/pull/73): Fix typo in stream_zone_sync_status_nodes_online metric description.
* [71](https://github.com/nginxinc/nginx-prometheus-exporter/pull/71): Do not assume default datasource in Grafana panels.
* [62](https://github.com/nginxinc/nginx-prometheus-exporter/pull/62): Set correct nginx_up query and instance variable expression.
- [70](https://github.com/nginxinc/nginx-prometheus-exporter/pull/70): Set user agent on scrape requests to nginx.
- [68](https://github.com/nginxinc/nginx-prometheus-exporter/pull/68): Add ability to scrape and listen on unix domain
sockets.
- [64](https://github.com/nginxinc/nginx-prometheus-exporter/pull/64): Add location zone and resolver metric support.

FIXES:

- [73](https://github.com/nginxinc/nginx-prometheus-exporter/pull/73): Fix typo in stream_zone_sync_status_nodes_online
metric description.
- [71](https://github.com/nginxinc/nginx-prometheus-exporter/pull/71): Do not assume default datasource in Grafana
panels.
- [62](https://github.com/nginxinc/nginx-prometheus-exporter/pull/62): Set correct nginx_up query and instance variable
expression.

UPGRADE:
* Use the 0.5.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.5.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.5.0).

- Use the 0.5.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.5.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.5.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R19 or newer.

### 0.4.2
- NGINX 0.1.18 or newer.
- NGINX Plus R19 or newer.

## 0.4.2

BUGFIXES:
* [60](https://github.com/nginxinc/nginx-prometheus-exporter/pull/60): *Fix session metrics for stream server zones*. Session metrics with a status of `4xx` or `5xx` are now correctly reported. Previously they were always reported as `0`.
FIXES:

- [60](https://github.com/nginxinc/nginx-prometheus-exporter/pull/60): *Fix session metrics for stream server zones*.
Session metrics with a status of `4xx` or `5xx` are now correctly reported. Previously they were always reported as
`0`.

UPGRADE:
* Use the 0.4.2 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.2`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.2).

- Use the 0.4.2 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.2`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.2).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R18 or newer.

### 0.4.1
- NGINX 0.1.18 or newer.
- NGINX Plus R18 or newer.

## 0.4.1

FIXES:

BUGFIXES:
* [55](https://github.com/nginxinc/nginx-prometheus-exporter/pull/55): Do not export zone sync metrics if they are not reported by NGINX Plus. Previously, in such case, the metrics were exported with zero values.
- [55](https://github.com/nginxinc/nginx-prometheus-exporter/pull/55): Do not export zone sync metrics if they are not
reported by NGINX Plus. Previously, in such case, the metrics were exported with zero values.

UPGRADE:
* Use the 0.4.1 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.1`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.1).

- Use the 0.4.1 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.1`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.1).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R18 or newer.

### 0.4.0
- NGINX 0.1.18 or newer.
- NGINX Plus R18 or newer.

## 0.4.0

FEATURES:
* [50](https://github.com/nginxinc/nginx-prometheus-exporter/pull/50): Add zone sync metrics support.
* [37](https://github.com/nginxinc/nginx-prometheus-exporter/pull/37): Implement a way to retry connection to NGINX if it is unreachable. Add -nginx.retries for setting the number of retries and -nginx.retry-interval for setting the interval between retries, both as cli-arguments.

- [50](https://github.com/nginxinc/nginx-prometheus-exporter/pull/50): Add zone sync metrics support.
- [37](https://github.com/nginxinc/nginx-prometheus-exporter/pull/37): Implement a way to retry connection to NGINX if
it is unreachable. Add -nginx.retries for setting the number of retries and -nginx.retry-interval for setting the
interval between retries, both as cli-arguments.

UPGRADE:
* Use the 0.4.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.0).

- Use the 0.4.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R18 or newer.

### 0.3.0
- NGINX 0.1.18 or newer.
- NGINX Plus R18 or newer.

## 0.3.0

FEATURES:
* [32](https://github.com/nginxinc/nginx-prometheus-exporter/pull/32): Add nginxexporter_build_info metric.
* [31](https://github.com/nginxinc/nginx-prometheus-exporter/pull/31): Implement nginx_up and nginxplus_up metrics. Add -nginx.timeout cli argument for setting a timeout for scrapping metrics from NGINX or NGINX Plus.

- [32](https://github.com/nginxinc/nginx-prometheus-exporter/pull/32): Add nginxexporter_build_info metric.
- [31](https://github.com/nginxinc/nginx-prometheus-exporter/pull/31): Implement nginx_up and nginxplus_up metrics. Add
-nginx.timeout cli argument for setting a timeout for scrapping metrics from NGINX or NGINX Plus.

UPGRADE:
* Use the 0.3.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.3.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.3.0).

- Use the 0.3.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.3.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.3.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R14 or newer.

- NGINX 0.1.18 or newer.
- NGINX Plus R14 or newer.

## 0.2.0

FEATURES:
* [16](https://github.com/nginxinc/nginx-prometheus-exporter/pull/16): Add stream metrics support.
* [13](https://github.com/nginxinc/nginx-prometheus-exporter/pull/13): Add a flag for controlling SSL verification of NGINX stub_status/API endpoint. Thanks to [Raza Jhaveri](https://github.com/razaj92).
* [3](https://github.com/nginxinc/nginx-prometheus-exporter/pull/3): Support for environment variables.

- [16](https://github.com/nginxinc/nginx-prometheus-exporter/pull/16): Add stream metrics support.
- [13](https://github.com/nginxinc/nginx-prometheus-exporter/pull/13): Add a flag for controlling SSL verification of
NGINX stub_status/API endpoint. Thanks to [Raza Jhaveri](https://github.com/razaj92).
- [3](https://github.com/nginxinc/nginx-prometheus-exporter/pull/3): Support for environment variables.

UPGRADE:
* Use the 0.2.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.2.0`
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.2.0).

- Use the 0.2.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.2.0`
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.2.0).

COMPATIBILITY:
* NGINX 0.1.18 or newer.
* NGINX Plus R14 or newer.

- NGINX 0.1.18 or newer.
- NGINX Plus R14 or newer.

## 0.1.0

* Initial release.
- Initial release.
Loading

0 comments on commit 003a71e

Please sign in to comment.