Page 1 of 1

DB Monitoring using XI

Posted: Mon Jan 27, 2014 5:41 am
by lafargeuser
Is this possible using Nagios XI, I want to monitor MS SQL Database e.g. If transaction log file cross 5 GB Nagios should send an alert.

Re: DB Monitoring using XI

Posted: Mon Jan 27, 2014 11:20 am
by abrist
Can you check the transaction log size with a query?

Re: DB Monitoring using XI

Posted: Wed Jan 29, 2014 1:16 am
by lafargeuser
How do I do that ? Is this requirement feasible using Nagios.

Re: DB Monitoring using XI

Posted: Wed Jan 29, 2014 9:06 am
by scottwilkerson
Something like this can be used with the MSSQL Query wizard, replacing YOURDBNAMEHERE with the DB name

Code: Select all

SELECT (size * 8.0)/1024.0 AS size_in_mb, CASE WHEN max_size = -1 THEN 9999999  ELSE (max_size * 8.0)/1024.0 END AS max_size_in_mb FROM YOURDBNAMEHERE.sys.database_files WHERE data_space_id = 0
Credit:
http://stackoverflow.com/questions/1983 ... mmatically