Hi,
How can we stop checkmk continuing to query OFFLINE SQL databases that are also disabled in checkmk?
Hi,
How can we stop checkmk continuing to query OFFLINE SQL databases that are also disabled in checkmk?
If you use the new replacement for the old mssql.vbs script you will also have a YAML config file for this agent plugin. Inside this config file you can disable single Instances.
Hi, Andreas
I’m facing the same problem.
I disabled the database in the yaml config file but the agent still tries to log in into the offline database. I don’t know if this is because i did something wrong or maybe a bug.
The section in yaml file if i’m not mistaken is this:
discovery:
detect: true
exclude:
- DBName
Is this correct? I’m using the old version of the plugin?
Thanks in advance.
If you use the agent bakery you can try this option here.
Hi Andreas,
Thanks for this info. I was able to find that the feature “Skip local instances that are not running” was introduced in 2.5.0p8 version. Hope this piece of information helps @mgillespie1981 .
Nice too know - i only checked with my dev system and this is running the daily 2.5 builds ![]()
Has you tested this option, does it stop the logs and attempts showing up in SQL? We aren’t yet on version 2.5.
I did not test this yet, but i will test it at the end of August. I’ll update this conversation when tests are done.
checkmk should be aware that it cannot connect to an offline database. A similar issue exists with regards to Always On Availability Groups and non-readable secondary replica databases. This issue has been previously discussed in a forum post or two.
I don’t understand 2.5 introduces this option but you still have to edit the yml files to exclude the databases.
Edit** I understand the below option is more for instances and not databases.
Whilst support let me know you’re able to exclude the databases in version 2.4.1p31 without this option.
"I tested the mk-sql.yml additional lines to exlcude offline database on 2.4.31 and it didn’t produce the log line errors on my side so it should work on your current 2.4 version.
connection:
exclude_databases:
- OFFLINEDBtoExclude"
