/build/static/layout/Breadcrumb_cap_w.png

Help with Uptime since last reboot report.

I found this report https://www.itninja.com/question/k1000-reporting-custom-uptime-since-last-reboot-report. This report is will very handy and it works but I was wondering if someone helps me adjust the filtering? I'm only looking for Windows 10 machines.


I tried creating a smart label with only windows 10 but it doesn't like it.

SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE  WHERE ((OS_NAME like '%Microsoft Windows 10 Pro x64%') AND WHERE

left(UPTIME, locate(',', UPTIME) -1) > 15


This is what I have so far

SELECT MACHINE.NAME AS SYSTEM_NAME, USER_LOGGED, USER_FULLNAME,OS_NAME as OS_Name, (CONCAT(SUBSTRING_INDEX(UPTIME, ',', 1), ' days, ', SUBSTRING(UPTIME, LOCATE(',', UPTIME) + 1, LOCATE(':', UPTIME) - LOCATE(',', UPTIME) - 1), ' hours, ', SUBSTRING_INDEX(UPTIME, ':', -1), ' minutes')) AS UPTIME  FROM MACHINE  WHERE ((( exists  (select 1 from LABEL, MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID AND MACHINE_LABEL_JT.LABEL_ID = LABEL.ID  AND LABEL.TYPE <> 'hidden' and LABEL.NAME = 'UpTimeSinceLastReboot')) ))  ORDER BY UPTIME desc


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Hobbsy 1 year ago
Red Belt
0

Will just adding the OS to the WHERE statement do what you need

SELECT 

MACHINE.NAME AS SYSTEM_NAME, 

USER_LOGGED, 

USER_FULLNAME,

OS_NAME as OS_Name, 

(CONCAT(SUBSTRING_INDEX(UPTIME, ',', 1), ' days, ', SUBSTRING(UPTIME, LOCATE(',', UPTIME) + 1, LOCATE(':', UPTIME) - LOCATE(',', UPTIME) - 1), ' hours, ', SUBSTRING_INDEX(UPTIME, ':', -1), ' minutes')) AS UPTIME  

FROM MACHINE  

WHERE ((( exists  (select 1 from LABEL, MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID AND MACHINE_LABEL_JT.LABEL_ID = LABEL.ID  AND LABEL.TYPE <> 'hidden' and LABEL.NAME = 'UpTimeSinceLastReboot')) ))  AND (OS_NAME like '%Microsoft Windows 10 Pro x64%')

ORDER BY UPTIME desc

Posted by: sam240 1 year ago
Second Degree Blue Belt
0

I was able to resolve this by creating a report using this label name and filtering it down to the OS's I needed. Thank you

 

 
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