<?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 add own WAN IP using a script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618133#M106669</link>
    <description>&lt;P&gt;Splunk doesn't run scripts or external commands at index time, probably out of concern for performance.&lt;/P&gt;&lt;P&gt;Consider ingesting the data with a modular input (which can insert the IP address) or use Cribl to insert the IP address before the data gets to the indexers.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2022 12:44:47 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-10-24T12:44:47Z</dc:date>
    <item>
      <title>How to add own WAN IP using a script?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618113#M106663</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;I'm monitoring external Web Server logs and want to run an Alert detecting errors caused by other IP addresses than my own WAN IP assigned from my Internet provider.&lt;/P&gt;
&lt;P&gt;Though, I thought I'd run a script during index-time for sourcetype "http:errors:linux" that gives back just my external IP into new/additional field "own_wan_ip". This needs to be done at index-time and not at search time as external IP changes quite often leading to wrong "own_wan_ip" when adding at search time.&lt;/P&gt;
&lt;P&gt;My python mini-script:&lt;/P&gt;
&lt;P&gt;#!/usr/bin/env python3&lt;BR /&gt;import os&lt;BR /&gt;os.system('dig +short txt ch whoami.cloudflare @1.0.0.1')&lt;/P&gt;
&lt;P&gt;I tried to find some solution in Splunk's documentation like this &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.7/Data/Configureindex-timefieldextraction" target="_self"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.7/Data/Configureindex-timefieldextraction&lt;/A&gt; but there's only regex-based creation.&lt;/P&gt;
&lt;P&gt;If anyone could provide me a solution for this i'd really be happy.&lt;BR /&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618113#M106663</guid>
      <dc:creator>eherbst63</dc:creator>
      <dc:date>2022-10-24T13:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add own WAN IP using a script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618133#M106669</link>
      <description>&lt;P&gt;Splunk doesn't run scripts or external commands at index time, probably out of concern for performance.&lt;/P&gt;&lt;P&gt;Consider ingesting the data with a modular input (which can insert the IP address) or use Cribl to insert the IP address before the data gets to the indexers.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 12:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618133#M106669</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-24T12:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add own WAN IP using a script?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618140#M106672</link>
      <description>&lt;P&gt;Not that what I'd like to read but... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thanks for helping anyway,&lt;/P&gt;&lt;P&gt;Ekke&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-own-WAN-IP-using-a-script/m-p/618140#M106672</guid>
      <dc:creator>eherbst63</dc:creator>
      <dc:date>2022-10-24T13:44:15Z</dc:date>
    </item>
  </channel>
</rss>

