Dashboards & Visualizations

How to show the status of an ESXI and display panels

pduvofmr
Path Finder

Hi Community,

I would like to show the status of an ESXI via pictures.
If I displayed the search on a table then the values are shown correctly.
Why do the different panels not display?

Please advice...

<panel>
  <table>
  <search>
    <query>
      index="vmware-inv" | spath type | search type=HostSystem | spath moid | search moid="host-9" AND changeSet.summary.overallStatus!=""
      | stats latest(changeSet.summary.overallStatus) as ManagedEntityStatus by host
    </query>
    <done>
      <condition match="$result.ManagedEntityStatus$ == green">
        <set token="show_Green">true</set>
        <unset token="show_Grey"></unset>
        <unset token="show_Yellow"></unset>
              <unset token="show_Red"></unset>
      </condition>
      <condition match="$result.ManagedEntityStatus$ == red">
        <set token="show_Red">true</set>
        <unset token="show_Grey"></unset>
        <unset token="show_Yellow"></unset>
              <unset token="show_Green"></unset>
      </condition>
      <condition match="$result.ManagedEntityStatus$ == yellow">
        <set token="show_Yellow">true</set>
        <unset token="show_Grey"></unset>
        <unset token="show_Green"></unset>
              <unset token="show_Red"></unset>
      </condition>
      <condition match="$result.ManagedEntityStatus$ == grey">
        <set token="show_Grey">true</set>
        <unset token="show_Green"></unset>
        <unset token="show_Yellow"></unset>
              <unset token="show_Red"></unset>
      </condition>
    </done>
  </search>
</table>
</panel>
    <panel depends="$show_Green$">
  <html>
    <img src="http://sr.photos3.fotosearch.com/bthumb/CSP/CSP993/k14957243.jpg"></img>
  </html>
</panel>
    <panel depends="$show_Red$">
  <html>
    <img src="https://photos.gograph.com/thumbs/CSP/CSP742/k17687405.jpg"></img>
  </html>
</panel>
    <panel depends="$show_Yellow$">
  <html>
    <img src="http://www.bodyandmind.co.za/kidz/crying-baby.jpg"></img>
  </html>
</panel>
    <panel depends="$show_Grey$">
  <html>
    <img src="http://www.lindon.us/sitebuildercontent/sitebuilderpictures/Unbekannt.jpg"></img>
  </html>
</panel>
0 Karma
1 Solution

justinatpnnl
Communicator

You are REALLY close on this one. In a condition match, you need to wrap string values like "green" in quotes. The caveat is that they need to be sanitized quotes since the statement is already in quotes. It should look something like this:

<condition match="$result.ManagedEntityStatus$ == &quot;green&quot;">

Otherwise it is looking for the ManagedEntityStatus field to match another field named green

View solution in original post

Vijeta
Influencer

@pduvofmr Try using quot in condition like this <condition match=" $result.ManagedEntityStatus$ == &quot;green&quot; ">

0 Karma

justinatpnnl
Communicator

Be careful with the formatting on this one. While it is more readable, you are including the spaces in the expected value and the condition will not match because "green" is not equal to " green ".

0 Karma

Vijeta
Influencer

Yes you are right, just edited. Also saw you already answered it :). Thanks

0 Karma

justinatpnnl
Communicator

You are REALLY close on this one. In a condition match, you need to wrap string values like "green" in quotes. The caveat is that they need to be sanitized quotes since the statement is already in quotes. It should look something like this:

<condition match="$result.ManagedEntityStatus$ == &quot;green&quot;">

Otherwise it is looking for the ManagedEntityStatus field to match another field named green

Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...