Skip to main content
Solved

Find / Email notifications on reboots

  • October 17, 2015
  • 2 replies
  • 3 views

Forum|alt.badge.img+3

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 !

Best answer by Johnny_Kim

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>"

2 replies

Forum|alt.badge.img+13
  • Contributor
  • Answer
  • October 18, 2015

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>"

Forum|alt.badge.img+3
  • Author
  • New Contributor
  • October 22, 2015

TY!