<?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: Can you set a certain time forwarding occurs? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72118#M14703</link>
    <description>&lt;P&gt;for clarification Option1 is a script ran by cron or task manager, while Option 2 is a scripted input in Splunk.&lt;/P&gt;

&lt;P&gt;also note that there should be two additional * for the cron entry&lt;/P&gt;

&lt;P&gt;ie. 0 0 * * *&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2012 21:23:31 GMT</pubDate>
    <dc:creator>jguarini</dc:creator>
    <dc:date>2012-09-26T21:23:31Z</dc:date>
    <item>
      <title>Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72112#M14697</link>
      <description>&lt;P&gt;How often does a forwarder check its logs and forward data?&lt;BR /&gt;
Can I set some sort of configuration where forwarders only forward data at lets say 12:00 AM at night?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 19:33:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72112#M14697</guid>
      <dc:creator>aywong</dc:creator>
      <dc:date>2012-09-26T19:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72113#M14698</link>
      <description>&lt;P&gt;No, you cannot.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 19:39:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72113#M14698</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-09-26T19:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72114#M14699</link>
      <description>&lt;P&gt;okay thanks, do you know how often a forwarder checks and forwards data though?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 19:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72114#M14699</guid>
      <dc:creator>aywong</dc:creator>
      <dc:date>2012-09-26T19:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72115#M14700</link>
      <description>&lt;P&gt;@aywong, Why would you want to collect at midnight, can you give your use case?&lt;/P&gt;

&lt;P&gt;Ayn is correct there is not a way directly built into splunk for exact time based forwarding of data, but there are ways to accomplish this.  Most monitoring done on a poll interval.&lt;/P&gt;

&lt;P&gt;File monitoring is based on file checksum. I belive it isendpoint_md5 by default.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 20:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72115#M14700</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-09-26T20:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72116#M14701</link>
      <description>&lt;P&gt;The forwarder sends data as soon as it has any to send. How often it CHECKS data depends entirely on which type of input you're talking about. Some inputs, like scripted inputs and WMI inputs, will run at certain configurable intervals. Other inputs, like a regular file monitor, will check on such a regular basis that you can consider it to be more or less real-time.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 20:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72116#M14701</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-09-26T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72117#M14702</link>
      <description>&lt;P&gt;The easiest way to accomplish this would be a scripted input with Splunk's CLI "add one shotmore" command or with the type/cat command.  My example to does not have any logic to handle datetime appends to file names.&lt;/P&gt;

&lt;P&gt;Additional info:&lt;BR /&gt;
&lt;LI&gt;35&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/MonitorfilesanddirectoriesusingtheCLI" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.3/Data/MonitorfilesanddirectoriesusingtheCLI&lt;/A&gt;35&lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;35&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/ScriptedInputsIntro" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/ScriptedInputsIntro&lt;/A&gt;35&lt;/LI&gt;&lt;BR /&gt;
On your forwarer edit you inputs.conf&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;#windows&lt;BR /&gt;
[script://.daily_file.bat c:\somedir\somelog.log]&lt;BR /&gt;
disabled = true&lt;BR /&gt;
index = main&lt;BR /&gt;
source = c:\somedir\somelog.log&lt;BR /&gt;
sourcetype = ras&lt;BR /&gt;
interval = 0 0 * * *&lt;/P&gt;

&lt;P&gt;#*nix&lt;BR /&gt;
[script://./bin/daily_file.sh /somedir/somelog.log]&lt;BR /&gt;
disabled = true&lt;BR /&gt;
index = main&lt;BR /&gt;
source = /somedir/somelog.log&lt;BR /&gt;
sourcetype = ras&lt;BR /&gt;
interval = 0 0 * * *&lt;BR /&gt;
&lt;BR /&gt;
Option 1&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#*nix&lt;BR /&gt;
#!/bin/bash&lt;BR /&gt;
$SPLUNK_HOME/bin/splunk add oneshot $1 -auth admin:changeme&lt;BR /&gt;
done&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#windows&lt;BR /&gt;
echo off&lt;BR /&gt;
%splunk%\splunk add oneshot %1 -auth admin:changeme&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Option 2&lt;BR /&gt;
This will read the output from cat or type which would normally be displayed on your CMD prompt.&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#*nix&lt;BR /&gt;
#!/bin/bash&lt;BR /&gt;
cat $1 &lt;BR /&gt;
done&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#windows&lt;BR /&gt;
echo off&lt;BR /&gt;
type %1 &lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72117#M14702</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2020-09-28T12:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72118#M14703</link>
      <description>&lt;P&gt;for clarification Option1 is a script ran by cron or task manager, while Option 2 is a scripted input in Splunk.&lt;/P&gt;

&lt;P&gt;also note that there should be two additional * for the cron entry&lt;/P&gt;

&lt;P&gt;ie. 0 0 * * *&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 21:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72118#M14703</guid>
      <dc:creator>jguarini</dc:creator>
      <dc:date>2012-09-26T21:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72119#M14704</link>
      <description>&lt;P&gt;All scripted inputs are ran on the cron notation.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 21:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72119#M14704</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-09-26T21:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set a certain time forwarding occurs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72120#M14705</link>
      <description>&lt;P&gt;Thanks this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2012 14:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-set-a-certain-time-forwarding-occurs/m-p/72120#M14705</guid>
      <dc:creator>aywong</dc:creator>
      <dc:date>2012-09-27T14:12:14Z</dc:date>
    </item>
  </channel>
</rss>

