Skip to content

Commit

Permalink
Merge pull request #28 from baghirzade/patch-1
Browse files Browse the repository at this point in the history
Update session_collector.go
  • Loading branch information
jenningsloy318 authored Aug 30, 2024
2 parents 3bbd145 + b514dd6 commit 6862774
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions collector/session_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ func (i *SessionCollector) Collect(ch chan<- prometheus.Metric) {
i.metrics["pps"] = ppsSessionsMetric
ch <- prometheus.MustNewConstMetric(ppsSessionsMetric.desc, prometheus.GaugeValue, float64(sessionInfo.Pps), labelValues...)

// Packets per second (xml: cps)
cpsSessionsMetric := SessionMetric{
desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, SessionSubsystem, "session_cps"),
"Session info: connections per second",
SessionLabelNames,
nil,
),
}
i.metrics["pps"] = cpsSessionsMetric
ch <- prometheus.MustNewConstMetric(cpsSessionsMetric.desc, prometheus.GaugeValue, float64(sessionInfo.Cps), labelValues...)

// Kilobits per second (xml: kbps)
kbpsSessionsMetric := SessionMetric{
desc: prometheus.NewDesc(
Expand Down

0 comments on commit 6862774

Please sign in to comment.