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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...

A Four Part Event Series: AI + Observability: AI Agents, LLMs, Apps, & Infrastructure

AI &#43; Observability: AI Agents, LLMs, Apps, & Infrastructure The rapid evolution of artificial intelligence ...