Kaseya Community

Probing Hard Disk Temperature

  • After a rash of "EventID 51" from three different clients in different sites, all turning out to be the drive overheating (it was a hot week), I decided it was time to get Kaseya to read hard disk temps for me, rather than remote in to install hdsent.

    Enjoy!

    *NOTE* requires the DiskTemp program found here:
    http://www.satsignal.eu/software/disk.html#DiskTemp

    This script renames the file from .ex_ to .exe, because my browser doesn't like uploading .exe files and I'm too lazy to fix that. The .ex_ file is just renamed, not compressed in any way.


    Script Name: Disk Temp
    Script Description: Probes HDD temperature and records to a log file.

    IF True
    THEN
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#/DiskTemp.exe
    Parameter 2 : VSASharedFiles\DiskTemp.ex_
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> #vAgentConfiguration.AgentTempDir#\disktemp.log
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : #vAgentConfiguration.AgentTempDir#/Disktemp.exe >>>> #vAgentConfiguration.AgentTempDir#/disktemp.log
    Parameter 2 : 1
    OS Type : 0
    ELSE


    I'll leave what to do from there up to you. I had originally planned to rig this script up to trigger from from the "error during paging operation" event and send an e-mail with the temps, but by the time those errors pop up the drive is already well past the 50 mark.

    Guess it's finally time to learn log monitoring...

    Legacy Forum Name: Probing Hard Disk Temperature,
    Legacy Posted By Username: dwujcik
  • dwujcik
    After a rash of "EventID 51" from three different clients in different sites, all turning out to be the drive overheating (it was a hot week), I decided it was time to get Kaseya to read hard disk temps for me, rather than remote in to install hdsent.

    Enjoy!

    *NOTE* requires the DiskTemp program found here:
    http://www.satsignal.eu/software/disk.html#DiskTemp

    This script renames the file from .ex_ to .exe, because my browser doesn't like uploading .exe files and I'm too lazy to fix that. The .ex_ file is just renamed, not compressed in any way.


    Script Name: Disk Temp
    Script Description: Probes HDD temperature and records to a log file.

    IF True
    THEN
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#/DiskTemp.exe
    Parameter 2 : VSASharedFiles\DiskTemp.ex_
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> #vAgentConfiguration.AgentTempDir#\disktemp.log
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : #vAgentConfiguration.AgentTempDir#/Disktemp.exe >>>> #vAgentConfiguration.AgentTempDir#/disktemp.log
    Parameter 2 : 1
    OS Type : 0
    ELSE


    I'll leave what to do from there up to you. I had originally planned to rig this script up to trigger from from the "error during paging operation" event and send an e-mail with the temps, but by the time those errors pop up the drive is already well past the 50 mark.

    Guess it's finally time to learn log monitoring...


    Monitoring disk temps after event ID 51? Brilliant!
    Put your name in the script, you deserve the recognition for your work!

    I could sit down with you and even show you how to get this pulled in a Kaseya graph and integrate with the existing monitoring mechanism we have for performance (really advanced but you might like seeing it).

    The closest thing I thought of like this would be to tap into the accelerometer in a Macbook to detect if it was dropped (or detect an earthquake).

    I'll have to try and write the Macbook equivalent for temperature, the only problem is the alarm will be going off all the time as this thing gets hot enough to cook on.

    Big thumbs up from this Kaseyan Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Benjamin.Lavalley@kaseya.com