<?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: How to use outputlookup and inputlookup in same dashboard in same query in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572434#M10463</link>
    <description>&lt;P&gt;Firstly, I wouldn't do it this way - keep the long-term state in a lookup file. In case you have any mistake in your processing, you lose your history. So overwriting blindly your only copy of calculated stats is a bad idea.&lt;/P&gt;&lt;P&gt;Anyway, I did a simple test - reading from a lookup, modifying the value(s) and writing it back seems to work ok.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test.csv
| eval field=field+1
| outputlookup test.csv&lt;/LI-CODE&gt;&lt;P&gt;Repetitive searches like that cause the field value to increase.&lt;/P&gt;&lt;P&gt;I assume that in your case you'd need something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlokup whatever
| append [ your search generating results ]
| outputlookup whatever&lt;/LI-CODE&gt;&lt;P&gt;Keep in mind though that each run of such search would append your lookup contents in this form so you'd have to implement some fancy logic to check whether to add whole next row or just update one of the results and so on. There's no good reason to complicate things that much. I'd just stick to calculating results on the fly and accelerate the report if needed.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 11:40:50 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-10-26T11:40:50Z</dc:date>
    <item>
      <title>How to use outputlookup and inputlookup in same dashboard in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572420#M10462</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am in situation where in I will send the results to one lookup file and from there again I need to take tail 2 two rows to display as a summary in my Dashboard. Below is the exact scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a search which compares last week and this week data and produces the results something like below.&lt;/P&gt;&lt;TABLE width="331"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="75"&gt;Date&lt;/TD&gt;&lt;TD width="64"&gt;Active&amp;nbsp;&lt;/TD&gt;&lt;TD width="64"&gt;Inactive&lt;/TD&gt;&lt;TD width="64"&gt;Deleted&lt;/TD&gt;&lt;TD width="64"&gt;Added&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/25/2021&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to send the results calculated in above search to one lookup file . Like that I will keep on sending&amp;nbsp; every week. It will be like below after some weeks say 3 weeks.&lt;/P&gt;&lt;TABLE width="331"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="75"&gt;Date&lt;/TD&gt;&lt;TD width="64"&gt;Active&amp;nbsp;&lt;/TD&gt;&lt;TD width="64"&gt;Inactive&lt;/TD&gt;&lt;TD width="64"&gt;Deleted&lt;/TD&gt;&lt;TD width="64"&gt;Added&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/25/2021&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/1/2021&lt;/TD&gt;&lt;TD&gt;78&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/8/2021&lt;/TD&gt;&lt;TD&gt;83&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so above is the lookup file,&amp;nbsp; then I need to use the the created lookup as input in the same query to perform some calculations (i.e,. I need to take tail 2 and display it as summary of last 2 weeks).&lt;/P&gt;&lt;P&gt;Tried something like below. But it didn't worked. Could someone help me on this.&lt;/P&gt;&lt;P&gt;&amp;lt;search &amp;gt; | outputlookup&amp;nbsp; test1.csv | search inputlookup test1.csv | tail 2&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 10:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572420#M10462</guid>
      <dc:creator>Keerthana_18</dc:creator>
      <dc:date>2021-10-26T10:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use outputlookup and inputlookup in same dashboard in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572434#M10463</link>
      <description>&lt;P&gt;Firstly, I wouldn't do it this way - keep the long-term state in a lookup file. In case you have any mistake in your processing, you lose your history. So overwriting blindly your only copy of calculated stats is a bad idea.&lt;/P&gt;&lt;P&gt;Anyway, I did a simple test - reading from a lookup, modifying the value(s) and writing it back seems to work ok.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test.csv
| eval field=field+1
| outputlookup test.csv&lt;/LI-CODE&gt;&lt;P&gt;Repetitive searches like that cause the field value to increase.&lt;/P&gt;&lt;P&gt;I assume that in your case you'd need something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlokup whatever
| append [ your search generating results ]
| outputlookup whatever&lt;/LI-CODE&gt;&lt;P&gt;Keep in mind though that each run of such search would append your lookup contents in this form so you'd have to implement some fancy logic to check whether to add whole next row or just update one of the results and so on. There's no good reason to complicate things that much. I'd just stick to calculating results on the fly and accelerate the report if needed.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 11:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572434#M10463</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-26T11:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use outputlookup and inputlookup in same dashboard in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572449#M10464</link>
      <description>&lt;P&gt;OK. It seems more complicated because the test did work (albeit run on a small all-in-one environment) but I wanted to do a one-off modification of a saved lookup and it seems doing an inputlookup then adding some column and saving the lookup file back didn't work. Strange.&lt;/P&gt;&lt;P&gt;It must have something to do whether I run it on all-in-one or on search head cluster, because it's repeatable - on aio it does work - modifying values, adding columns and so on. On SHC it seems to be not working.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 13:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-outputlookup-and-inputlookup-in-same-dashboard-in/m-p/572449#M10464</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-26T13:23:52Z</dc:date>
    </item>
  </channel>
</rss>

