Find / Email notifications on reboots

imgappleadmin
New Contributor

Hey All,

Just wanted to know if there is an easy way to find machines that reboot at a certain time period without pouring thru logs on each machine I have in a Static Group.

Thanks everyone !

1 ACCEPTED SOLUTION

Johnny_Kim
Contributor II

Test this extension attribute (Its 2am when I wrote this EA). Output will be in 24hr format, and when creating a smart group, you may have to add multiple criteria depending on what you are trying to achieve.

#! /bin/sh

lastreboot=`last -1 reboot | awk '{ print $6}'`

echo "<result>$lastreboot</result>"

View solution in original post

2 REPLIES 2

Johnny_Kim
Contributor II

Test this extension attribute (Its 2am when I wrote this EA). Output will be in 24hr format, and when creating a smart group, you may have to add multiple criteria depending on what you are trying to achieve.

#! /bin/sh

lastreboot=`last -1 reboot | awk '{ print $6}'`

echo "<result>$lastreboot</result>"

imgappleadmin
New Contributor

TY!