I created an sql query that works on my server when using SQL management studio.
Easy query that returns % free space in the LOG db:
#select # #( (SUM( size)/128.0 - sum(CAST(FILEPROPERTY(name,'SpaceUsed') AS INT))/128.0)/(sum(size)/128.0) )*100 as Log_Pct_Free #from sys.database_files where type=1 group by type
I added this query on C:\Program Files (x86)\PRTG Remote Probe\Custom Sensors\sql\mssql
and created an microsoft sql sensor with option process data table on, and alert at 5% free space.
the free space would for example be 70% on the actual server but PRTG will always return a value between 98 and 99%.
Could I know how the sensor executes the query to try and find the issue?
Add comment