Using mssql.vbs

Hello
maybe I have a problem in principle. I want to monitor some MS SQL Server (2012/2017). Check MK (raw) ist running and the agent on then Windowsserver is running. The file mssql.vbs is located in …\checkmk\service\plugins. If I run cscript mssql.vbs there is some output. I found some SQL things in [Manual Checks]. I tried MSSQL Databases properties. But what values must set in Database identifier. I tried the databasename, also with servername and port (like servername,port,databasename). But it is always pending. Any Idea?

Thanks Andreas

Hi Andreas

The agent runs with NT authority\system please check which rights it has in the SQL instance. To do this in MSSQL Studio right click on the top of the instance - Security - The user needs at least an additional Connect to any DB.

With check_mk_agent test you can check if the plugin is also executed by the CheckMK agent.

BR,
Simon

1 Like

one addition to @meis’s answer - you can also create a mssql.ini file inside the config directory (C:\ProgramData\checkmk\agent\config)
There you can put login credentials inside if the access as local system is not possible.
Example you can find in the header of the mssql.vbs script.

These settings have nothing to do with the normal mssql.vbs script. Ignore these :wink:

Hello Simon and Andreas
thank you for your support. I found an other think. I copy mssql.vbs to C:\ProgramData\checkmk\agent\plugins
Now the connection is not pending and it is green. But it counts 0 connection. But I have now something to ‘play’

kind regards
Andreas

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