Excessive Reboot Delay Monitoring

Is there a way to monitor last restart?  i.e. warn/crit depending on how many days have passed since the last reboot?

 

Cheers,

Gary

  • I’d create a script on the agent that returns the time in days since the server last booted, something like the following.

     

    In Linux:


    #!/bin/bash
    uptime | cut -f4 -d" "

    In Windows (Powershell):

     


    $operatingsystem = Get-WmiObject Win32_OperatingSystem
        "$((Get-Date) - ([Management.ManagementDateTimeConverter]::ToDateTime($operatingSystem.LastBootUpTime)))".Split(".")[0]

    You could then call the script remotely with the Custom Remote Integer Monitor, configured to warn/crit on the integer values of your choice.

     

  • Thanks for the reply Tyson.  I am new to this software. I understand the theory and it seems sound but implementing is another story. Tried a few ways. No go. I am sure I just don’t know enough about the software to implement.   

  • Thanks for the reply Tyson.  I am new to this software. I understand the theory and it seems sound but implementing is another story. Tried a few ways. No go. I am sure I just don’t know enough about the software to implement.   

    Gary; no problem.  If you need assistance in implementing these monitors, open up a support case and we’d be happy to help.