SQL Server databases Item Unknown error using mssql.vbs

Hi all,

First the details:
Check_mk raw 1.5.0p21
Windows Server 2016
SQL Server 2016
Using the mssql.vbs plugin

We occasionally get the following errors for all the databases on our sql server:
UNKN - Item not found in agent output
This will occur maybe once every couple of days (cannot find a pattern) and last for anything from 5 minutes to a half hour before reporting Ok.

I have seen online that this could relate to the server being under pressure and the agent not being able to report, however there don’t appear to be any performance issues with the server that I can find.

A workaround I have seen is to edit the check_mk.ini file and set the execution of the plugin to asynchronous and increase the cache_age. I have done this (current cache_age 300) but it doesn’t seem to have solved the issue. I have just doubled the cache_age to 600 to see what happens. It is the only plugin we have running.

Does anyone have any thoughts on what the issue coud be?

thanks

jc

Hello jcrow,

i would recommend to take a look into the agent output at that time the error occurs.
There is propably an error message or even no output from the plugin at all.

If you see at least each section at least once in the agent output, you can be sure that the script is running, because the plugin gives out each section once (line 107, mysql.vbs).

I think, this is the best you can do for now, because there are to few information to do anything more.

Regards
Kruzgoth

Thanks for the reply Kruzgoth.

Can you advise how to look into the agent output? Would the historical output be stored somewhere on the check_mk server or would I have to look at it as the error is occurring?

All the other checks don’t seem to have a problem: database file checks, locks, cache etc.

jc

I’m not sure how to see the agent output when it runs the plugin but I ran the mssql.vbs plugin manually on the server while check_mk showed the “UNKN - Item not found in agent output” error.

A message box appeared listing each section. A message box then appeared for each of the service checks. There were no errors.

Here is what the check_mk web interface shows when this occurs. Other sql server checks seem to run fine.

cheers

jc

hi jcrow,

you can just use the “Download agent output”-option on your Check_MK Service:
image

Unless the error appears again, there is no chance to review the problem itself.
If it appears, just download the agent and take a look into the mssql-section. If you can’t find the
problem by yourself, i would recommend to post the myssql-section of your agent output, so we all can take a look onto it.

Thanks Kruzgoth. So I’ve managed to download the agent output as the error was occuring and compared it to the output when it is working.

No error messages and all the mssql sections are listed in both files at the topish.

The only difference is there is no data for the following sections lower in the output for when the error occurs:
<<<mssql_backup:sep(124)>>>
<<<mssql_transactionlogs:sep(124)>>>
<<<mssql_datafiles:sep(124)>>>
<<<mssql_databases:sep(124)>>>
<<<mssql_connections>>>

So it seems for whatever reason that the agent isn’t seeing any databases for these brief periods of time but I can’t nail down why. No related messages recorded in the SQL Server log.

cheers

jc

Hey jcrow,

these are given out by default. Like an empty template, so the Check_MK Server knows, that there is a mssql-plugin running and what exactly is running.
The information from the plugin itself should be seen in separate columns.

If you can’t find any error information in the logs on your server, the only think you can do, as far as i can think, is testing the plugin the moment, it fails for the Check_MK Server.
There is propably an error which will not be displayed, because it is stored in some variables.

cheers