<?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: Save value into a variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216672#M176018</link>
    <description>&lt;P&gt;So you want to capture the value from &lt;CODE&gt;updated_at:&lt;/CODE&gt; and send that value to another server?&lt;/P&gt;

&lt;P&gt;If so then you should create a field to capture the value, here's the regex to do so &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;updated_at\:\s(?&amp;lt;UpdatedTime&amp;gt;\d+\-\d+\-\d+T\d+\:\d+\:\d+\.\d+Z)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The field will be called UpdatedTime and have many values.. &lt;/P&gt;

&lt;P&gt;You can then create a Splunk alert anytime this field has a new value and trigger a script which can make a update the value&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2016 18:52:12 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2016-12-30T18:52:12Z</dc:date>
    <item>
      <title>Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216669#M176015</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I use Talend Open Studio to collect data on Gitlab (via Gitlab API) and send them to Splunk.&lt;/P&gt;

&lt;P&gt;As Gitlab continually has new data over time, I want to save the pull position. So at the next pull I will pull only the new data.&lt;/P&gt;

&lt;P&gt;Is it possible to create a variable on Splunk, save a value on this variable, and update the variable?&lt;BR /&gt;
If it is possible to create a variable on Splunk, is it possible to make (HTTP?) request to Splunk to retrieve the value of a variable?&lt;/P&gt;

&lt;P&gt;Thank you for your answer&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 13:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216669#M176015</guid>
      <dc:creator>Naaba</dc:creator>
      <dc:date>2016-12-30T13:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216670#M176016</link>
      <description>&lt;P&gt;By variable you mean a field right? If so then you will need to write a regular expression to capture the values for your field. Post some sample data and what you want to capture &lt;/P&gt;

&lt;P&gt;If you already have a field defined and you want to create a variable in your search, you will then need to use &lt;CODE&gt;eval&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/71194/declare-a-variable-in-search-string.html"&gt;https://answers.splunk.com/answers/71194/declare-a-variable-in-search-string.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 14:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216670#M176016</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-12-30T14:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216671#M176017</link>
      <description>&lt;P&gt;Hi Skoelpin,&lt;/P&gt;

&lt;P&gt;I send data in JSON format to splunk :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
     event: test
     description: splunk test   
     issue_id: 1
     updated_at: 2016-01-04T15:31:39.996Z
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have two serveurs : One server with my script and the second one with Splunk&lt;BR /&gt;
I want to make request to Splunk from my first server to retrieve/update the value save in "updated_at". &lt;BR /&gt;
Is it possible?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 15:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216671#M176017</guid>
      <dc:creator>Naaba</dc:creator>
      <dc:date>2016-12-30T15:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216672#M176018</link>
      <description>&lt;P&gt;So you want to capture the value from &lt;CODE&gt;updated_at:&lt;/CODE&gt; and send that value to another server?&lt;/P&gt;

&lt;P&gt;If so then you should create a field to capture the value, here's the regex to do so &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;updated_at\:\s(?&amp;lt;UpdatedTime&amp;gt;\d+\-\d+\-\d+T\d+\:\d+\:\d+\.\d+Z)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The field will be called UpdatedTime and have many values.. &lt;/P&gt;

&lt;P&gt;You can then create a Splunk alert anytime this field has a new value and trigger a script which can make a update the value&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 18:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216672#M176018</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-12-30T18:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216673#M176019</link>
      <description>&lt;P&gt;Sorry for the late. Thank you very much for your answer.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 14:28:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216673#M176019</guid>
      <dc:creator>Naaba</dc:creator>
      <dc:date>2017-01-11T14:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Save value into a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216674#M176020</link>
      <description>&lt;P&gt;@Naaba , if this answered your question, can you please accept it? &lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Save-value-into-a-variable/m-p/216674#M176020</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-01-12T15:57:15Z</dc:date>
    </item>
  </channel>
</rss>

