Trying to Get C Drive Utilization Alerts by Device Label - k1000
Right now i have alerts but they are not sending the disk % in email and I am not able to filer by device labels. Below is the SQL statement I want to be able to filter by device label rather than just AND OS_NAME like '%server%',
SELECT MACHINE_DISKS.PERCENT_USED AS MACHINE_DISKS_PERCENT_USED, MACHINE_DISKS.DISK_FREE as DISK_FREE_SPACE_GB, MACHINE_DISKS.DISK_FREE AS FREE_SPACE, MACHINE.NAME AS SYSTEM_NAME FROM MACHINE_DISKS JOIN MACHINE ON (MACHINE.ID = MACHINE_DISKS.ID) WHERE MACHINE_DISKS.PERCENT_USED > '85' AND MACHINE_DISKS.NAME LIKE '%Drive C:%'
AND OS_NAME like '%server%'
Below is how they are coming through now. I am trying to get Drive Size GB, Space Used GB, and % Free as headers rather than description,Mac Address, and IP are.
Give this a go:
D.NAME as "Disk Name",
D.DISK_SIZE as 'Drive Size',
D.DISK_USED as 'Space Used',
round((D.DISK_FREE/D.DISK_SIZE)*100, 1) as '% Free'
JOIN MACHINE_DISKS D on MACHINE.ID = D.ID
JOIN MACHINE_LABEL_JT on MACHINE_ID = MACHINE.ID
JOIN LABEL on LABEL.ID = LABEL_ID
D.NAME like "Drive C:%"
and D.PERCENT_USED > 85
AND LABEL.NAME = 'Special computers'