Skip to content

Commit

Permalink
Merge pull request #46 from robbiet480/master
Browse files Browse the repository at this point in the history
Restore upstream metrics removed by e40ee9
  • Loading branch information
sysulq authored Dec 6, 2017
2 parents 3514e45 + d1a21a9 commit df3d338
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 df3d338

Please sign in to comment.