<?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: Extract more values for the same item in one row in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67166#M16783</link>
    <description>&lt;P&gt;If you put this to a chart you will get a column chart with a legend  that has a color for each Port.   With this data I have three Port Names on the x axis and for each one there is a bar for value 1 or nothing if it is 0.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Sep 2012 14:42:24 GMT</pubDate>
    <dc:creator>sdaniels</dc:creator>
    <dc:date>2012-09-21T14:42:24Z</dc:date>
    <item>
      <title>Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67161#M16778</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have the following output of a script:&lt;BR /&gt;
fcs1 0 0 0 1 0 1 0 1 1 1&lt;BR /&gt;
fcs2 0 0 0 1 1 1 0 0 0 0 &lt;BR /&gt;
fcs3 0 0 0 1 1 1 1 1 0 0&lt;/P&gt;

&lt;P&gt;where the first word is the device name and the 0-1 values represent the statuses of the ports.&lt;BR /&gt;
Could you help in extracting the status and associate it with the port number?&lt;BR /&gt;
I would like to be able to extract:&lt;BR /&gt;
port=1 status=0&lt;BR /&gt;
port=2 status=0&lt;BR /&gt;
port=3 status=0&lt;BR /&gt;
port=4 status=1&lt;BR /&gt;
port=5 status=0&lt;BR /&gt;
...&lt;BR /&gt;
for each device.&lt;BR /&gt;
In this way, I can plot the status by port.&lt;/P&gt;

&lt;P&gt;Does anyone know how to do it?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Adriana&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 13:39:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67161#M16778</guid>
      <dc:creator>atelesca</dc:creator>
      <dc:date>2012-09-21T13:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67162#M16779</link>
      <description>&lt;P&gt;Assuming each line is one event. You can put these in the appropriate files under your user at &lt;SPLUNK_HOME&gt;/etc/users/&lt;USERNAME&gt;/local.  If the file doesn't exist just create a new file for it.  &lt;/USERNAME&gt;&lt;/SPLUNK_HOME&gt;&lt;/P&gt;

&lt;P&gt;Once the data is broken into the different port numbers you can do a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="your_sourcetype" | table PortName, Port1, Port2, Port3, Port4, Port5, Port6, Port7, Port8, Port9, Port10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///Users/path/path/file.txt]
disabled = false
followTail = 0
sourcetype = your_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
SHOULD_LINEMERGE = false
REPORT-testdata = your_extractions
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_extractions]
DELIMS = " "
FIELDS = "PortName", "Port1", "Port2","Port3", "Port4","Port5", "Port6","Port7", "Port8","Port9", "Port10"  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:24:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67162#M16779</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-09-21T14:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67163#M16780</link>
      <description>&lt;P&gt;Hello, thanks for your answer. I though of that, but then I don't know how to have a graph showing the different status by port number. Do you have any idea of how to do that?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:26:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67163#M16780</guid>
      <dc:creator>atelesca</dc:creator>
      <dc:date>2012-09-21T14:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67164#M16781</link>
      <description>&lt;P&gt;What do you want the graph to look like?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67164#M16781</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-09-21T14:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67165#M16782</link>
      <description>&lt;P&gt;I would like a column graph where the columns is the status (0-1) in correspondence of the port number (1-2-3-4).&lt;BR /&gt;
x1=1 y1=Port1 x2=2 y2=Port2 x3=3 y3=Port3&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67165#M16782</guid>
      <dc:creator>atelesca</dc:creator>
      <dc:date>2012-09-21T14:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract more values for the same item in one row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67166#M16783</link>
      <description>&lt;P&gt;If you put this to a chart you will get a column chart with a legend  that has a color for each Port.   With this data I have three Port Names on the x axis and for each one there is a bar for value 1 or nothing if it is 0.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 14:42:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-more-values-for-the-same-item-in-one-row/m-p/67166#M16783</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-09-21T14:42:24Z</dc:date>
    </item>
  </channel>
</rss>

