How to add offending disk to existing alert
Hello,
I have an alert for Servers that have a disk with disk usage over 95%. However it does not show which disk is the culprit. I can get i t to show all the drives on that Server but how do I get it to show only the offending disk? The SQL Query is below:
select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
where ((( OS_NAME like '%Server%') AND (1 in (select 1 from ORG1.MACHINE_DISKS where MACHINE.ID = MACHINE_DISKS.ID and MACHINE_DISKS.PERCENT_USED > '95')) ))
Answers (0)
Be the first to answer this question
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1 LEFT JOIN ORG1.MACHINE_DISKS D ON MACHINE.ID=D.ID
where (( OS_NAME like '%Server%') AND D.PERCENT_USED > '95') - paulfaz 6 years ago
select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
where ((( OS_NAME like '%Server%') AND (1 in (select 1 from ORG1.MACHINE_DISKS where MACHINE.ID = MACHINE_DISKS.ID and MACHINE_DISKS.PERCENT_USED > '95')) ))
Computer Name System Description MAC Address IP Address
CVMAPROD1 empty xx:xx:xx:xx:xx:xx4 nn.nnn.n.nnn
select MACHINE.NAME, D.NAME AS DISK_NAME from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1 LEFT JOIN ORG1.MACHINE_DISKS D ON MACHINE.ID=D.ID
where (( OS_NAME like '%Server%') AND D.PERCENT_USED > '90')
Computer Name System Description MAC Address IP Address
FSISRV
WSDEV1
LISLESRV1
VCMSRV
WSTEST1
CVMAPROD1
CVMAPROD1 - JeffKitchens 6 years ago
select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS,
MACHINE.NAME, D.NAME as DISK_NAME from ORG1.MACHINE
LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1 LEFT JOIN ORG1.MACHINE_DISKS D ON MACHINE.ID=D.ID
where (( OS_NAME like '%Server%') AND D.PERCENT_USED > '90')
Result is:
Computer Name System Description MAC Address IP Address
FSISRV empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
WSDEV1 empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
LISLESRV1 empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
VCMSRV empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
WSTEST1 empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
CVMAPROD1 empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn
CVMAPROD1 empty xx:xx:xx:xx:xx:xx nn.nnn.n.nnn - JeffKitchens 6 years ago