NadirJ opened a new issue, #15032:
URL: https://github.com/apache/pulsar/issues/15032
**Describe the bug**
I'm monitoring Pulsar and I would like the ability to monitor how many
consumers are connected and subscribing from a given subscription.
Right this metric already exists `pulsar_consumers_count`
It tells how many consumers are connected to a given topic/partition.
If the label `subscription` could be added to this metric then I can
correlate it various subscription metrics like
`pulsar_subscription_back_log` and `pulsar_subscription_msg_rate_out`
Specifically, I'm trying to detect "Stuck" Subscriptions and alert on this
case when it occurs
Here is the sample prometheus alerting rule I need
```
- name: stuck-subscription
rules:
- alert: StuckParitionOrTopic
expr: pulsar_subscription_back_log > 0 and
pulsar_subscription_msg_rate_out == 0 and pulsar_consumers_count > 0
for: 5m
labels:
severity: critical
annotations:
description: Subscription for {{ $labels.topic }} appears to be
stuck.
identifier: '{{ $labels.topic }}'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]