Splunk Search

How do you discard events from the cron.log?

New Member

On my universal forwarder, I have a repeated entry in my cron.log file that I would like to discard. However, I am not very familiar with regex terms. The entry in the cron.log is:

hostname  CROND[27158]: (root) CMD (/bin/sh /etc/init.d/swiagentd swrestart > /dev/null 2&>1)

I have followed the instructions at:


and I am using the following:

TRANSFORMS-null= setnull

REGEX = swrestart
DEST_KEY = queue
FORMAT = nullQueue

I have restarted but I am still getting the message in my search. Do I have the correct regex? And is there a specific place in each .conf file that I should put the stanzas?

0 Karma

Esteemed Legend

You need to deploy this to the first full instance of Splunk that handles the data (either HF or Indexer tier). You need to restart all Splunk instances there. You need to forward in NEW data (old data will remain) so add _index_earliest=-5m to your All time search.

0 Karma

Path Finder

@scamarda if you want to do parsing of the input, you have to do it either on Heavy Forwarder or on Indexer.
Universal Forwarder is not capable of parsing or transforms.

The some good reading about it:
and subsequently next page:

Other interesting article about where to configure what in the data pipeline and for which part of the pipeline is here:

0 Karma


Did you make this configuration on your Universal Forwarder?

I am asking this because the documentation on Route and filter data says:

You can use heavy forwarders to filter and route event data to Splunk instances.

So I believe that these kind of filters are not working on Universal Forwarders.

I suggest you put this configuration on the system which comes after the Universal Forwarder (probably a Heavy Forwarder or an Indexer) or replace the Universal Forwarder installation with a Heavy Forwarder.

0 Karma



is /var/log/cron the source which is displayed with this events? Could it be that it is /var/log/cron.log

0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...