Uptime Since Last Reboot Notification
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
Answers (2)
Please log in to answer
Posted by:
chucksteel
7 years ago
Posted by:
RD94
6 years ago
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.
Comments:
-
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. - anonymous_143585 6 years ago