Skip to content

Commit

Permalink
Merge pull request #90 from nats-io/connz-fix
Browse files Browse the repository at this point in the history
Fix connz with custom prefix
  • Loading branch information
wallyqs committed Jul 12, 2019
2 parents 175cecf + 13c0fe6 commit 43acc39
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions collector/connz.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,31 @@ func newConnzCollector(servers []*CollectedServer) prometheus.Collector {
nc := &connzCollector{
httpClient: http.DefaultClient,
numConnections: prometheus.NewDesc(
prometheus.BuildFQName("gnatsd", "connz", "num_connections"),
prometheus.BuildFQName(namespace, "connz", "num_connections"),
"num_connections",
[]string{"server_id"},
nil,
),
offset: prometheus.NewDesc(
prometheus.BuildFQName("gnatsd", "connz", "offset"),
prometheus.BuildFQName(namespace, "connz", "offset"),
"offset",
[]string{"server_id"},
nil,
),
total: prometheus.NewDesc(
prometheus.BuildFQName("gnatsd", "connz", "total"),
prometheus.BuildFQName(namespace, "connz", "total"),
"total",
[]string{"server_id"},
nil,
),
limit: prometheus.NewDesc(
prometheus.BuildFQName("gnatsd", "connz", "limit"),
prometheus.BuildFQName(namespace, "connz", "limit"),
"limit",
[]string{"server_id"},
nil,
),
pendingBytes: prometheus.NewDesc(
prometheus.BuildFQName("gnatsd", "connz", "pending_bytes"),
prometheus.BuildFQName(namespace, "connz", "pending_bytes"),
"pending_bytes",
[]string{"server_id"},
nil,
Expand Down

0 comments on commit 43acc39

Please sign in to comment.