Comments (8)
I would love to have this feature.
Thank you for this awesome project.
from sql_exporter.
+1 for this feature, we currently have scenario that needs counter type metrics.
from sql_exporter.
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.
from sql_exporter.
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.
from sql_exporter.
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:
- the metric isn't cumulativ
- the metric can go up and down
from sql_exporter.
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 ?
from sql_exporter.
I may have misunderstood or made false assumptions about your use case. If you export a SELECT count(*) FROM ... WHERE <...timerange limit...>
as a prometheus counter, my above statement is true. If we where to implement a counter that adds the result of a query to the counter, that counter would be a valid prometheus counter. But that would imply that we limit the timerange to the time since the last scrape and here the trouble begins....!
So I would suggest to use delta()
as promQL function or (if possible) instrument the code to count the number of failures
from sql_exporter.
@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.
from sql_exporter.
Related Issues (20)
- start up docker HOT 1
- Unknown driver "mssql+pyodbc" HOT 1
- Missing docker image for v0.4.8 in ghcr.io HOT 2
- Missing MSSQL Integration Example HOT 2
- Possible to calculate query time taken? HOT 2
- Cannot connect to clickhouse HOT 7
- Image name is not correct in [deployment.yml] HOT 2
- Connection properties is not working without password HOT 4
- exporter has a lot of default metrics HOT 1
- Postgres Operator sidecar HOT 1
- The Makefile does not work HOT 4
- Azure Active Directory authentication (AAD) HOT 2
- `allow_zero_rows` does not work HOT 2
- Clickhouse http connection support HOT 5
- help needed: measure available disk space HOT 4
- Interval by query
- Support new postgres features HOT 3
- Add posibility to run query on a given connection HOT 1
- Missing /src/vendor/net/netip HOT 1
- ConfigMap with template strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql_exporter.