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.
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.
Thanks
@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.
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.
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>
@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.
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.
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>
@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!
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
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.
@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 ...
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
@Giuseppe
Thanks for your response :-).
Let me check for some more updates..
Please let me know if anyone have idea about it ..
Thanks..