<?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: What's the best way to insert a single value into a lookup table without editing a csv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313945#M93961</link>
    <description>&lt;P&gt;If you want to generate some entry that is not based on a search result, just use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Makeresults"&gt;makeresults&lt;/A&gt; command.&lt;/P&gt;

&lt;P&gt;That way you can get rid of the index=_audit bit and the duplicate bit. You probably want to keep the table bit to strip the _time field that is generated with the makeresults command.&lt;/P&gt;

&lt;P&gt;If you're doing this manually, you could also consider installing the &lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;lookup editor app&lt;/A&gt; (or use the one from Splunk Enterprise Security if you are using that app), such that you can edit lookups through a GUI.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2018 16:28:56 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-01-22T16:28:56Z</dc:date>
    <item>
      <title>What's the best way to insert a single value into a lookup table without editing a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313943#M93959</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;To insert a single new value into a lookup table, I've been running something like this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_audit earliest=-10s | eval myfield="foo"&lt;BR /&gt;
| dedup myfield&lt;BR /&gt;
| table myfield&lt;BR /&gt;
| outputlookup append=true mylookup&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But it seems clunky. Any other recommendations? I thought of first running &lt;CODE&gt;inputlookup mylookup&lt;/CODE&gt;, then exporting, then updating the csv, then reuploading. Is there a better way to do this?&lt;/P&gt;

&lt;P&gt;I should add that the myfield and foo values have nothing to do with the _audit index. I'm just looking for a way to generate an event so I can eval the field that I need.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 15:09:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313943#M93959</guid>
      <dc:creator>grittonc</dc:creator>
      <dc:date>2018-01-22T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to insert a single value into a lookup table without editing a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313944#M93960</link>
      <description>&lt;P&gt;You can do like this (assuming myfield is the primary key in the lookup)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit earliest=-10s | eval myfield="foo" | dedup myfield | table myfield 
| inputlookup mylookup append=t 
| dedup myfield | outputlookup mylookup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above will add new entries from _audit query OR update (replace) existing entries.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 15:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313944#M93960</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-22T15:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to insert a single value into a lookup table without editing a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313945#M93961</link>
      <description>&lt;P&gt;If you want to generate some entry that is not based on a search result, just use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Makeresults"&gt;makeresults&lt;/A&gt; command.&lt;/P&gt;

&lt;P&gt;That way you can get rid of the index=_audit bit and the duplicate bit. You probably want to keep the table bit to strip the _time field that is generated with the makeresults command.&lt;/P&gt;

&lt;P&gt;If you're doing this manually, you could also consider installing the &lt;A href="https://splunkbase.splunk.com/app/1724/"&gt;lookup editor app&lt;/A&gt; (or use the one from Splunk Enterprise Security if you are using that app), such that you can edit lookups through a GUI.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313945#M93961</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-01-22T16:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to insert a single value into a lookup table without editing a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313946#M93962</link>
      <description>&lt;P&gt;if you looking for how to make fake data in Splunk using SPL. Then have a look at this link&lt;/P&gt;

&lt;P&gt;&lt;A href="https://gist.github.com/bshuler/5d0d75ac43ed8f57809fed6b60c4bfca"&gt;https://gist.github.com/bshuler/5d0d75ac43ed8f57809fed6b60c4bfca&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 17:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313946#M93962</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-22T17:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to insert a single value into a lookup table without editing a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313947#M93963</link>
      <description>&lt;P&gt;Thanks, but I was trying not to use any index in generating the data. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 18:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-s-the-best-way-to-insert-a-single-value-into-a-lookup-table/m-p/313947#M93963</guid>
      <dc:creator>grittonc</dc:creator>
      <dc:date>2018-07-09T18:16:33Z</dc:date>
    </item>
  </channel>
</rss>

