<?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 How do I compare field names? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213805#M42026</link>
    <description>&lt;P&gt;p.123.label - hostname 1&lt;BR /&gt;
p.123.status - status of the server 1&lt;/P&gt;

&lt;P&gt;p.234.label - hostname 2&lt;BR /&gt;
p.234.status - status of the server2&lt;/P&gt;

&lt;P&gt;... n servers list &lt;/P&gt;

&lt;P&gt;the above mentioned 123 and 234 are dynamic.&lt;/P&gt;

&lt;P&gt;How can the field names be compared? I need the output in the table format like each hostname and its status details respectively? Is it possible?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2016 06:33:44 GMT</pubDate>
    <dc:creator>gunturu_nagasri</dc:creator>
    <dc:date>2016-01-05T06:33:44Z</dc:date>
    <item>
      <title>How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213805#M42026</link>
      <description>&lt;P&gt;p.123.label - hostname 1&lt;BR /&gt;
p.123.status - status of the server 1&lt;/P&gt;

&lt;P&gt;p.234.label - hostname 2&lt;BR /&gt;
p.234.status - status of the server2&lt;/P&gt;

&lt;P&gt;... n servers list &lt;/P&gt;

&lt;P&gt;the above mentioned 123 and 234 are dynamic.&lt;/P&gt;

&lt;P&gt;How can the field names be compared? I need the output in the table format like each hostname and its status details respectively? Is it possible?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 06:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213805#M42026</guid>
      <dc:creator>gunturu_nagasri</dc:creator>
      <dc:date>2016-01-05T06:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213806#M42027</link>
      <description>&lt;P&gt;are these single line or multi-line?&lt;BR /&gt;
If its multi-line, is there a common field in those events?&lt;BR /&gt;
If its multi-line, are they coming in the mentioned order ie; hostname 1, status 1 , hostname2,status  etc?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 06:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213806#M42027</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-01-05T06:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213807#M42028</link>
      <description>&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;I am unable to attach the screen shot here from my desktop. It is poping for a Image url. Can i know how can i directy attach the screenshot without any links.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;It is a single line. It is not the feild value . It is the feild name. And the feild name has a comman begining and ending and in between nos are dynamic.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Query : &lt;/P&gt;

&lt;P&gt;| rest splunk_server=* /services/shcluster/status | fields peers*label, peers*status&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213807#M42028</guid>
      <dc:creator>gunturu_nagasri</dc:creator>
      <dc:date>2020-09-29T08:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213808#M42029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Just playing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server=* /services/shcluster/status |fields peers*label |transpose |table column "row 1" |rename "row 1" as label
|append [ rest splunk_server=* /services/shcluster/status | fields peers*status |transpose |table column "row 1" |rename "row 1" as status]
|rex field=column "[^\.]+.(?&amp;lt;id&amp;gt;[^\.]+)"
|stats last(label) as label last(status) as status by id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope i help you&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 09:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213808#M42029</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-01-05T09:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213809#M42030</link>
      <description>&lt;P&gt;Thanks a lot, This helped me , but i have a question i dont want results to be displayed by id. I want the results to be displayed by comparing the id value from the first search matching the id value with the second search. &lt;/P&gt;

&lt;P&gt;Eg : Id of host = 123, Id of status = 123 then its respective Hostname and status should be displayed in tabular format.&lt;/P&gt;

&lt;P&gt;i.e Search results of two searches should be combined by comparing the regex value.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 14:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213809#M42030</guid>
      <dc:creator>gunturu_nagasri</dc:creator>
      <dc:date>2016-01-05T14:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare field names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213810#M42031</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;But this is what it does... if you use this part:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rest splunk_server=* /services/shcluster/status |fields peers*label |transpose |table column "row 1" |rename "row 1" as label
 |append [ rest splunk_server=* /services/shcluster/status | fields peers*status |transpose |table column "row 1" |rename "row 1" as status]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will see that add the to tables in one.&lt;/P&gt;

&lt;P&gt;Then I extract the ID without .label and .status&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=column "[^\.]+.(?&amp;lt;id&amp;gt;[^\.]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then with the stats I "join" both in one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |stats last(label) as label last(status) as status by id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jan 2016 15:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-compare-field-names/m-p/213810#M42031</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-01-05T15:23:38Z</dc:date>
    </item>
  </channel>
</rss>

