Splunk Dev

python ログのローテーションの設定を変更すると SplunkWeb がハングする

CurryPan
Communicator

下記のように log.cfg の [python] スタンザを変更し、pythonログのローテーションサイズと個数を変更しました。

[python]
appender.python.maxBackupIndex = 10 
appender.python.maxFileSize = 500

変更を反映するために、Splunkを再起動したところ、SplunkWebがスタートできずハングしたようになります。web_services.log を確認したところ、下記のエラーメッセージが表示されていました。

2017-04-04 15:56:02,928 ERROR   [58e34382a0701d2955c0] root:814 - 'module' object has no attribute '10' 
Traceback (most recent call last): 
File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\appserver\mrsparkle\root.py", line 90, in <module> 
splunk.setupSplunkLogger(logger, LOGGING_DEFAULT_CONFIG_FILE, LOGGING_LOCAL_CONFIG_FILE, LOGGING_STANZA_NAME) 
File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\__init__.py", line 154, in setupSplunkLogger 
logging.getLogger(loggerName).setLevel(getattr(logging, level)) 
AttributeError: 'module' object has no attribute '10' 

pythonログのローテーション設定はできないのでしょうか。

0 Karma

CurryPan
Communicator

Splunkでは、Python ログのローテーションを設定することはサポート対象外となり、設定すると SplunkWebが正常に起動されなくなります。なお、SplunkWebが起動できなくなる問題につきましては、Splunk ver.6.5.4 にて修正されます。

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...