diff options
author | Siavash Safi <siavash.safi@gmail.com> | 2017-10-14 14:23:42 +0200 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2017-10-14 14:23:42 +0200 |
commit | f3a70226025bf81e55eaf9d7386f9f7b3a267694 (patch) | |
tree | 1a721e7563babb1980089a31c2bf6557ab678f8e /Makefile | |
parent | 8f9edf87b5e826fa6a4dc43883d2cb6311d2e1ee (diff) | |
download | prometheus_node_collector-f3a70226025bf81e55eaf9d7386f9f7b3a267694.tar.bz2 prometheus_node_collector-f3a70226025bf81e55eaf9d7386f9f7b3a267694.tar.xz prometheus_node_collector-f3a70226025bf81e55eaf9d7386f9f7b3a267694.zip |
Add `collect[]` parameter (#699)
* Add `collect[]` parameter
* Add TODo comment about staticcheck ignored
* Restore promhttp.HandlerOpts
* Log a warning and return HTTP error instead of failing
* Check collector existence and status, cleanups
* Fix warnings and error messages
* Don't panic, return error if collector registration failed
* Update README
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -27,6 +27,10 @@ DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) | |||
27 | MACH ?= $(shell uname -m) | 27 | MACH ?= $(shell uname -m) |
28 | DOCKERFILE ?= Dockerfile | 28 | DOCKERFILE ?= Dockerfile |
29 | 29 | ||
30 | # TODO: Remove deprecated and problematic InstrumentHandlerFunc usage. | ||
31 | STATICCHECK_IGNORE = \ | ||
32 | github.com/prometheus/node_exporter/node_exporter.go:SA1019 | ||
33 | |||
30 | ifeq ($(GOHOSTARCH),amd64) | 34 | ifeq ($(GOHOSTARCH),amd64) |
31 | # Only supported on amd64 | 35 | # Only supported on amd64 |
32 | test-flags := -race | 36 | test-flags := -race |
@@ -99,7 +103,7 @@ vet: | |||
99 | 103 | ||
100 | staticcheck: $(STATICCHECK) | 104 | staticcheck: $(STATICCHECK) |
101 | @echo ">> running staticcheck" | 105 | @echo ">> running staticcheck" |
102 | @$(STATICCHECK) $(pkgs) | 106 | @$(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" $(pkgs) |
103 | 107 | ||
104 | build: $(PROMU) | 108 | build: $(PROMU) |
105 | @echo ">> building binaries" | 109 | @echo ">> building binaries" |