Comments (3)
Good question that I should have clarified before. That's a timeout that starts when a prometheus instance calls the metrics endpoint, which is what triggers each query to run and to measure. Without the prometheus instance scraping the metrics endpoint, no queries will run at all.
As best as resources allow, every query will be called in parallel and then each query must finish before that timeout happens, or else each failed individual query will contribute to a built-in "timed out queries" gauge metric that merely shows how many queries are timing out.
There is currently a minor ability to set an individual query timeout. Each query might have a timeout also set, but the timeout that will be used is the minimum between the global timeout and the query timeout.
"Queries": [
{
"Name": "mssql_deadlocks",
"Query": "SELECT cntr_value FROM sys.dm_os_performance_counters where counter_name = 'Number of Deadlocks/sec' AND instance_name = '_Total'",
"Description": "Number of lock requests per second that resulted in a deadlock since last restart",
"Columns": [
{
"Name": "cntr_value",
"Label": "mssql_deadlocks",
"Usage": "Gauge",
"DefaultValue": 0
}
],
"MillisecondTimeout": 2000
}
],
"MillisecondTimeout": 4000
}
The reason that I so insistently throw a hard limit on query times out there is that I don't want monitoring to be a big performance hit on my SQL Server instances, AND because I tend to make aggressively small timeouts on prometheus scrape targets to keep things as light as possible.
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
from mssql_exporter.
And to the last part of your question, you always could start multiple exporter processes, but that seems like a lot of overhead. I'd rather reach a solution that doesn't require a lot of these instances.
from mssql_exporter.
Thank you for your answers.
What would you recommend as a possible way, if some querys are taking more time?
First thing that came to my mind is: offloading the query to e.g. SQL Server Agent and caching the results in temporary tables, which then can be scraped quickly.
Probably I should ensure my querys don't take that darn long though :-/
from mssql_exporter.
Related Issues (19)
- invalid metric type "GAUGE" error for MSSQL exporter HOT 5
- invalid metric type " gauge" error for MSSQL exporter, also invalid metric type " counter" error for MSSQL exporter HOT 1
- Prometheus Error - invalid metric type "GAUGE" HOT 4
- how can i get more query in prometheus HOT 2
- Return value of '1' for informational metric HOT 1
- metrics .json demo HOT 1
- Run query each X seconds
- how to get the query data correctly
- Change con prometheus 2.4
- mssql_deadlocks should be a counter
- connection timeout HOT 1
- Unable to fetch metrics which column consist "String with spaces in between"
- Collation Problem
- Customizing the label names and extracting the values for the same HOT 1
- Connection failing HOT 5
- Connect failed HOT 4
- How to expose timestamp in metrics HOT 1
- System.Globalization.Invariant and SqlClient issue 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 mssql_exporter.