Skip to content

Provide an error metric on each scrape #256

@Stift

Description

@Stift

Is your feature request related to a problem? Please describe.
When scraping /metric all working queries are reported as metrics. Sometimes it happens that the software behind the database is changing the database schema and a query fails. Therefore only working metrics will be returned on /metric.

Describe the solution you'd like
I would like to propose a sql_query_error_count metric to be issued as well with the other metrics where errors or non-working queries could be counted. By that we could create an alarm when this is != 0.

If possible you could also think of a more sophisticated way and give a more detailed metric sql_query_error like

sql_query_error{collector=NAME, file=FILENAME} 1

Describe alternatives you've considered
The /sql_exporter_metrics endpoint is not helpful as this returns no information about errors and is called independently to the call of /metrics

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions