I have an alert for when a branch goes offline. I want to track if the issue was power related or not. My thought is that I can look to the last boot time. I would like to insert the phrase "Power Loss" into an email alert when the device comes back online if the last boot time is within the last 10 minutes.
Try the following as a SQL variable in your alert.
select case when lastboot is null then 'No Last Boot Time Available' when DATEDIFF(MINUTE,lastboot, getdate()) <= 10 then 'Possible Power Outage' when DATEDIFF(MINUTE,lastboot, getdate()) >= 10 then 'No' end as 'MinutesSinceLastBoot' from nodes
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.