Ad Widget

Collapse

monitoring ESXi 8.0 LSI RAID from zabbix using SSH

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sciensys
    Junior Member
    • Feb 2020
    • 20

    #1

    monitoring ESXi 8.0 LSI RAID from zabbix using SSH

    There is a working template for monitoring LSA Raid on ESXi 6.7 with Storcli using SSH in zabbix.
    Due to the fact that Storcli64 is already used for ESXi 8, the answers of storcli64 are different.

    For example,
    Storcli response:

    Code:
    opt/lsi/storcli/storcli /c0/bbu show all j
    {
    "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
    }
    ]
    }
    }
    ]
    }
    and Storcli64 response:

    Code:
    /opt/storcli/bin/storcli64 /c0/bbu show all j
    <?xml version="1.0"?><output xmlns:esxcli="storcli">
    <list type="string">
    <string>
    {
    "Controllers":[
    {
    &quot;Command Status&quot; : {
    &quot;CLI Version&quot; : &quot;007.2807.0000.0000 Dec 22, 2023&quot;,
    &quot;Operating system&quot; : &quot;VMkernel 8.0.2&quot;,
    &quot;Controller&quot; : 0,
    &quot;Status&quot; : &quot;Failure&quot;,
    &quot;Description&quot; : &quot;None&quot;,
    &quot;Detailed Status&quot; : [
    {
    &quot;Ctrl&quot; : 0,
    &quot;Status&quot; : &quot;Failed&quot;,
    &quot;Property&quot; : &quot;-&quot;,
    &quot;ErrMsg&quot; : &quot;Battery is absent!&quot;,
    &quot;ErrCd&quot; : 34
    }
    ]
    }
    }
    ]
    }
    As you can see, nothing much has changed, except that instead of quotation marks in storсli, storсli64 now writes &quot;
    But the template is configured to process Storcli with quotation marks.

    Can anyone help me on how to quickly reconfigure processing in the template for Storcli64?​

    Maybe any other simple ideas for monitoring LSI RAID on ESXI 8.0 ?
    Attached Files
    Last edited by sciensys; 28-04-2024, 22:48.
  • PeterZielony
    Senior Member
    • Nov 2022
    • 146

    #2
    maybe simply use replace in preprocessing
    &quot;
    to
    "

    Click image for larger version  Name:	image.png Views:	0 Size:	7.7 KB ID:	484510


    also you would have to remove XML parts (regex?) like this:

    \{(?:[^{}]*|(?R))*\}
    with output: \0
    Click image for larger version  Name:	image.png Views:	1 Size:	13.8 KB ID:	484511
    Click image for larger version  Name:	image.png Views:	1 Size:	60.5 KB ID:	484512
    I do it slightly differently just by ssh command like this:
    /opt/lsi/storcli64/storcli64 /c0 /vall show | grep -o 'RAID5.*RW' | awk '{print $2}'

    for different RAIDs i just have different templates eg for raid 10 i have like this:
    /opt/lsi/storcli64/storcli64 /c0 /vall show | grep -o 'RAID10.*RW' | awk '{print $2}'

    returns string like this:
    "OfLn" (offline) or "Pdgd"(partially degraded) or "dgrd"(degraded) or "Optl" (Optimal)
    in either raid ver i have then value mapped to a number (simply i do replacement strings from OfLn,Pdgd,dgrd,Optl to numbers 1,2,3,4) and when number changes or is different than 4 it will trigger an alert

    Click image for larger version

Name:	image.png
Views:	718
Size:	14.1 KB
ID:	484517
    Last edited by PeterZielony; 28-05-2024, 14:25.

    Hiring in the UK? Drop a message

    Comment

    • sciensys
      Junior Member
      • Feb 2020
      • 20

      #3
      PeterZielony, thank you man, it works.



      I made path replacement from /opt/lsi/storcli/storcli -> /opt/storcli/bin/storcli64
      and all replaces in preprocessing tab as PeterZielony advise.

      reduced THROTTLING, graphic became draw

      changed trigger: LSI controller {#CTLID} cachevault battery is need to be replaced​
      from: "like","No" to "like","OK"
      (find(/Template LSI JSON discovery ssh/lsi.ctl.cvreplace.["{#CTLID}"],,"like","OK")=0 and length(last(/Template LSI JSON discovery ssh/lsi.ctl.cvreplace.["{#CTLID}"]))>0)

      Exported result in attachment.​​
      Attached Files
      Last edited by sciensys; 02-06-2024, 16:08.

      Comment

      • GIL
        Junior Member
        • Nov 2014
        • 10

        #4
        Hi all, I try to import this template to zabbix 6.4 server and get an error: Incorrect parameter "/1/username": value must be empty
        I can't find where is this parameter...

        Comment

        • sciensys
          Junior Member
          • Feb 2020
          • 20

          #5
          try .yaml
          change .xml to .yaml.
          I can't upload yaml or rar.

          .yaml slightly different syntax
          Attached Files

          Comment

          Working...