Skip to content

Commit 3354bbb

Browse files
author
Ed Ganiukov
authoredFeb 15, 2017
Merge pull request #13 from nordicdyno/master
Fixes for better Prometheus support
2 parents e250db4 + ab866b7 commit 3354bbb

Some content is hidden

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

58 files changed

+2475
-3545
lines changed
 

‎Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}_{{.OS}}_{{.Arch}}" -osarch="linux/amd6
88
build:
99
$(GO) build -o $(BUILD_DIR)/nsq_exporter .
1010

11+
.PHONY: deps-init deps-get
12+
deps-init:
13+
@go get -u github.com/kardianos/govendor
14+
$(GOPATH)/bin/govendor init
15+
16+
deps-get: deps-init
17+
@$(GOPATH)/bin/govendor get github.com/lovoo/nsq_exporter
18+
1119
.PHONY: clean
1220
clean:
1321
rm -R $(BUILD_DIR)/* || true

‎collector/collector.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ package collector
22

33
import "github.com/prometheus/client_golang/prometheus"
44

5-
// Collector defines the interface for collecting all metrics for Prometheus.
6-
type Collector interface {
7-
Collect(out chan<- prometheus.Metric) error
5+
// StatsCollector defines an interface for collecting specific stats
6+
// from a nsqd exported stats data.
7+
type StatsCollector interface {
8+
set(s *stats)
9+
collect(out chan<- prometheus.Metric)
10+
describe(ch chan<- *prometheus.Desc)
11+
reset()
812
}

0 commit comments

Comments
 (0)
Please sign in to comment.