cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

How Does one Alert on a Server that hasn't rebooted?

Jump to solution

It seems like a relatively easy request. The client wants to know when their server hasn't rebooted as it is part of SQL cluster and some App servers depend on it. I've tried using the Last boot has Changed with the NOT logic but I can't seem to get it to trigger.Any ideas, I'm open to suggestions ?

-Cheers

0 Kudos
1 Solution

Are those servers rebooted on a daily basis? At what time are they rebooted?

View solution in original post

0 Kudos
5 Replies

Not sure how I'd do it in the GUI, but with a custom alert it'd be something like this

Set up a custom swql alert on nodes, the top box will be prepopulated and you can't change it, but in the lower box enter this

where nodes.nodeid in (

Select nodeid from orion.nodes where caption like 'sqlclusterserver%' -- filter on whatever makes sense to get all your sql servers

and daydiff(lastboot,getutcdate())>31 -- this is however many days are supposed to go between reboots

)

- Marc Netterfield, Github
Level 8

Thank you I'll give that I try. I appreciate the advice

0 Kudos

Are those servers rebooted on a daily basis? At what time are they rebooted?

View solution in original post

0 Kudos
Level 8

They reboot at 3am on Mondays. Thus far I've applied a system uptime template to the server. But it's thrown off when someone decides to manually reboot the cluster in the middle of the week.

0 Kudos

I'd go with a custom powershell script. Do you want to be alerted when the system has been rebooted out of schedule?

0 Kudos