Skip to content

Return results even if some query fails #328

@Maros112358

Description

@Maros112358

Is your feature request related to a problem? Please describe.
In sql_exporter 0.12.1, when using multiple targets and jobs, if one of the requests failed when scraping /metrics, other metrics were returned successfully. In sql_exporter 0.12.2, if one query fails, whole request returns 500: Internal server error.

Describe the solution you'd like
I prefered the behaviour in 0.12.1. Since this was probably changed intentionally in the last release, I would like the option to return succesfully queried metrics, even if some of them fail.

Describe alternatives you've considered
Using 0.12.1, but I need some bug fixes introduced in 0.12.2. I also removed queries usually returning errors, but this is not good long term solution for me.

Additional context
I am monitoring multiple databases, and sometimes some queries fail, affecting data from other databses. I would like to avoid this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions