Discussion:
[Check_mk (english)] CMK Raw 1.4.0p26 - Active Check - Check SQL Database - Upper/Lower levels not working?
Mirza Dedic
2018-09-18 16:17:36 UTC
Permalink
Hi,

I am trying to configure the "Check SQL database" WATO rule, checking a SQL 2012 database table for number of records.

The SQL statement that runs is..

SELECT COUNT (*) FROM [dbo].[SOME_TABLE]

This returns a numeric value.

I set the Lower levels for first output item to:

Warning if below: 10.00
Critical if below: 1.00

I want to get a warning if the table has no records, but it does not seem to be working.

The check itself works and the results are..

OK - 3109602

I just want to add warning/critical threshold around this.

Am I doing something wrong?
Paul Dott
2018-09-18 20:47:11 UTC
Permalink
You have to format the output a little. You can do this in the query. so
this
select count(*) FROM pg_stat_activity

becomes this:

select count(*) as Number, CONCAT('number of connections is ',count(*)) as
Text, count(*) as PerfData FROM pg_stat_activity
Post by Mirza Dedic
Hi,
I am trying to configure the "Check SQL database" WATO rule, checking a
SQL 2012 database table for number of records.
The SQL statement that runs is..
SELECT COUNT (*) FROM [dbo].[SOME_TABLE]
This returns a numeric value.
Warning if below: 10.00
Critical if below: 1.00
I want to get a warning if the table has no records, but it does not seem to be working.
The check itself works and the results are..
OK - 3109602
I just want to add warning/critical threshold around this.
Am I doing something wrong?
_______________________________________________
checkmk-en mailing list
Manage your subscription or unsubscribe
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
Loading...