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!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...