I've setup SQL monitoring with this template I found on the zabbix wiki
but I need to monitor the size of some tables and the only solution I can think of is to make a bunch of queries for every single value I want which seems very inefficient and adds load to the DB server for nothing.
The following query gives me the size stats I want
USE MYDB;
GO
EXEC sp_spaceused N'MYTABLE';
GO
but per the zabbix docs, the database monitor item can't use that query (and I'm no SQL expert and am having trouble finding an equivalent select statement).
Assuming I can find a decent query, is there a way to take multiple data points from a query and map them to single values within zabbix?
I don't have full control of the DB server so getting the windows agent on there is about all I can probably do and I don't know if I have any command line SQL stuff on there. It seems like maybe putting an sql file on the zabbix server and using unixodbc/zabbix sender might be a workaround but I don't really understand how to put the pieces togetes.
Surely someone must have figured this out... care to share?
but I need to monitor the size of some tables and the only solution I can think of is to make a bunch of queries for every single value I want which seems very inefficient and adds load to the DB server for nothing.
The following query gives me the size stats I want
USE MYDB;
GO
EXEC sp_spaceused N'MYTABLE';
GO
but per the zabbix docs, the database monitor item can't use that query (and I'm no SQL expert and am having trouble finding an equivalent select statement).
Assuming I can find a decent query, is there a way to take multiple data points from a query and map them to single values within zabbix?
I don't have full control of the DB server so getting the windows agent on there is about all I can probably do and I don't know if I have any command line SQL stuff on there. It seems like maybe putting an sql file on the zabbix server and using unixodbc/zabbix sender might be a workaround but I don't really understand how to put the pieces togetes.
Surely someone must have figured this out... care to share?
Comment