You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be a good thing to add a parameter that checks how many databases were found and compares it to how many databases were requested. It happened (not only once) that some databases were missing and everybody thought they were OK 😆
E.g.:
I want to find out database transactions
/usr/local/nagios/libexec/check_mssql_health --server server --username nagios --password blabla --mode transactions --warning 10 --critical 15 --name='^((master|tempdb|testdatabase))' --regexp --commit
OK - tempdb has 0.0000 transactions / sec, master has 0.0000 transactions / sec | tempdb_transactions_per_sec=0.0000;10;15 master_transactions_per_sec=0.0000;10;15
As it can be seen, I submitted 3 databases for check, but got results for only 2 of them.
I think it would be a good improvement to double check how many databases were requested and how many databases were found and give a Warn / Crit message saying something like: you requested 7 databases but only 5 were found.
The text was updated successfully, but these errors were encountered:
But that name is only a regex pattern, it wouldn't be practical to determine how many databases should be found from that (IMO) because a slightly different pattern could have arbitrarily many results. However, I could see the value in a new option like --expected-database-count or similar, that may be what you were requesting anyway :)
Example: on a project, I was given the above regex to monitor those 3 databases. The admins were expecting that Nagios would monitor 3 databases ... only that someone deleted a DB and no one knew about it, Nagios never reported any error because database was not found. And they all thought everything is OK, all 3 databases are working, when in fact, 1 DB was deleted 😄
A "--expected-database-count" or something similar, would have helped because it we would have been notified that 1 DB is missing.
Of course, not everybody would need this option ... that's why I said "possible improvement" 😉
Hi,
It would be a good thing to add a parameter that checks how many databases were found and compares it to how many databases were requested. It happened (not only once) that some databases were missing and everybody thought they were OK 😆
E.g.:
I want to find out database transactions
/usr/local/nagios/libexec/check_mssql_health --server server --username nagios --password blabla --mode transactions --warning 10 --critical 15 --name='^((master|tempdb|testdatabase))' --regexp --commit
OK - tempdb has 0.0000 transactions / sec, master has 0.0000 transactions / sec | tempdb_transactions_per_sec=0.0000;10;15 master_transactions_per_sec=0.0000;10;15
As it can be seen, I submitted 3 databases for check, but got results for only 2 of them.
I think it would be a good improvement to double check how many databases were requested and how many databases were found and give a Warn / Crit message saying something like: you requested 7 databases but only 5 were found.
The text was updated successfully, but these errors were encountered: