Skip to content

Commit db58823

Browse files
authored
Update prometheus.go
Newmetric added - clientLastMetricTimestamp
1 parent c0bd044 commit db58823

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

prometheus.go

+8
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,20 @@ var hepFileFlushesError = prometheus.NewCounter(
4343
},
4444
)
4545

46+
var clientLastMetricTimestamp = prometheus.NewGauge(
47+
prometheus.GaugeOpts{
48+
Name: "hfp_client_in_last_metric_timestamp",
49+
Help: "Inbound client's last metric arrival",
50+
},
51+
)
52+
4653
func startMetrics(wg *sync.WaitGroup) {
4754
prometheus.MustRegister(connectedClients)
4855
prometheus.MustRegister(connectionStatus)
4956
prometheus.MustRegister(hepBytesInFile)
5057
prometheus.MustRegister(hepFileFlushesSuccess)
5158
prometheus.MustRegister(hepFileFlushesError)
59+
prometheus.MustRegister(clientLastMetricTimestamp)
5260

5361
http.Handle("/metrics", promhttp.Handler())
5462
http.ListenAndServe(":"+*PrometheusPort, nil)

0 commit comments

Comments
 (0)