I have a question reading monitoring a mariadb/mysql server on Windows 2019 datacenter server in connection with an 2.0.0p3 agent.
I have created a user with the corresponding settings in mariadb, copied the script in the corresponding agent dir (according to the documentation) und created the config file.
In the log of the agent, the plugin / script for mysql is called and the error no data - 0 bytes is displayed. In the monitoring host, the service is not detectable.
If I call the plugin in an elevated command promt, I get no response (only the cscript header is visible and an empty line but no errors). If I call the sql queries out of the check in a direct way with the config file, I get results.
This must also work without elevated prompt.
But for your problem to troubleshoot you can do the following. For the standalone testing you need to export the environment variable MK_CONFDIR with the folder name of your config file.
After this export you can start your script with a normal cscript call.
I have tested this - but the output is still the same: the header of the csripting host process and two blank (black) lines without any text / error message.
The following is the output without any config file.
Something like this should also happen if you make “cscript.exe mk_mysql.vbs” if there is a running MySQL/MariaDB service.
PS C:\Users\user\Desktop> cscript .\mk_mysql.vbs
Microsoft (R) Windows Script Host, Version 5.812
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
<<<mysql_ping>>>
[[MariaDB]]
C:\Program Files\MariaDB 10.5\bin\mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'user'@'localhost' (using password: NO)'
<<<mysql>>>
[[MariaDB]]
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: NO)
<<<mysql_capacity>>>
[[MariaDB]]
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: NO)
<<<mysql_slave>>>
[[MariaDB]]
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: NO)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.