-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider supporting Counter type #14
Comments
I would love to have this feature. Thank you for this awesome project. |
+1 for this feature, we currently have scenario that needs counter type metrics. |
Hi @pasali, could you elaborate on your scenario, so I can think about it? As Dominik said, we'd like to keep the exporter as simple as possible, but this shouldn't prevent us from implementing important features. |
Hi, @zwopir Let say i have table called 'failed_sms' and i want to fire alerts when count of failed SMSes in last 5 minutes greater than 1. |
I understand. But that's not a prometheus counter. Have a look at https://prometheus.io/docs/concepts/metric_types/#counter. In your use case there are two mismatches to consider the metric a prometheus counter:
|
I can not use type gauge either. Because if query returns zero rows, metric value stays the same.I see you don't change the metric value when query returns zero rows because this can create ambiguity(my opinion). So i think if i can store my metrics as counter and look for the increase then i i can fire alerts. Or do you have any suggestions ? |
I may have misunderstood or made false assumptions about your use case. If you export a |
@zwopir thanks for the suggestion, but i think best way to handle this is usage type gauge and always return rows to make metric value 0. |
We should consider supporting Counter type metrics. In general I'd like to keep the SQL Exporter as simple as possible, but it may make sense to support Counters.
The text was updated successfully, but these errors were encountered: