Can someone please provide a step by step how-to on monitoring MS SQL databases? Primarilly, I'm interested in being able to perform SQL queries via zabbix and being able to report on the values returned.
Ad Widget
Collapse
Monitoring MS SQL Databases
Collapse
X
-
Tags: None
-
Not a step by step, but perhaps a helpful pointer.
Look at the MySQL user parameters in the Unix zabbix_agentd.conf.
You should be able to do something similar for MS SQL using osql, for example:
UserParameter=mssql.servertime,osql -E -S .\Server -Q "print + getdate()"Comment
-
Rudd -- Exactly what I was looking for. I didn't even think of OSQL. Thanks a lot. I thought I had read something about zabbix having some sort of ODBC connector. Is this used for something different?Comment
-
I think you are referring to the Item Type Database Monitor. Apparently that is not supported yet: http://www.zabbix.com/forum/showthread.php?t=21339
One note on the UserParameter. If you are planning to monitor a lot of items this method turns our rather expensive as each check has to fork osql, login etc.
In that case it may be worth looking into zabbix_sender. This will allow you to use an external script/program that can more efficiently gather all data and pipeline it all back in one go to Zabbix.
Pros and cons in everything
Comment
-
-
I'm trying to configure an item to run a select query on a SQL Server and I can't seem to get past this error:
Data source name not found, and no default driver specified
.
Tried editing the odbc.ini file but it didn't work. Tried testing using isql, but it alwayes return "Could not SQLConnect".Comment
-
If you cannot get a value from a command line, Zabbix will not be able to connect also.
Try to double check your unixODBC configuration (https://support.zabbix.com/browse/ZB...#comment-86065).
Is it possible that credentials are not correct? Have you checked this?Comment
-
Thanks for the help. Unfortunately, the credentials are correct. I think it requires a MS SQL specific driver to be installed and that one may or maynot be free.Comment
-
It is not necessary to install any drivers on MS SQL Server side. I believe unixODBC configuration is not correct. Have you used the following steps to configure it (https://support.zabbix.com/browse/ZB...#comment-86065)?Comment

Comment