Skip to content

Commit

Permalink
Restore upstream metrics removed by e40ee9
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Dec 6, 2017
1 parent 3514e45 commit d1a21a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nginx_vts_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {

ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["response"], prometheus.GaugeValue, float64(s.ResponseMsec), name, s.Server)
}

ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, total, name, "total")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, one, name, "1xx")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, two, name, "2xx")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, three, name, "3xx")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, four, name, "4xx")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["requests"], prometheus.CounterValue, five, name, "5xx")

ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["bytes"], prometheus.CounterValue, inbytes, name, "in")
ch <- prometheus.MustNewConstMetric(e.upstreamMetrics["bytes"], prometheus.CounterValue, outbytes, name, "out")
}
// FilterZones
for filter, values := range nginxVtx.FilterZones {
Expand Down

0 comments on commit d1a21a9

Please sign in to comment.