Ad Widget

Collapse

Check LSI Raid with storcli without agent?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Toraih
    Junior Member
    • Jul 2019
    • 1

    #1

    Check LSI Raid with storcli without agent?

    We have several servers with LSI Raid controller we want to monitor.

    I used the template https://github.com/mykolq/zabbix_lsi_template with an agent successfully.

    But we have some server without agents, so there's the question how to obtain the values...
    (the half of the agentless servers are ESXi6.x, where i managed to install an agent but it can't obtain the listening port due some right issues)

    The idea was to use a SSH-connection to query storecli, but since i'm a newbie on zabbix i don't know how to proceed.
    I know basically how to make the SSH connection (with certs, no pswd), but i don't get how to redirect the data to the template or other way around, how to define that the template is using SSH instead of the agent.

    I would appreciate if someone could shed some light on this topic or provide alternate ideas .





    Last edited by Toraih; 23-07-2019, 14:22. Reason: typos removed, tags added
  • Guntis
    Junior Member
    • Mar 2019
    • 18

    #2
    I have successfully done exactly that, since it's impossible to get LSI RAID drivers working on ESXI6.x.

    I simply took commands from lsi_raid_linux.conf and changed "sudo /opt/MegaRAID/storcli/storcli64" to "ssh [email protected] /opt/lsi/storcli/storcli" and it works flawless.
    Of course you will need to add "zabbix" user SSH key to ESXi authorized_keys file, so it won't ask for password, preferably non-root user.

    Comment

    • sciensys
      Junior Member
      • Feb 2020
      • 20

      #3
      Originally posted by Guntis
      I have successfully done exactly that, since it's impossible to get LSI RAID drivers working on ESXI6.x.

      I simply took commands from lsi_raid_linux.conf and changed "sudo /opt/MegaRAID/storcli/storcli64" to "ssh [email protected] /opt/lsi/storcli/storcli" and it works flawless.
      Of course you will need to add "zabbix" user SSH key to ESXi authorized_keys file, so it won't ask for password, preferably non-root user.
      was done the same, but agent answer:
      4252:20220629:230106.241 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo.bat """: Timeout while executing a shell script.
      4264:20220629:230210.304 Failed to execute command "c:\zabbix\scripts\lsistorcli_ldinfo.bat """: Timeout while executing a shell script.
      6092:20220629:230314.352 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo_ne.bat """: Timeout while executing a shell script.
      6092:20220629:230418.400 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo.bat """: Timeout while executing a shell script.
      .....
      4264:20220629:233058.589 Failed to execute command "c:\zabbix\scripts\lsistorcli_ctlinfo.bat """: Timeout while executing a shell script.
      4252:20220629:233202.637 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo_ne.bat """: Timeout while executing a shell script.
      4252:20220629:233306.702 Failed to execute command "c:\zabbix\scripts\lsistorcli_ctlinfo.bat """: Timeout while executing a shell script.
      4264:20220629:233410.749 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo_ne.bat """: Timeout while executing a shell script.
      6092:20220629:233514.781 Failed to execute command "c:\zabbix\scripts\lsistorcli_ctlinfo.bat """: Timeout while executing a shell script.
      6092:20220629:233618.846 Failed to execute command "c:\zabbix\scripts\lsistorcli_pdinfo_ne.bat """: Timeout while executing a shell script.
      configs at agent and server sides was corrected for 30sec timeout, but still not work.

      How did you resolve a issue with timeout?

      2nd question,
      How did you resolve a issue with self deleting after reboot any user folder in /etc/ssh/keys-[user_name] at ESXi side ?
      Last edited by sciensys; 29-06-2022, 22:43.

      Comment

      • Guntis
        Junior Member
        • Mar 2019
        • 18

        #4
        Originally posted by sciensys

        was done the same, but agent answer:


        configs at agent and server sides was corrected for 30sec timeout, but still not work.

        How did you resolve a issue with timeout?
        It seems you are using some kind of windows shell script (.bat), you can try manually running it and checking what it returns. Timeout basically means the script is not working for some reason.

        But it doesn't look like mine solution at all. First of all, you should be able to run command
        Code:
        ssh user@<esxi_server_ip> /opt/lsi/storcli/storcli
        from Zabbix agent machine and get valid output. When that works, you can adjust zabbix configs accordingly.

        Originally posted by sciensys
        How did you resolve a issue with self deleting after reboot any user folder in /etc/ssh/keys-[user_name] at ESXi side ?
        You should add ssh keys to ESXi using It's web interface, not by directly modifying the files, then they will persist.

        Comment

        • sciensys
          Junior Member
          • Feb 2020
          • 20

          #5
          Originally posted by Guntis
          It seems you are using some kind of windows shell script (.bat), you can try manually running it and checking what it returns. Timeout basically means the script is not working for some reason.

          But it doesn't look like mine solution at all. First of all, you should be able to run command
          Code:
          ssh user@<esxi_server_ip> /opt/lsi/storcli/storcli
          from Zabbix agent machine and get valid output. When that works, you can adjust zabbix configs accordingly.


          You should add ssh keys to ESXi using It's web interface, not by directly modifying the files, then they will persist.
          1. here you are script for zabbix agent at Windows:

          Code:
          c:\zabbix\ssh\ssh.exe -i c:\zabbix\ssh\w2k16 root@[ESXi_IP] /opt/lsi/storcli/storcli /c0/bbu show all j
          if I run it manully, I get answer:

          Code:
          {
          "Controllers":[
          {
          "Command Status" : {
          "CLI Version" : "007.2202.0000.0000 Mar 14, 2022",
          "Operating system" : "VMkernel 6.5.0",
          "Controller" : 0,
          "Status" : "Failure",
          "Description" : "None",
          "Detailed Status" : [
          {
          "Ctrl" : 0,
          "Status" : "Failed",
          "Property" : "-",
          "ErrMsg" : "use /cx/cv",
          "ErrCd" : 255
          }
          ]
          }
          }
          ]
          }

          but, if I try to run exactly from zabbix agent, then I get answer: Timeout while executing a shell script.


          so, I duplicate all scrips, and for zabbix made a following:

          Code:
           @type c:\zabbix\scripts\bbusinfo.txt
          it makes me laugh enough....
          zabbix agent can actually execute such a script!

          and working script, which I can run manually or using scheduler, for example

          Code:
          c:\zabbix\ssh\ssh.exe -i c:\zabbix\ssh\w2k16 root@[ESXi_IP] /opt/lsi/storcli/storcli /c0/bbu show all j >bbusinfo.txt
          2. Thanks, I'll try the web interface !
          Instead of what everyone writes in the installation instructions.
          Attached Files
          Last edited by sciensys; 01-07-2022, 19:15.

          Comment

          • sciensys
            Junior Member
            • Feb 2020
            • 20

            #6
            Guntis, Could We see your solution and template ?

            Comment

            • Guntis
              Junior Member
              • Mar 2019
              • 18

              #7
              Originally posted by sciensys
              Guntis, Could We see your solution and template ?
              Unfortunately I'm no longer working for the company I built this solution, so I don't have the template and I wasn't using Windows anyway, so I can't help you much more. Good luck solving this.

              Comment

              • sciensys
                Junior Member
                • Feb 2020
                • 20

                #8

                Guntis, it's ok.
                anyway thanks!

                Comment

                Working...