All Apps and Add-ons

File/Directory Information Input App: Seeing error in the log (server has Python 2.7.5).

dpark1113
Explorer

Hi,

Just installed the app on a universal forwarder and getting this error in the log. Any idea what the issue is? Is there any configuration I need to edit other than inputs.conf? Thanks.

Server has Python 2.7.5 and I created symlink: splunkforwarder/bin/python2.7 -> /usr/bin/python

file_meta_data_modular_input.log:

2020-05-27 13:04:35,867 ERROR Execution failed
Traceback (most recent call last):
  File "/home/opc/splunk/splunkforwarder/etc/apps/file_meta_data/bin/modular_input.zip/modular_input/modular_input_base_class.py", line 1095, in execute
    self.do_run(in_stream, log_exception_and_continue=True)
  File "/home/opc/splunk/splunkforwarder/etc/apps/file_meta_data/bin/modular_input.zip/modular_input/modular_input_base_class.py", line 976, in do_run
    self.run(stanza, cleaned_params, input_config)
  File "/home/opc/splunk/splunkforwarder/etc/apps/file_meta_data/bin/file_meta_data.py", line 621, in run
    file_filter=file_filter)
TypeError: get_file_data() got an unexpected keyword argument 'file_filter'

inputs.conf:

[file_meta_data://vendor_data]
interval          = 5m
file_hash_limit   = 500MB
file_path         = /home/vendor_files/
recurse           = 0
only_if_changed   = 0
include_file_hash = 0
disabled          = 0
Labels (2)
0 Karma

dpark1113
Explorer

UPDATE:

I looked at the code file_meta_data.py, and removed the file_filter=file_filter in these lines. That seems working.

if recurse:
results, new_latest_time = self.get_files_data(file_path, logger=self.logger,
latest_time=latest_time,
must_be_later_than=must_be_later_than,
file_hash_limit=file_hash_limit,
depth_limit=depth_limit)
else:
result, new_latest_time = self.get_file_data(file_path, logger=self.logger,
latest_time=latest_time,
must_be_later_than=must_be_later_than,
file_hash_limit=file_hash_limit)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...