/build/static/layout/Breadcrumb_cap_w.png

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. 


Computer Name

System Description

MAC Address

IP Address




0 Comments   [ + ] Show comments

Answers (1)

Posted by: chucksteel 4 years ago
Red Belt
1

Give this a go:

SELECT MACHINE.NAME,
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'
FROM MACHINE
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
WHERE 
D.NAME like "Drive C:%"
and D.PERCENT_USED > 85
AND LABEL.NAME = 'Special computers'


Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ