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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...