DB Monitoring using XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

DB Monitoring using XI

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: DB Monitoring using XI

Post by abrist »

Can you check the transaction log size with a query?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

Re: DB Monitoring using XI

Post by lafargeuser »

How do I do that ? Is this requirement feasible using Nagios.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Monitoring using XI

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked