Skip to content

Monitor Postgres query result #2342

@thedatabaseme

Description

@thedatabaseme

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

New Monitor

🔖 Feature description

I would love to see the possibility within Uptime-Kuma, to specify an expected result within a SQL query monitor type (e.g. Postgres).
So a SQL monitor would not only check if it can connect to a database and can execute a query.
Another wish from my side would be, to store the query result in the heartbeat data. You could cut the result to save space, but at least one would have some idea on how the result looked like.

✔️ Solution

I want to check for the replication status of a Postgres cluster and if a specific cluster member is in recovery or not. So a query like select * from pg_is_in_recovery(); would return either t (true) or f (false). I would like to have the possibility to monitor for the expected result.

❓ Alternatives

If you don't consider to implement this request, at least the result should be exported as a metric so that I can filter on it later. Implementing both options, would be the best solution.

📝 Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:monitorIssues or PRs related to monitorsfeature-requestRequest for new features to be addedgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions