<?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: Not able to generate timechart from a multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387830#M113124</link>
    <description>&lt;P&gt;In your table there is also values like that?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2019 07:04:05 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2019-07-15T07:04:05Z</dc:date>
    <item>
      <title>Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387825#M113119</link>
      <description>&lt;P&gt;I am getting my input in json format like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"message":{"SID":"DEV","TIMESTAMP":1563095600,"PARAMS":[{"PROC_CODE":"10110","PROC_VALUE":"                                                                                                                                                                                                                                                             2","SYS_NAME":"ALL"},{"PROC_CODE":"10010","PROC_VALUE":"20190712","SYS_NAME":"sapbcsdev_DEV_00"},{"PROC_CODE":"10020","PROC_VALUE":"125853","SYS_NAME":"sapbcsdev_DEV_00"},{"PROC_CODE":"10030","PROC_VALUE":"9","SYS_NAME":"sapbcsdev_DEV_00"},{"PROC_CODE":"10040","PROC_VALUE":"1","SYS_NAME":"sapbcsdev_DEV_00"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am printing this value in table by using below query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test_data" sourcetype="SAP:data" | rename message.PARAMS{}.PROC_CODE as PROC_CODE, message.PARAMS{}.PROC_VALUE as PROC_VALUE, message.PARAMS{}.SYS_NAME as SYS_NAME, message.SID as SID, message.TIMESTAMP as TIMESTAMP
| eval TIMESTAMP=strftime(TIMESTAMP, "%Y-%m-%d %H:%M:%S")
| eval mvf1 = mvzip(PROC_CODE, PROC_VALUE, ";") | eval mvf2 = mvzip(mvf1, SYS_NAME, ";") 
| mvexpand mvf2 | eval n=split(mvf2,";") 
| eval PROC_CODE=mvindex(n,0), PROC_VALUE=mvindex(n,1), SYS_NAME=mvindex(n,2) 
| lookup PROC_DETAIL PROC_CODE OUTPUT PROC_CODE PROC_NAME PROC_PARA PROC_TYPE 
| search SYS_NAME="*" PROC_TYPE=* PROC_PARA=*
| table TIMESTAMP SID SYS_NAME PROC_TYPE PROC_PARA PROC_CODE PROC_NAME PROC_VALUE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is the output of this query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIMESTAMP   SID SYS_NAME    PROC_TYPE   PROC_PARA   PROC_CODE   PROC_NAME   PROC_VALUE
2019-07-14 08:48:20 DEV ALL KPI ALL 10110   Number of App Servers   2
2019-07-14 08:48:20 DEV sapbcsdev_DEV_00    INFO    INSTANCE    10010   INSTANCE START DATE 20190712
2019-07-14 08:48:20 DEV sapbcsdev_DEV_00    INFO    INSTANCE    10020   INSTANCE START TIME 125853
2019-07-14 08:48:20 DEV sapbcsdev_DEV_00    KPI INSTANCE    10030   Workprocess Dia Active Count    9
2019-07-14 08:48:20 DEV sapbcsdev_DEV_00    KPI INSTANCE    10040   Workprocess Upd Active Count    1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now when I am trying to publish some trent using timechart like avg/ min/ max on PROC_VALUE, i am not getting proper output. I assume that still PROC_VALUE is behaving like multi value field.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387825#M113119</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2020-09-30T01:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387826#M113120</link>
      <description>&lt;P&gt;Can you perhaps share the actual query incl. the timechart attempt and explain the output you get and how that is not what you want?&lt;/P&gt;

&lt;P&gt;To make the &lt;CODE&gt;timechart&lt;/CODE&gt; command work, you need to have an &lt;CODE&gt;_time&lt;/CODE&gt; field, containing an epoch timestamp.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 10:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387826#M113120</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-14T10:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387827#M113121</link>
      <description>&lt;P&gt;Hi @FrankVl &lt;BR /&gt;
I am using below query for timechart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test_data" sourcetype="SAP:data" | rename message.PARAMS{}.PROC_CODE as PROC_CODE, message.PARAMS{}.PROC_VALUE as PROC_VALUE, message.PARAMS{}.SYS_NAME as SYS_NAME, message.SID as SID, message.TIMESTAMP as TIMESTAMP
| eval TIMESTAMP=strftime(TIMESTAMP, "%Y-%m-%d %H:%M:%S")
| eval mvf1 = mvzip(PROC_CODE, PROC_VALUE, ";") | eval mvf2 = mvzip(mvf1, SYS_NAME, ";") 
| mvexpand mvf2 | eval n=split(mvf2,";") 
| eval PROC_CODE=mvindex(n,0), PROC_VALUE=mvindex(n,1), SYS_NAME=mvindex(n,2) 
| lookup PROC_DETAIL PROC_CODE OUTPUT PROC_CODE PROC_NAME PROC_PARA PROC_TYPE 
| search SYS_NAME="*" PROC_TYPE=* PROC_PARA=* PROC_CODE=10130
| timechart span=5m avg(PROC_VALUE) as "Average Value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need avg/max/min of PROC_VALUE over the time.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 10:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387827#M113121</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2019-07-14T10:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387828#M113122</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="test_data" sourcetype="SAP:data"
| rename message.PARAMS{}.PROC_CODE as PROC_CODE, message.PARAMS{}.PROC_VALUE as PROC_VALUE, message.PARAMS{}.SYS_NAME as SYS_NAME, message.SID as SID, message.TIMESTAMP as TIMESTAMP 
| eval TIMESTAMP=strftime(TIMESTAMP, "%Y-%m-%d %H:%M:%S") 
| eval mvf1 = mvzip(PROC_CODE, PROC_VALUE, ";") 
| eval mvf2 = mvzip(mvf1, SYS_NAME, ";") 
| mvexpand mvf2 
| eval n=split(mvf2,";") 
| eval PROC_CODE=mvindex(n,0), PROC_VALUE=mvindex(n,1), SYS_NAME=mvindex(n,2)
| eval _time=strptime(TIMESTAMP, "%Y-%m-%d %H:%M:%S")
| timechart span=5m min(PROC_VALUE) avg(PROC_VALUE) max(PROC_VALUE)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should do the job&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 11:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387828#M113122</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2019-07-14T11:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387829#M113123</link>
      <description>&lt;P&gt;Hi @schose &lt;BR /&gt;
I have already tried above query but it's showing me wrong output.&lt;BR /&gt;
with table command I am getting value in PROC_VALUE like 2,1, 0, 2 but avg is coming like 20190712, which is wrong output.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 11:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387829#M113123</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2019-07-14T11:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387830#M113124</link>
      <description>&lt;P&gt;In your table there is also values like that?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 07:04:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387830#M113124</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-15T07:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387831#M113125</link>
      <description>&lt;P&gt;hi @FrankVl &lt;BR /&gt;
In table i am getting proper result.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 09:03:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387831#M113125</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2019-07-15T09:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387832#M113126</link>
      <description>&lt;P&gt;In the table you posted in your question I also see those high values in the PROC_VALUE column.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 10:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387832#M113126</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-15T10:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387833#M113127</link>
      <description>&lt;P&gt;Hi @FrankVl &lt;BR /&gt;
I want to create chart only for specific PROC_CODE.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387833#M113127</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2019-07-15T14:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387834#M113128</link>
      <description>&lt;P&gt;Can you then please share the output of the relevant table command, incl. the filter. Because now it is rather confusing.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387834#M113128</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-15T14:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387835#M113129</link>
      <description>&lt;P&gt;You have to put this in there somewhere:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | search NOT "PROC_NAME"="Instance Start*" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387835#M113129</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-15T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387836#M113130</link>
      <description>&lt;P&gt;Hi @FrankVl &lt;BR /&gt;
Below is the output in table format. I want timechart based on PROC_VALUE field. (like avg/ min/ max)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIMESTAMP   SID SYS_NAME    PROC_TYPE   PROC_PARA   PROC_CODE   PROC_NAME   PROC_VALUE
2019-07-14 15:13:20 DEV ALL KPI INSTANCE    10130   User Count  4
2019-07-14 15:13:20 DEV ALL KPI INSTANCE    10130   User Count  2
2019-07-14 15:08:20 DEV ALL KPI INSTANCE    10130   User Count  4
2019-07-14 15:08:20 DEV ALL KPI INSTANCE    10130   User Count  2
2019-07-14 15:03:20 DEV ALL KPI INSTANCE    10130   User Count  4
2019-07-14 15:03:20 DEV ALL KPI INSTANCE    10130   User Count  2
2019-07-14 14:58:20 DEV ALL KPI INSTANCE    10130   User Count  4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2019 03:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387836#M113130</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2019-07-16T03:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to generate timechart from a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387837#M113131</link>
      <description>&lt;P&gt;Just add this to the bottom of your existing search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval PROC_NAME = "PROC_NAME_" . PROC_NAME
| eval {PROC_NAME} = PROC_VALUE
| eval _time = strptime(TIMESTAMP, "%Y-%m-%d %H:%M:%S")
| timechart min(PROC_NAME_*) AS min_* max(PROC_NAME_*) AS max_* avg(PROC_NAME_*) AS avg_*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is a run-anywhere PoC:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
|  eval raw="TIMESTAMP=2019-07-14T08:48:20,SID=DEV,SYS_NAME=ALL,PROC_TYPE=KPI,PROC_PARA=ALL,PROC_CODE=10110,PROC_NAME=Number_of_App_Servers,PROC_VALUE=2 TIMESTAMP=2019-07-14T08:48:20,SID=DEV,SYS_NAME=sapbcsdev_DEV_00,PROC_TYPE=INFO,PROC_PARA=INSTANCE,PROC_CODE=10010,PROC_NAME=INSTANCE_START_DATE,PROC_VALUE=20190712 TIMESTAMP=2019-07-14T08:48:20,SID=DEV,SYS_NAME=sapbcsdev_DEV_00,PROC_TYPE=INFO,PROC_PARA=INSTANCE,PROC_CODE=10020,PROC_NAME=INSTANCE_START_TIME,PROC_VALUE=125853 TIMESTAMP=2019-07-14T08:48:20,SID=DEV,SYS_NAME=sapbcsdev_DEV_00,PROC_TYPE=KPI,PROC_PARA=INSTANCE,PROC_CODE=10030,PROC_NAME=Workprocess_Dia_Active_Count,PROC_VALUE=9 TIMESTAMP=2019-07-14T08:48:20,SID=DEV,SYS_NAME=sapbcsdev_DEV_00,PROC_TYPE=KPI,PROC_PARA=INSTANCE,PROC_CODE=10040,PROC_NAME=Workprocess_Upd_Active_Count,PROC_VALUE=1"
| makemv raw
| mvexpand raw
| rename raw AS _raw
| kv
| rex field=TIMESTAMP mode=sed "s/T/ /"
| eval PROC_NAME = "PROC_NAME_" . PROC_NAME
| eval {PROC_NAME} = PROC_VALUE
| eval _time = strptime(TIMESTAMP, "%Y-%m-%d %H:%M:%S")
| timechart min(PROC_NAME_*) AS min_* max(PROC_NAME_*) AS max_* avg(PROC_NAME_*) AS avg_*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Jul 2019 23:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-able-to-generate-timechart-from-a-multivalue-field/m-p/387837#M113131</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-27T23:09:28Z</dc:date>
    </item>
  </channel>
</rss>

