Check SQL database - Performance?

Hi,
today I added a new check to see if a specific entry in the database is correct.
It’s a pretty long SELECT statement with many joins, but it could be copy&pasted into CheckMK anyway and it works.

This is the output:

+------------+------+-----------+---------------+
| benutzerid | pid  | entity_id | schulkennzahl |
+------------+------+-----------+---------------+
|       1033 |  392 |       392 | 999999        |
+------------+------+-----------+---------------+
1 row in set (0.17 sec)

Now, CheckMK expects the first row to be the Status Code (0 for OK, …) the second one a text and the third one the performance data.
So, CheckMK says now: OK - 392: 1033
I set the upper and lower levels, so that (only) 1033 is ok, which kind of works, but not as intended I guess
So far it would be ok with me, even with the text (392) being nonsense, but other the problem is that the performance data is also not correct: it’s also 392 (all the time, of course), instead of 0.17 seconds.
This creates a sad, boring graph. :wink:

Did I get something completely wrong with the configuration or do I need to create a sophisticated SQL-Query to show the execution time inside the response row?
If the latter is the case I need some advise how to do that.

TIA,
Roland.

Is noone using SQL-Checks with performance graphs?

Which SQL check do you use? A custom one or one of those already shipped with checkmk? Also, which Database do you use? The output looks like MySQL to me, but I might be wrong.
Do you use a so-called local check or a set of agent plugin and check plugin?

I’m using the already built-in check: “Check SQL database”
I don’t know, if it’s a local check or a agent/plugin-set. Whatever the built-in stuff uses, I guess. :wink:

It is a MariaDB-Server in Version 10.1.44-0.

I had to google that check first. It doesn’t appear to be included in my checkmk version 1.6.0. You are talking about the one referred to in this post, right?

Sorry, but in that case I’m out. :frowning:

EDIT: I stand corrected. It is an active check and it is still included in checkmk 1.6.0. I haven’t used it before, though.

Yes, that looks quite like it.
I’m also using 1.6.0 and I didn’t install any Plugins yet. Strange, that you don’t have it.

However, I don’t care which check I use, as long as I can check a certain output and get performance graphs. If another plugin can do that better, I’m all in.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.