Closed wayt closed 6 years ago
I think your need is specific but you can create a generic check that something with a conf like this:
- type: SqlCheck
checks:
- type: IntQueries
sql: SELECT 1
warn: 2
crit: 4
- type: StringQueries
sql: SELECT 'OK'
result: 'OK'
[...]
config:
connection: psql://user@password.......
In all case you can create a python plugin and import check even if not in this repo, just use extra_plugin -> https://sauna.readthedocs.io/en/latest/dev/custom.html#custom
yep, that's what I had in mind. I'll take a look on how to implement an sql plugin
I agree with @bewiwi, I'm unsure how to deal with different databases though since they can require different drivers. Anyway if would be a great addition to the list of plugins.
I was wondering how to implement alerts based on a PostgreSQL query. My need here is to trigger a critical status if I have an entry older than XXX in my database.
Would a PostgresSQL plugin with custom query support be relevant ? Or is it too specific, and I should use the
command
plugin ?