<?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 make Splunk read the file when only date stamp of the file changes. in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347608#M5470</link>
    <description>&lt;P&gt;Hi lakromani,&lt;BR /&gt;
you don't need to write a file and then read it, you could use a scripted input (see &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro"&gt;https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro&lt;/A&gt; ).&lt;BR /&gt;
In other words, you should create a script with the command you have to run and then schedule and run it in from Splunk.&lt;BR /&gt;
In this way script output will be indexed with the indexing time and you have your result to search.&lt;BR /&gt;
To schedule and run a script you have to put your script in &lt;CODE&gt;$SPLUNK_HOME/bin&lt;/CODE&gt; or &lt;CODE&gt;$SPLUNK_HOME/etc/apps/your_app/bin&lt;/CODE&gt; folder and then follow the web gui procedure [Settings -- Data Inputs -- Scripts -- New].&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 07:30:37 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-09-25T07:30:37Z</dc:date>
    <item>
      <title>How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347607#M5469</link>
      <description>&lt;P&gt;I have a system where I use SSH to pull out status data from a remote system&lt;BR /&gt;
This is then stored to a file that Splunk i set to monitor.&lt;BR /&gt;
My problem is that the files is read from the system every 5 minutes, but Splunk only shows indexed data when file content is changed.&lt;BR /&gt;
I would like Splunk to show all the content every time the file changes date (5 min cron job), even if nothing has changed within the file.&lt;BR /&gt;
Is this possible?&lt;/P&gt;

&lt;P&gt;Example first run:&lt;BR /&gt;
&lt;STRONG&gt;red=1&lt;BR /&gt;
yellow=2&lt;/STRONG&gt;&lt;BR /&gt;
time stamp of file &lt;STRONG&gt;09:05&lt;/STRONG&gt;&lt;BR /&gt;
Splunk now show two events.&lt;/P&gt;

&lt;P&gt;Second run:&lt;BR /&gt;
&lt;STRONG&gt;red=1&lt;BR /&gt;
yellow=2&lt;/STRONG&gt;&lt;BR /&gt;
time stamp of file &lt;STRONG&gt;09:10&lt;/STRONG&gt;&lt;BR /&gt;
Splunk now shows no events.&lt;BR /&gt;
I need to show both every 5 min, even if they do not change.&lt;/P&gt;

&lt;P&gt;Third run:&lt;BR /&gt;
&lt;STRONG&gt;red=1&lt;BR /&gt;
yellow=3&lt;/STRONG&gt;&lt;BR /&gt;
time stamp of file &lt;STRONG&gt;09:15&lt;/STRONG&gt;&lt;BR /&gt;
Splunk now shows all event again, since content of file has change.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347607#M5469</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2017-09-25T07:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347608#M5470</link>
      <description>&lt;P&gt;Hi lakromani,&lt;BR /&gt;
you don't need to write a file and then read it, you could use a scripted input (see &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro"&gt;https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro&lt;/A&gt; ).&lt;BR /&gt;
In other words, you should create a script with the command you have to run and then schedule and run it in from Splunk.&lt;BR /&gt;
In this way script output will be indexed with the indexing time and you have your result to search.&lt;BR /&gt;
To schedule and run a script you have to put your script in &lt;CODE&gt;$SPLUNK_HOME/bin&lt;/CODE&gt; or &lt;CODE&gt;$SPLUNK_HOME/etc/apps/your_app/bin&lt;/CODE&gt; folder and then follow the web gui procedure [Settings -- Data Inputs -- Scripts -- New].&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347608#M5470</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-25T07:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347609#M5471</link>
      <description>&lt;P&gt;the file is read by splunk and getting indexed. &lt;BR /&gt;
but Splunk only shows indexed data when file content is changed.&lt;BR /&gt;
I would like Splunk to show all the content every time the file changes date (data?!?!?!) , even if nothing has changed within the file.&lt;/P&gt;

&lt;P&gt;little bit confusing.  is this is the real issue ?&lt;/P&gt;

&lt;P&gt;when you search, splunk shows only the recent changed data, not whole data. &lt;BR /&gt;
when you search, splunk should show the whole content of the file, even if there was no recent updates&lt;/P&gt;

&lt;P&gt;what query you are using&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347609#M5471</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-09-25T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347610#M5472</link>
      <description>&lt;P&gt;In search you can show all the indexed data or filter them as you like.&lt;BR /&gt;
The problem is to take logs only when changed or always.&lt;BR /&gt;
Using your solution, you index only changes, using scripted inputs, you index script output at every run.&lt;BR /&gt;
Based on the solution you choose you have to build you search.&lt;BR /&gt;
What is your need: an alert when there's a change? or to show always situation?&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347610#M5472</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-25T07:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347611#M5473</link>
      <description>&lt;P&gt;It should state "date" in the title, so:&lt;BR /&gt;
I would like Splunk to show all the content every time the file changes date stamp.&lt;/P&gt;

&lt;P&gt;See updated post.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:47:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347611#M5473</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2017-09-25T07:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347612#M5474</link>
      <description>&lt;P&gt;Would this then give me all the different status for all the event in the file, or only the event that do change?&lt;/P&gt;

&lt;P&gt;See updated post.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347612#M5474</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2017-09-25T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347613#M5475</link>
      <description>&lt;P&gt;try to use scripted input, it's the solution.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347613#M5475</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-25T07:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347614#M5476</link>
      <description>&lt;P&gt;Will try, thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 08:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347614#M5476</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2017-09-25T08:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Splunk read the file when only date stamp of the file changes.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347615#M5477</link>
      <description>&lt;P&gt;Can confirm its working.&lt;BR /&gt;
Learning some every day, thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 09:01:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-make-Splunk-read-the-file-when-only-date-stamp-of-the/m-p/347615#M5477</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2017-09-25T09:01:53Z</dc:date>
    </item>
  </channel>
</rss>

