<?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: Split the name in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298892#M56524</link>
    <description>&lt;P&gt;Now it is working Thank you very much I removed_nonum..&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 15:07:04 GMT</pubDate>
    <dc:creator>dchalasani</dc:creator>
    <dc:date>2017-05-17T15:07:04Z</dc:date>
    <item>
      <title>Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298880#M56512</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a values name like AV:EC2:ES:401 and AV:EC2 Now I want to show only EC2 how to show it.&lt;/P&gt;

&lt;P&gt;Can anyone please correct this query &lt;/P&gt;

&lt;P&gt;index=aws sourcetype=description |dedup signature_id |eval tmp=split(signature_id,"-") |eval services=mvindex(tmp,0)|stats count by services&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298880#M56512</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298881#M56513</link>
      <description>&lt;P&gt;Other than split there is any other way to do it? &lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 13:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298881#M56513</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T13:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298882#M56514</link>
      <description>&lt;P&gt;First, if you were using &lt;CODE&gt;split&lt;/CODE&gt;, you need to get the delimiter right, and to select the second field, you would use offset 1.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=aws sourcetype=description 
| dedup signature_id 
| eval tmp=split(signature_id,":") 
| eval services=mvindex(tmp,1)
| stats count by services
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Second, you could use &lt;CODE&gt;rex&lt;/CODE&gt; just as well&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=aws sourcetype=description 
| dedup signature_id 
| rex field=signature_id "^[^:]+:(?&amp;lt;services&amp;gt;[^:]+) 
| stats count by services
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2017 14:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298882#M56514</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-17T14:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298883#M56515</link>
      <description>&lt;P&gt;You are splitting your field on the "-" delimiter instead of the ":".  Also, in your mvindex, you want 1, not 0.  The 0 would be the first value, or "AV" in your example.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298883#M56515</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-17T14:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298884#M56516</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;If signature_id has these values: AV:EC2:ES:401 and AV:EC2, then your query need to be edited like this:&lt;/P&gt;

&lt;P&gt;index=aws sourcetype=description |dedup signature_id |eval tmp=split(signature_id,":") |eval services=mvindex(tmp,1)|stats count by services&lt;/P&gt;

&lt;P&gt;you can use rex command as well&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298884#M56516</guid>
      <dc:creator>aakwah</dc:creator>
      <dc:date>2020-09-29T14:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298885#M56517</link>
      <description>&lt;P&gt;Thanks Split is working..Can you do one correction It showing like EC2-007 and CLT-005. Now i want to remove that -007. want only EC2 or CLT to display &lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298885#M56517</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T14:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298886#M56518</link>
      <description>&lt;P&gt;Thanks Split is working..Can you do one correction It showing like EC2-007 and CLT-005. Now i want to remove that -007 or -005. I want only EC2 or CLT to display &lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298886#M56518</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T14:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298887#M56519</link>
      <description>&lt;P&gt;You could use the same method on that field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[BASE SEARCH]
| eval tmp=split(signature_id,":")
|eval services=mvindex(tmp,1)
| eval tmp2 = split(services,"-")
| eval services_nonum = mvindex(tmp2,0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2017 14:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298887#M56519</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-17T14:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298888#M56520</link>
      <description>&lt;P&gt;Still It is showing CLT-002 CFM-002 EC2-004 EC2 CS EC2-011 Like this..&lt;/P&gt;

&lt;P&gt;I want only services name like EC2,CLT,CFM...like that &lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298888#M56520</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T14:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298889#M56521</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;services    count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;1   ALB-001 1&lt;BR /&gt;
2   CFM-001 1&lt;BR /&gt;
3   CFM-002 1&lt;BR /&gt;
4   CLT-002      1&lt;BR /&gt;
5   CLT-003      1&lt;BR /&gt;
6   CLT-004     1&lt;BR /&gt;
7   CLT-005    1&lt;BR /&gt;
8   CLT-006    1&lt;BR /&gt;
9   CS        1&lt;BR /&gt;
10  EC2      2&lt;BR /&gt;
11  EC2-001     1&lt;BR /&gt;
12  EC2-002    1&lt;BR /&gt;
13  EC2-003    2&lt;BR /&gt;
14  EC2-004&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298889#M56521</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298890#M56522</link>
      <description>&lt;P&gt;Is your stats command counting by services?  I had changed the name in my example to services_nonum.  You could either use that or change that to services and leave the stats command line alone.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298890#M56522</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-17T14:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298891#M56523</link>
      <description>&lt;P&gt;I tried to do like this..It is also not working&lt;/P&gt;

&lt;P&gt;index=aws sourcetype=description | dedup signature_id &lt;BR /&gt;
 | eval tmp=split(signature_id,":")&lt;BR /&gt;
 |eval services=mvindex(tmp,1)&lt;BR /&gt;
 | eval tmp2 = split(services,"-")&lt;BR /&gt;
 | eval services_nonum = mvindex(tmp2,0) | eval tmp3=split(signature_id,"-")  | eval services_nonum = mvindex(tmp3,0)| stats count by services&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298891#M56523</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298892#M56524</link>
      <description>&lt;P&gt;Now it is working Thank you very much I removed_nonum..&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 15:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298892#M56524</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T15:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298893#M56525</link>
      <description>&lt;P&gt;Thank You DalJeanis and Kmorris for you help&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 15:07:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298893#M56525</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T15:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298894#M56526</link>
      <description>&lt;P&gt;Glad to help.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 15:13:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298894#M56526</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-17T15:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298895#M56527</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=aws sourcetype=description
| dedup signature_id
| rex field=services mode=sed "s/^[^:]+:// s/:.*$//"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2017 15:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298895#M56527</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-17T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298896#M56528</link>
      <description>&lt;P&gt;Thanks Woodcock..&lt;/P&gt;

&lt;P&gt;I am using this one  index=aws sourcetype=description | dedup signature_id &lt;BR /&gt;
 | eval tmp=split(signature_id,":")&lt;BR /&gt;
 |eval services=mvindex(tmp,1)&lt;BR /&gt;
 | eval tmp2 = split(services,"-")&lt;BR /&gt;
 | eval services = mvindex(tmp2,0) | stats count by services&lt;/P&gt;

&lt;P&gt;Now I want to show the services in Row format how to convert this column to row... I tried to use xyseries  but it is not working..&lt;/P&gt;

&lt;P&gt;Can you please correct the above string with Row format&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298896#M56528</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298897#M56529</link>
      <description>&lt;P&gt;I am using this one index=aws sourcetype=description | dedup signature_id &lt;BR /&gt;
| eval tmp=split(signature_id,":")&lt;BR /&gt;
|eval services=mvindex(tmp,1)&lt;BR /&gt;
| eval tmp2 = split(services,"-")&lt;BR /&gt;
| eval services = mvindex(tmp2,0) | stats count by services&lt;/P&gt;

&lt;P&gt;Now I want to show the services in Row format how to convert this column to row... I tried to use xyseries but it is not working..&lt;/P&gt;

&lt;P&gt;Can you please correct the above string with Row format&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298897#M56529</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298898#M56530</link>
      <description>&lt;P&gt;@dchalasani - (1) please start a new question for a new subject. (2) you can only "accept" one answer, but if an answer or comment is helpful, you can upvote them instead. (3) to transpose this, you could use untable and some other commands, or you can do this after your &lt;CODE&gt;stats count by services&lt;/CODE&gt; - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval {services} = count
| fields - services count
| stats values(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above assumes that all values of "services" would be valid field names.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 15:56:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298898#M56530</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-17T15:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Split the name</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298899#M56531</link>
      <description>&lt;P&gt;Thanks Dal!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 16:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-the-name/m-p/298899#M56531</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-17T16:22:45Z</dc:date>
    </item>
  </channel>
</rss>

