Ad Widget

Collapse

Need help with smartmontools

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Durwin
    Junior Member
    • Apr 2015
    • 19

    #1

    Need help with smartmontools

    I am using smartmontools.

    I have everything working but windows. When I run the command below from the Windows machine I get what is expected.

    Code:
    powershell -NoProfile -ExecutionPolicy Bypass -File "D:\home\Administrator\zbx-smartctl\discovery-scripts\windows\smartctl-disks-discovery.ps1"
    {
     "data":[
    
            {
                    "{#DISKNAME}":"/dev/hda",
                    "{#SMART_ENABLED}":"1"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdb",
                    "{#SMART_ENABLED}":"1"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdc",
                    "{#SMART_ENABLED}":"1"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdd",
                    "{#SMART_ENABLED}":"1"
            }
    
     ]
    }
    But when I execute this command, It returns '0' where it should show '1'.

    Code:
    zabbix_get -s 172.23.93.4 -k uHDD.discovery
    {
     "data":[
    
            {
                    "{#DISKNAME}":"/dev/hda",
                    "{#SMART_ENABLED}":"0"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdb",
                    "{#SMART_ENABLED}":"0"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdc",
                    "{#SMART_ENABLED}":"0"
            },
    
            {
                    "{#DISKNAME}":"/dev/hdd",
                    "{#SMART_ENABLED}":"0"
            }
    
     ]
    }
    I have Cygwin installed and using smartctl from the installation. It *does* work when run on the Windows machine, but not remotely using zabbix_get. When I run the 'zabbix_get' command on the windows machine, I also get zeros.

    Anyone have an idea on what to look at or how to further test?

    Thank you,

    Durwin
    Last edited by Durwin; 21-12-2016, 19:55. Reason: Included aditional test made.
  • nobodysu
    Member
    • Sep 2016
    • 84

    #2
    I have Cygwin installed and using smartctl from the installation.
    Guess thats the case. Try using native windows smartmontools.

    Comment

    • Durwin
      Junior Member
      • Apr 2015
      • 19

      #3
      That is certainly worth a try. I'll try it when I get back to work next week.

      Thank you.

      Comment

      • Durwin
        Junior Member
        • Apr 2015
        • 19

        #4
        [solved]

        Turns out using Windows Smartctl does work. There must be something odd with using Cygwin's build.

        Comment

        Working...