Splunk Dev

How to rollover python logs in splunk

strive
Influencer

Hi,

I could not find settings to roll over python logs in splunk. In our systems, the python.log size is increasing day by day. When the log file size grows exponentially, neither customers can send us the logs, nor we would be able to open using any editors to analyze the issues.

I tried changing the settings in log.cfg, but none worked. I searched splunk base, i found a similar question asked few days back, but its not answered.

http://splunk-base.splunk.com/answers/77755/enabling-python-log-rollover-in-splunk

As a last resort i should write custom scripts which runs on the background to archive and delete python logs. I prefer some settings from splunk side rather than writing custom scripts.

Thanks

Strive

Tags (1)
1 Solution

strive
Influencer

http://dev.splunk.com/view/splunk-extensions/SP-CAAAEA9 this link was helpful.

In my python scripts i set handlers to RotatingFileHandler.

View solution in original post

strive
Influencer

http://dev.splunk.com/view/splunk-extensions/SP-CAAAEA9 this link was helpful.

In my python scripts i set handlers to RotatingFileHandler.

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...