MSSQL DB free space monitor?!
MSSQL DB free space monitor?!
Using command check_mssql_database.py to monitor remote MSSQL Server, but the reported value didn't match with DB space?!
You do not have the required permissions to view the files attached to this post.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL DB free space monitor?!
It is 511MB off, is it possible 5011MB were added in the time it took you to take both screenshots?
Re: MSSQL DB free space monitor?!
The second screenshot was immediately taken after the first one, the DB will not increase 500MB in that little time.
Just wondering how check_mssql_database.py calculate the value?
Just wondering how check_mssql_database.py calculate the value?
Re: MSSQL DB free space monitor?!
xpertech,
Allocated Space - Free Space = Total used
6659MB - 6039MB = 620MB
Plugin calculated space looks like 6294528KB / 1024 = 5527MB
This is a huge difference if i'm doing my math right...
I'll test this on one of our databases to see if I get similar results.
-Yancy
Allocated Space - Free Space = Total used
6659MB - 6039MB = 620MB
Plugin calculated space looks like 6294528KB / 1024 = 5527MB
This is a huge difference if i'm doing my math right...
I'll test this on one of our databases to see if I get similar results.
-Yancy
Re: MSSQL DB free space monitor?!
Code: Select all
with fs
as
(
select database_id, type, size * 8.0 size
from sys.master_files
)
select
name,
(select sum(size) from fs where type = 0 and fs.database_id = db.database_id) DataFileSizeKB,
(select sum(size) from fs where type = 1 and fs.database_id = db.database_id) LogFileSizeKB
from sys.databases db
-Yancy
Re: MSSQL DB free space monitor?!
yancy wrote:Can you run the following and verify size is accurate.Code: Select all
with fs as ( select database_id, type, size * 8.0 size from sys.master_files ) select name, (select sum(size) from fs where type = 0 and fs.database_id = db.database_id) DataFileSizeKB, (select sum(size) from fs where type = 1 and fs.database_id = db.database_id) LogFileSizeKB from sys.databases db
-Yancy
We execute that MSSQL command, the displayed value was matched with the DB's GUI properties. So, how the check_mssql_database.py calculate the space?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL DB free space monitor?!
You may want to look into the resolution listed in the comments section of the plugin here:
http://exchange.nagios.org/directory/Pl ... ts/details
It looks like Willem ran into the same issue with the plugin and made a manual change.
http://exchange.nagios.org/directory/Pl ... ts/details
It looks like Willem ran into the same issue with the plugin and made a manual change.