Ad Widget

Collapse

SmartCTL on Windows - Zabbix Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blackdragon
    Member
    • Jan 2025
    • 46

    #1

    SmartCTL on Windows - Zabbix Error

    I am facing a technical issue while setting up smartctl on Windows. The smartctl command works perfectly when executed in PowerShell, but I encounter an error in Zabbix
    i have installed smartctl Version 7.1 and 7.5 i get the same error on Zabbix when monitoring the HDDs in windows server 2019 and 2025
    The error is "Cannot fetch data.: failed to execute smartctl: failed to look up smartctl exec path: exec: "smartctl": executable file not found in %PATH%."
    Attached Files
  • moooola
    Junior Member
    • Jul 2024
    • 29

    #2
    I have written smart.conf like this. smart monitoring works fine.
    Attached Files

    Comment


    • Blackdragon
      Blackdragon commented
      Editing a comment
      i did the same it did not work
  • Blackdragon
    Member
    • Jan 2025
    • 46

    #3
    im getting this error message "Cannot fetch data.: failed to execute smartctl: failed to get combined output of stdout and stderr for smartctl process: open NUL: The system cannot find the file specified."

    Comment

    • Blackdragon
      Member
      • Jan 2025
      • 46

      #4
      help please

      Comment


      • mrnobody
        mrnobody commented
        Editing a comment
        We know it's you, Parker.
    • moooola
      Junior Member
      • Jul 2024
      • 29

      #5
      Hello.

      Assuming you are using the smart.conf you provided at the beginning

      1. Remove the # at the beginning of the line to uncomment the Plugins.Smart.Path line.

      2. Using forward slashes instead of backslashes as path separators gave me the desired behavior.

      I hope it works for you.

      Comment

      • Blackdragon
        Member
        • Jan 2025
        • 46

        #6
        sadly it did not work, im getting the same error "Cannot fetch data.: failed to scan for devices: got error executing scanDevices with arguments: ["--scan" "-j"]: failed to get combined output of stdout and stderr for smartctl process: open NUL: The system cannot find the file specified."

        Click image for larger version

Name:	image.png
Views:	463
Size:	21.3 KB
ID:	498925

        Comment

        • Blackdragon
          Member
          • Jan 2025
          • 46

          #7
          alright, i have tried to install smartctl on windows 11, it worked. in the discovery list no error was shown, but when trying to test the prototype i get error non of the prototype sensors are working?!!! and why in windows server it did not work? i have installed in 2029 and 2025
          Click image for larger version

Name:	image.png
Views:	468
Size:	16.0 KB
ID:	498994Click image for larger version

Name:	image.png
Views:	451
Size:	43.4 KB
ID:	498995

          Comment

          • Blackdragon
            Member
            • Jan 2025
            • 46

            #8
            anyone can assist me please

            Comment

            • Blackdragon
              Member
              • Jan 2025
              • 46

              #9
              could someone assist me please

              Comment

              • Brambo
                Senior Member
                • Jul 2023
                • 245

                #10
                Are you running 7.0.9 ? or any different version? See release notes that there is a security fix in that version https://support.zabbix.com/browse/ZBXNEXT-9686 (although it looks like a linux issue)

                Comment

                • Blackdragon
                  Member
                  • Jan 2025
                  • 46

                  #11
                  I'm running the following version !!!

                  Click image for larger version

Name:	image.png
Views:	439
Size:	10.4 KB
ID:	499205

                  Comment

                  • Brambo
                    Senior Member
                    • Jul 2023
                    • 245

                    #12
                    Well it's hard to tell what is actually happening by only screenshot.
                    You could test by taking the itemkey of the discovery rule and put in a template item / host item and run the test button and see what the actual response is.
                    This is basic debugging.
                    Also at that same moment take a look at the agent log file to see what is reported there (if anything) an error in the exe will result in agent log.
                    You did showed a powershell example of -v but I see an error message with --scan & -j. So start at the basics and do some investigation yourself with the log files. It's good practice to paste code/log in [ code ] tags so it's easier to read.

                    See difference in -scan & --scan where 1 gives an error and the other json output
                    Click image for larger version

Name:	image.png
Views:	452
Size:	180.1 KB
ID:	499211
                    Last edited by Brambo; 17-02-2025, 16:47.

                    Comment

                    • Blackdragon
                      Member
                      • Jan 2025
                      • 46

                      #13
                      A new update has resulted in an interesting development: the SMART Zabbix Template now works fine on Windows 11. However, I'm encountering an unusual error while using it on Windows Server 2025 data center. It seems like the template might not be identifying all the ports correctly, how i can customize the micro only for windows server i guess this is related to the design of the motherboard!

                      I'm using smartctl Ver.7.1
                      ---------------------------------------------------------
                      Windows Server 2025 - Data Center
                      Click image for larger version  Name:	Untitled.jpg Views:	0 Size:	84.3 KB ID:	499968

                      Windows 11
                      Click image for larger version  Name:	Untitled1.jpg Views:	0 Size:	83.4 KB ID:	499969
                      Windows Server 2025 - Data Center (PowerShell)
                      Click image for larger version

Name:	Untitled.jpg
Views:	418
Size:	61.4 KB
ID:	499972

                      Configuration file, the same in windows 11 and windows server 2025
                      Click image for larger version

Name:	image.png
Views:	427
Size:	16.8 KB
ID:	499973
                      Attached Files
                      Last edited by Blackdragon; 05-03-2025, 07:03.

                      Comment

                      • PavelZ
                        Senior Member
                        • Dec 2024
                        • 162

                        #14
                        Firstly, not only your operating systems are different, but also your set of devices.
                        I see that smartctl is trying to query the usb bridge device.

                        Please note that there are two macros in SMART template: {$SMART.DISK.NAME.MATCHES} and {$SMART.DISK.NAME.NOT_MATCHES}

                        So I suggest we exclude this particular device. /dev/sdp and /dev/sdq

                        Comment

                        • Blackdragon
                          Member
                          • Jan 2025
                          • 46

                          #15
                          I disabled the two USB drives in Disk Management, and the following error appeared


                          Click image for larger version

Name:	image.png
Views:	422
Size:	27.7 KB
ID:	499979

                          Comment

                          Working...