<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multi time chart of key value property in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624821#M217204</link>
    <description>&lt;P&gt;How many 'services' will you have, as a timechart gets messy and difficult to manage beyond 20 or so lines (10 services).&lt;/P&gt;&lt;P&gt;Assuming your JSON auto extracts, then just use this line&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart limit=&amp;lt;your_max_limit&amp;gt; span=&amp;lt;your_span&amp;gt; perc90(execution_times.*) as p90_* perc99(execution_times.*) as p99_*&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 20 Dec 2022 10:35:20 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-12-20T10:35:20Z</dc:date>
    <item>
      <title>How to create a multi time chart of key value property?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624815#M217203</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following events in Splunk&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;{&lt;BR /&gt;  &lt;SPAN&gt;"field1"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"something"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;"execution_times"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;{&lt;BR /&gt;    &lt;SPAN&gt;"service1"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;"service2"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;400&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;(...)&lt;BR /&gt;    "service_N": 600,&lt;BR /&gt;&lt;/SPAN&gt;  }&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;"field2"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"something"&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;
&lt;P&gt;How can I create a multiline chart that would show p90 + p99 of&amp;nbsp;each "service" in JSON map "&lt;SPAN&gt;execution_times" based on the values [here 100, 400, (...) 600].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The query should produce a chart with N*2 (for p90 and p99) different time series (lines) based on all "services" that were inside events.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Each event can contain different "services" in its&amp;nbsp;execution_times map.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Dec 2022 14:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624815#M217203</guid>
      <dc:creator>mskala</dc:creator>
      <dc:date>2022-12-20T14:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multi time chart of key value property</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624821#M217204</link>
      <description>&lt;P&gt;How many 'services' will you have, as a timechart gets messy and difficult to manage beyond 20 or so lines (10 services).&lt;/P&gt;&lt;P&gt;Assuming your JSON auto extracts, then just use this line&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart limit=&amp;lt;your_max_limit&amp;gt; span=&amp;lt;your_span&amp;gt; perc90(execution_times.*) as p90_* perc99(execution_times.*) as p99_*&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Dec 2022 10:35:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624821#M217204</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-12-20T10:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multi time chart of key value property</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624831#M217211</link>
      <description>&lt;P&gt;Thank you, that almost worked.&lt;/P&gt;&lt;P&gt;I will be using a Trellis layout to show a chart for each "service"&lt;/P&gt;&lt;P&gt;How can I tune this query to see p90 and p99 in a single chart?&lt;/P&gt;&lt;P&gt;The chart for service_1 should display p90 and p99 lines only for service_1.&lt;/P&gt;&lt;P&gt;Currently, in trellis, I am getting N*2 charts and I'd like to see just N.&lt;/P&gt;&lt;P&gt;Probably I need to set some split by but don't know how.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 10:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624831#M217211</guid>
      <dc:creator>mskala</dc:creator>
      <dc:date>2022-12-20T10:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multi time chart of key value property</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624836#M217213</link>
      <description>&lt;P&gt;I think that as all the services are in a single event, you need to expand out the events, so you can get an aggregation by service, so if you do this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename execution_times.* as *
| fields - field*
| timechart span=1m fixedrange=f perc90(*) as *_p90 perc99(*) as *_p99
| foreach service*_p* [ eval services=mvappend("service_&amp;lt;&amp;lt;MATCHSEG1&amp;gt;&amp;gt;".":"."&amp;lt;&amp;lt;MATCHSEG2&amp;gt;&amp;gt;".":".'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',services) ]
| fields _time services
| mvexpand services
| rex field=services "(?&amp;lt;service&amp;gt;[^:]*):(?&amp;lt;p&amp;gt;[^:]*):(?&amp;lt;v&amp;gt;.*)"
| eval p_{p}=v
| fields - p services
| stats values(p*) as p* by _time service&lt;/LI-CODE&gt;&lt;P&gt;which is taking the timechart and then expanding all the services to their own events.&lt;/P&gt;&lt;P&gt;At least this works for trellis if you then select service as the trellis aggregation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 11:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/624836#M217213</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-12-20T11:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multi time chart of key value property</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/625464#M217417</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Previous example almost work but it took all fields from event to create charts (like field1 and field2 from example event)&lt;/P&gt;&lt;P&gt;But after tuning it up it now works correctly.&lt;/P&gt;&lt;P&gt;Many thanks for your help &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Case closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1m fixedrange=f perc90(execution_times.*) as *_p90 perc99(execution_times.*) as *_p99
| foreach *_p* [ eval services=mvappend("service_&amp;lt;&amp;lt;MATCHSEG1&amp;gt;&amp;gt;".":"."&amp;lt;&amp;lt;MATCHSEG2&amp;gt;&amp;gt;".":".'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',services) ]
| fields _time services
| mvexpand services
| rex field=services "(?&amp;lt;service&amp;gt;[^:]*):(?&amp;lt;p&amp;gt;[^:]*):(?&amp;lt;v&amp;gt;.*)"
| eval p_{p}=v
| fields - p services
| stats values(p*) as p* by _time service&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 10:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-multi-time-chart-of-key-value-property/m-p/625464#M217417</guid>
      <dc:creator>mskala</dc:creator>
      <dc:date>2022-12-29T10:07:38Z</dc:date>
    </item>
  </channel>
</rss>

