Dashboards & Visualizations

Need to add a value before a panel?

Shan
Builder

Hai All,

Need your help in adding a value before a panel.
Please find the attached screen shot.
Below image is a sample screen shot of how my current dashboard will look like.
alt text

I need to add one more value(Service) before the panel Web data and Windows data. I know we can achieve it with the help of additional panel before Web data and Windows data. But i want to know is there anyother way to achieve it .. I don't want to go for the additional panel option, because for single name. i don't want to add a new panel for single name.
alt text

Thanks

0 Karma
1 Solution

niketn
Legend

@shankarananth what if you added Service to the same Single Value Panel?

Following is a run anywhere example with this option where <single> panel query has two data being set i.e. Service with spaces followed by second information.

alt text

If your concern about using separate is that there will be gap between the panels and that Single Value Panel will occupy more space, then you can apply CSS within dashboard to correct those.

alt text

Following is the Simple XML code for Option 1 above.

<dashboard>
  <label>Merge Single Value</label>
  <search id="baseSearchForTable">
    <query>index=_internal sourcetype=splunkd component IN ("Metrics","PeriodicHealthReporter","SearchAssistant")
| chart count by component date_wday</query>
    <earliest>-3d@d</earliest>
    <latest>now</latest>
    <sampleRatio>1</sampleRatio>
  </search>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults 
| fields - _time 
| eval data="Service    "."Web Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="refresh.display">progressbar</option>
        <option name="unitPosition">before</option>
      </single>
    </panel>
    <panel>
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service    "."Windows Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel>
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>

Following is the Simple XML code for Option 2 above.

<dashboard>
  <label>Merge Single Value Option 2</label>
  <search id="baseSearchForTable">
    <query>index=_internal sourcetype=splunkd component IN ("Metrics","PeriodicHealthReporter","SearchAssistant")
| chart count by component date_wday</query>
    <earliest>-3d@d</earliest>
    <latest>now</latest>
    <sampleRatio>1</sampleRatio>
  </search>
  <row depends="$alwaysHideCSSPanel$">
    <panel>
      <html>
        <style>
          #panelSingle1, #panelSingle2, #panelSingle3, #panelSingle4{
            width: 15% !important;
          }
          #panelSingle1 .dashboard-panel,#panelSingle3 .dashboard-panel{
            margin-right: 0px !important;
          }
          #panelTable1, #panelTable2, #panelTable3, #panelTable4, #panelTable5, #panelTable6{
            width: 23.33% !important;
          }          
        </style>
      </html>
    </panel>
  </row>
  <row>
    <panel id="panelSingle1">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelSingle2">
      <single>
        <search>
          <query>| makeresults 
| fields - _time 
| eval data="Web Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="refresh.display">progressbar</option>
        <option name="unitPosition">before</option>
      </single>
    </panel>
    <panel id="panelTable1">
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable2">
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable3">
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
  <row>
    <panel id="panelSingle3">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelSingle4">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Windows Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelTable4">
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable5">
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable6" >
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@shankarananth what if you added Service to the same Single Value Panel?

Following is a run anywhere example with this option where <single> panel query has two data being set i.e. Service with spaces followed by second information.

alt text

If your concern about using separate is that there will be gap between the panels and that Single Value Panel will occupy more space, then you can apply CSS within dashboard to correct those.

alt text

Following is the Simple XML code for Option 1 above.

<dashboard>
  <label>Merge Single Value</label>
  <search id="baseSearchForTable">
    <query>index=_internal sourcetype=splunkd component IN ("Metrics","PeriodicHealthReporter","SearchAssistant")
| chart count by component date_wday</query>
    <earliest>-3d@d</earliest>
    <latest>now</latest>
    <sampleRatio>1</sampleRatio>
  </search>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults 
| fields - _time 
| eval data="Service    "."Web Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="refresh.display">progressbar</option>
        <option name="unitPosition">before</option>
      </single>
    </panel>
    <panel>
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service    "."Windows Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel>
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>

Following is the Simple XML code for Option 2 above.

<dashboard>
  <label>Merge Single Value Option 2</label>
  <search id="baseSearchForTable">
    <query>index=_internal sourcetype=splunkd component IN ("Metrics","PeriodicHealthReporter","SearchAssistant")
| chart count by component date_wday</query>
    <earliest>-3d@d</earliest>
    <latest>now</latest>
    <sampleRatio>1</sampleRatio>
  </search>
  <row depends="$alwaysHideCSSPanel$">
    <panel>
      <html>
        <style>
          #panelSingle1, #panelSingle2, #panelSingle3, #panelSingle4{
            width: 15% !important;
          }
          #panelSingle1 .dashboard-panel,#panelSingle3 .dashboard-panel{
            margin-right: 0px !important;
          }
          #panelTable1, #panelTable2, #panelTable3, #panelTable4, #panelTable5, #panelTable6{
            width: 23.33% !important;
          }          
        </style>
      </html>
    </panel>
  </row>
  <row>
    <panel id="panelSingle1">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelSingle2">
      <single>
        <search>
          <query>| makeresults 
| fields - _time 
| eval data="Web Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="refresh.display">progressbar</option>
        <option name="unitPosition">before</option>
      </single>
    </panel>
    <panel id="panelTable1">
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable2">
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable3">
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
  <row>
    <panel id="panelSingle3">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Service"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelSingle4">
      <single>
        <search>
          <query>| makeresults
| fields - _time
| eval data="Windows Data"</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel id="panelTable4">
      <table>
        <title>Metrics</title>
        <search base="baseSearchForTable">
          <query> search component="Metrics"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable5">
      <table>
        <title>PeriodicHealthReporter</title>
        <search base="baseSearchForTable">
          <query> search component="PeriodicHealthReporter"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
    <panel id="panelTable6" >
      <table>
        <title>SearchAssistant</title>
        <search base="baseSearchForTable">
          <query> search component="SearchAssistant"
          | fields - component
          </query>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

niketn
Legend

@shankarananth if your issue is resolved please accept the answer to mark this question as accepted. If not please let us know what is not working as expected!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi shankarananth,
I think that the only solution is to add a new single panel for each row with the service value (if it's a dynamic value) or an html panel if it's a static value.
Bye.
Giuseppe

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi Shankarananth, may i know the use-case please..
adding that panel before :- may we know what change will it create?!?!

i do agree with Giuseppe.

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

Shan
Builder

@inventsekar/Giuseppe,

Its just going to be a name (Service). That's also from | makeresults command. I provide the name.
when i add a panel for name (Service), it makes dashboard panel looks uneven. Important data panels looks very small (Data set 3 and Data set 2) and simple name panel occupies more space. For making all the panels in equal size. It will be again rework with xml code. So looking for alternate solution.

| makeresults
| eval name=Service
| table name

Thanks ...

0 Karma

gcusello
SplunkTrust
SplunkTrust

If you want to use a Single Value Panel, this is the main solution.
Alternatively you could use a, HTML panel:

  <panel>
      <html>
    <h3 style="text-align: center; padding: 20px 0; font-size: 20px;">
    <a>
        <b>
      <strong style="color:Black;">SERVICE</strong>
        </b>
    </a>  
</h3>
  </html>
</panel>

Bye.
Giuseppe

Shan
Builder

@Giuseppe

Thanks for your response :-).
Let me check for some more updates..

0 Karma

Shan
Builder

Please let me know if anyone have idea about it ..

Thanks..

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...