diff --git a/collector/jsz.go b/collector/jsz.go index 9aaee1c9..7da6b2d2 100644 --- a/collector/jsz.go +++ b/collector/jsz.go @@ -91,7 +91,7 @@ func newJszCollector(system, endpoint string, servers []*CollectedServer) promet serverLabels, nil, ), - // jetstream_stream_total_messages + // jetstream_server_total_streams streams: prometheus.NewDesc( prometheus.BuildFQName(system, "server", "total_streams"), "Total number of streams in JetStream", @@ -147,14 +147,14 @@ func newJszCollector(system, endpoint string, servers []*CollectedServer) promet streamLabels, nil, ), - // jetstream_stream_state_first_seq + // jetstream_stream_first_seq streamFirstSeq: prometheus.NewDesc( prometheus.BuildFQName(system, "stream", "first_seq"), "First sequence from a stream", streamLabels, nil, ), - // jetstream_stream_state_last_seq + // jetstream_stream_last_seq streamLastSeq: prometheus.NewDesc( prometheus.BuildFQName(system, "stream", "last_seq"), "Last sequence from a stream", diff --git a/walkthrough/grafana-jetstream-dash-helm.json b/walkthrough/grafana-jetstream-dash-helm.json index e8e89e7b..48f36a3d 100644 --- a/walkthrough/grafana-jetstream-dash-helm.json +++ b/walkthrough/grafana-jetstream-dash-helm.json @@ -760,7 +760,7 @@ "pluginVersion": "8.3.4", "targets": [ { - "expr": "sum(rate(nats_stream_total_messages{server_id=~\"$server\",stream_name=~\"$stream\"}[$__rate_interval])) by (stream_name)", + "expr": "sum(rate(nats_stream_last_seq{server_id=~\"$server\",stream_name=~\"$stream\"}[$__rate_interval])) by (stream_name)", "hide": false, "interval": "", "legendFormat": "{{stream_name}}", diff --git a/walkthrough/grafana-jetstream-dash.json b/walkthrough/grafana-jetstream-dash.json index 50303a1c..977a8b57 100644 --- a/walkthrough/grafana-jetstream-dash.json +++ b/walkthrough/grafana-jetstream-dash.json @@ -760,7 +760,7 @@ "pluginVersion": "8.3.4", "targets": [ { - "expr": "sum(rate(jetstream_stream_total_messages{server_id=~\"$server\",stream_name=~\"$stream\"}[$__rate_interval])) by (stream_name)", + "expr": "sum(rate(jetstream_stream_last_seq{server_id=~\"$server\",stream_name=~\"$stream\"}[$__rate_interval])) by (stream_name)", "hide": false, "interval": "", "legendFormat": "{{stream_name}}",