Deployment Architecture

Set forwarder to Ignore previous logs

Navanitha
Path Finder

We have the forwarder installed on a RHEL server to pull the kern messages into Splunk. The requirement is Splunk should not pull the logs when the server or Splunk service is down (meaning generally when a server is rebooted, splunk will go back to the history where it has stopped reading the logs and then pull the logs from there till recent), We don't want splunk to do that, so it should now pull logs only from the current time when the server or the splunk service has come up. Is there a way we can do this? There is no schedule for a reboot, it might be on adhoc basis.

Tags (3)
0 Karma

ddrillic
Ultra Champion

Right, you can set the ignoreOlderThan for few minutes. On a regular basis, you take a risk here that if the forwarder hasn't completed its job, you might lose data.

Another way, it that upon reboot, you automatically adjust the ignoreOlderThan to 0 minutes. You can adjust your boot start script to take care of it.

0 Karma

hunters_splunk
Splunk Employee
Splunk Employee

Hi Richgalloway,

You can try adding the following setting in inputs.conf:

ignoreOlderThan = [s|m|h|d]
* The monitor input will compare the modification time on files it encounters
with the current time. If the time elapsed since the modification time
is greater than this setting, it will be placed on the ignore list.
* Files placed on the ignore list will not be checked again for any
reason until the Splunk software restarts, or the file monitoring subsystem
is reconfigured. This is true even if the file becomes newer again at a
later time.

Hope it helps. Thanks!
Hunter

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...