<?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: column name updated how to keep both query results ini same dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418521#M120340</link>
    <description>&lt;P&gt;Hi @jawaharas,&lt;/P&gt;

&lt;P&gt;My queries are working perfect. Its just that with ns1.alarm.ns1.attribute data is coming previous to 18th july and with alarm.attribut data is coming post 18th July. As after upgrade of the tool the names got changed. &lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2019 08:16:24 GMT</pubDate>
    <dc:creator>surekhasplunk</dc:creator>
    <dc:date>2019-07-31T08:16:24Z</dc:date>
    <item>
      <title>column name updated how to keep both query results ini same dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418519#M120338</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="spectrum"  * | eval foo=_cd | rename "ns1.alarm.ns1.attribute{}.$" as value "ns1.alarm.ns1.attribute{}.@id" as attr | table _time foo attr value| eval id=_cd | eval value=mvzip(attr,value) | mvexpand value | eval attr=mvindex(split(value,","),0) | eval value=mvindex(split(value,","),1) | lookup attr_alarm_spectrum.csv attr OUTPUT field | table _time,field,value,foo | fillnull field,value,foo  | eval {field}=value | fields - field,value | stats values(*) as * by _time,foo | fields - foo  | eval Severity=if(Severity="3","Critical",if(Severity="2","Major","Minor")) | search Severity=Minor (Name="***" OR IP="*")  | lookup  State_of_the_Asset_List_on_Unicorn.csv Ip as IP output  "Infrastrucure Name" | table _time, Severity,Name,IP,Secure_Domain,Type,Title,Landscape,Acknowledged,Ticket_ID "Infrastrucure Name" | sort -_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In  this query i was using ns1.alarm.ns1.attribute{} and ns1.alarm.ns1.attribute{}.@id  but now due to the tool upgrade the json data which  am receiving has got changed to alarms.attribute{} and alarm.attribute{}&lt;A href="mailto:.@id"&gt;.@id&lt;/A&gt;. So if i go ahead and update this query then post upgrade data is only visible but not before upgrade as the column names were different. &lt;/P&gt;

&lt;P&gt;So what do you suggest here to do ? to be able to see all the data with same 1st query ?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 06:52:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418519#M120338</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-07-31T06:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: column name updated how to keep both query results ini same dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418520#M120339</link>
      <description>&lt;P&gt;Instead of the '&lt;EM&gt;rename&lt;/EM&gt;' command, you can use '&lt;EM&gt;if&lt;/EM&gt;' and '&lt;EM&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/InformationalFunctions"&gt;isnotnull&lt;/A&gt;&lt;/EM&gt;' function as shown below to get data from both the fields.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="spectrum" * 
| eval foo=_cd 
| eval value=if(isnotnull(ns1.alarm.ns1.attribute{}),ns1.alarm.ns1.attribute{},alarms.attribute{})
| eval attr=if(isnotnull(ns1.alarm.ns1.attribute{}.@id),ns1.alarm.ns1.attribute{}.@id,alarm.attribute{}.@id)
| table _time foo attr value 
| ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 07:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418520#M120339</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-07-31T07:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: column name updated how to keep both query results ini same dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418521#M120340</link>
      <description>&lt;P&gt;Hi @jawaharas,&lt;/P&gt;

&lt;P&gt;My queries are working perfect. Its just that with ns1.alarm.ns1.attribute data is coming previous to 18th july and with alarm.attribut data is coming post 18th July. As after upgrade of the tool the names got changed. &lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 08:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418521#M120340</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-07-31T08:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: column name updated how to keep both query results ini same dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418522#M120341</link>
      <description>&lt;P&gt;Try the suggested query. It should return data from both the fields (before and after the date you mentioned)&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 08:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418522#M120341</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-07-31T08:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: column name updated how to keep both query results ini same dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418523#M120342</link>
      <description>&lt;P&gt;@surekhasplunk &lt;BR /&gt;
Can you accept the answer if it's helped you? Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 06:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/column-name-updated-how-to-keep-both-query-results-ini-same/m-p/418523#M120342</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-08-05T06:30:30Z</dc:date>
    </item>
  </channel>
</rss>

