-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
up
metric to show that database connection was successful
#366
Comments
Hi @fsiler, this feature is already available for named targets. If you use a single connection mode (with Besides that, in the upcoming release (it's already merged to As for anything related to buckets/histograms, this topic is currently on hold, as it requires accumulating and processing data in memory, which is not really lightweight. Without any additional mechanism to flush data periodically, the exporter would go out of memory pretty quick (and this is common in the area of Prometheus exporters). |
This works great, many thanks! |
Sorry to bother- was hoping to get a new release with the |
Hi @fsiler, there's no regular release schedule, but I try to release at least every quarter. You can checkout the |
Hey @fsiler, |
Is your feature request related to a problem? Please describe.
Right now, the
/metrics
endpoint returns all available data if the connection to the database is successful. However, it would be really useful to have anup
orscrape_successsful
ordb_connection_successful
metric which shows that:I've also had occasion to notice when, for example with connecting with an unprivileged account, that an incomplete set of metrics was returned. I would therefore also propose reflecting a metric (perhaps
sql_all_metrics_succeeded
) on/metrics
which would, for example, have the value 1 when all requested queries are exposed and 0 otherwise, so that a user might have a cue to look in the logs for details.Describe the solution you'd like
Metrics:
sql_exporter_connection_successful
sql_exporter_queries_successful
sql_exporter_queries_bucket
configured
: number of configured queriessuccessful
: number of successfully run queriesfailed
: number of failed queriesDescribe alternatives you've considered
Right now I'm having to write ugly
absent()
queries and do other detective work to figure out the former condition, and I haven't the faintest idea how to systematically work the second issue.Additional context
n/a
The text was updated successfully, but these errors were encountered: