Skip to content

Commit 78f5e59

Browse files
authored
Sync with upstream (#1)
* Update dependencies * Release 0.3.0 * Change namespace.
1 parent 9ee3712 commit 78f5e59

File tree

10 files changed

+60
-20
lines changed

10 files changed

+60
-20
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
.vscode
77

88
# the binary
9-
nginx-prometheus-exporter
9+
nginx-prometheus-exporter
10+
11+
.idea

CHANGELOG.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
### 0.3.0
4+
5+
FEATURES:
6+
* [32](https://github.com/nginxinc/nginx-prometheus-exporter/pull/32): Add nginxexporter_build_info metric.
7+
* [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.
8+
9+
UPGRADE:
10+
* Use the 0.3.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.3.0`
11+
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.3.0).
12+
13+
COMPATIBILITY:
14+
* NGINX 0.1.18 or newer.
15+
* NGINX Plus R14 or newer.
16+
317
## 0.2.0
418

519
FEATURES:
@@ -9,7 +23,7 @@ FEATURES:
923

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

1428
COMPATIBILITY:
1529
* NGINX 0.1.18 or newer.

Gopkg.lock

+16-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[constraint]]
22
name = "github.com/prometheus/client_golang"
3-
version = "0.9.1"
3+
version = "0.9.2"
44

55
[[constraint]]
66
name = "github.com/nginxinc/nginx-plus-go-sdk"

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION = 0.2.0
2-
PREFIX = nginx/nginx-prometheus-exporter
1+
VERSION = 0.3.0
2+
PREFIX = stafot/nginx-prometheus-exporter
33
TAG = $(VERSION)
44
GIT_COMMIT = $(shell git rev-parse --short HEAD)
55

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ To start the exporter we use the [docker run](https://docs.docker.com/engine/ref
3030

3131
* To export NGINX metrics, run:
3232
```
33-
$ docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.2.0 -nginx.scrape-uri http://<nginx>:8080/stub_status
33+
$ docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.3.0 -nginx.scrape-uri http://<nginx>:8080/stub_status
3434
```
3535
where `<nginx>` is the IP address/DNS name, through which NGINX is available.
3636
3737
* To export NGINX Plus metrics, run:
3838
```
39-
$ docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.2.0 -nginx.plus -nginx.scrape-uri http://<nginx-plus>:8080/api
39+
$ docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.3.0 -nginx.plus -nginx.scrape-uri http://<nginx-plus>:8080/api
4040
```
4141
where `<nginx-plus>` is the IP address/DNS name, through which NGINX Plus is available.
4242

exporter.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ func main() {
7070

7171
registry := prometheus.NewRegistry()
7272

73+
app := os.Getenv("SERVICE")
74+
7375
buildInfoMetric := prometheus.NewGauge(
7476
prometheus.GaugeOpts{
7577
Name: "nginxexporter_build_info",
@@ -104,7 +106,7 @@ func main() {
104106
log.Fatalf("Could not create Nginx Client: %v", err)
105107
}
106108

107-
registry.MustRegister(collector.NewNginxCollector(client, "nginx"))
109+
registry.MustRegister(collector.NewNginxCollector(client, app+"_nginx"))
108110
}
109111

110112
http.Handle(*metricsPath, promhttp.HandlerFor(registry, promhttp.HandlerOpts{}))

vendor/github.com/prometheus/client_golang/prometheus/desc.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/client_golang/prometheus/registry.go

+9-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/client_golang/prometheus/timer.go

+7-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)