/build/static/layout/Breadcrumb_cap_w.png

Best Practices Question


Uptime Since Last Reboot Notification

02/28/2017 1578 views

Guys ,

I am trying to setup a notification to send a list of servers which have not been rebooted in x amount of days. In the notification setup I can select the option "Uptime Since Last Reboot" and I want to configure it so if the server is up longer than 30 days it will appear on the list. When I click on the server and look at the Uptime Since Last Reboot it is displayed as " 7 days 12 hour 14 minutes". But when I try to set anything in this text field I cannot get it to work correctly. I have tried "Uptime Since Last Reboot > 30 days" .

Any ideas?

0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

1
SELECT * FROM ORG1.MACHINE
WHERE LAST_REBOOT < DATE_SUB(NOW(), INTERVAL 30 DAY);

Answered 02/28/2017 by: chucksteel
Red Belt

All Answers

0
We are doing something similar; sending out a notice to users who haven't restarted their system in over 30 days.  Problem is, KACE doesn't really do this correctly with it's GUI smart label maker.  The best way to accomplish this is to write the SQL with something like MySQL workbench, and then copy your SQL query into the SQL text box of your newly-created smart label.  

I did something similar, and my query came out to be this (note the emboldened text):

SELECT * FROM ORG1.MACHINE WHERE CONVERT(SUBSTR(MACHINE.UPTIME,1,POSITION(',' IN MACHINE.UPTIME)-1),UNSIGNED INTEGER) > 30 

The issue is the MACHINE.UPTIME record is a VARCHAR data type in a format "days,hours:minutes", so you have to actually "operate" on that string to get the information that you want.  Hope this helps.
Answered 08/01/2018 by: RD94
Senior Yellow Belt

  • This String retrieves the data and breaks it down into Days, Hours and minutes. After reviewing the Data from KACE database I realized this is retrieved from Microsoft Uptime, which you can find in Task Manager performance window. This data is updated when device do inventory.

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