Splunk Search

Use Trellis with many values by graph.

mclane1
Path Finder

Hello,

I don't find solution here and I managed to get it  to work.

First of all, if you want separate in many dashboards your seach you can do that.

index="_internal"
| timechart count by sourcetype

You can activate trellis by sourcetype.

But in each graph you want status (by exemple).

Please try this query :

index="_internal"
| bin _time
| stats count by _time, sourcetype, status
| eval {status}=count
| fields - status, count
| fillnull value=0
| stats sum(*) as * by _time, sourcetype
Labels (2)
Tags (1)
0 Karma
1 Solution

mclane1
Path Finder

Use trellis in a chart (form or dashboard): 

  <row>
    <panel>
      <chart>
        <search>
          <query>index="_internal" 
|  bin _time
| stats count by _time, sourcetype, status
| eval {status}=count
|  fields - status, count
| fillnull value=0 
|  stats sum(*) as * by _time, sourcetype</query>
          <earliest>-15m@m</earliest>
          <latest>now</latest>
          <refresh>10m</refresh>
          <refreshType>delay</refreshType>
        </search>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">-90</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.chart">area</option>
        <option name="charting.chart.stackMode">stacked</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.legend.mode">standard</option>
        <option name="charting.legend.placement">top</option>
        <option name="refresh.display">preview</option>
        <option name="trellis.enabled">1</option>
        <option name="trellis.scales.shared">0</option>
        <option name="trellis.size">large</option>
        <option name="trellis.splitBy">sourcetype</option>
        <option name="height">1600</option>
      </chart>
    </panel>
  </row>

View solution in original post

0 Karma

mclane1
Path Finder

Use trellis in a chart (form or dashboard): 

  <row>
    <panel>
      <chart>
        <search>
          <query>index="_internal" 
|  bin _time
| stats count by _time, sourcetype, status
| eval {status}=count
|  fields - status, count
| fillnull value=0 
|  stats sum(*) as * by _time, sourcetype</query>
          <earliest>-15m@m</earliest>
          <latest>now</latest>
          <refresh>10m</refresh>
          <refreshType>delay</refreshType>
        </search>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">-90</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.chart">area</option>
        <option name="charting.chart.stackMode">stacked</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.legend.mode">standard</option>
        <option name="charting.legend.placement">top</option>
        <option name="refresh.display">preview</option>
        <option name="trellis.enabled">1</option>
        <option name="trellis.scales.shared">0</option>
        <option name="trellis.size">large</option>
        <option name="trellis.splitBy">sourcetype</option>
        <option name="height">1600</option>
      </chart>
    </panel>
  </row>
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...