I'm still getting an error, new error is this now:
for key in flat.keys():
metaKey = key.startswith('@metadata.')
# Range keys as used in 'date_range' etc will not have docs of course
isRangeKey = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
if not(is_documented(key, expected_fields) or metaKey or isRangeKey):
> raise Exception("Key '{}' found in event is not documented!".format(key))
E Exception: Key 'bizswitch.thread' found in event is not documented!
../libbeat/tests/system/beat/beat.py:729: Exception
------------------------------------------------------------------------------------------- Captured stdout call -------------------------------------------------------------------------------------------
Using elasticsearch: http://localhost:9200
Testing bizswitch/log on /home/saffatechy/projects/go/src/github.com/elastic/beats/filebeat/tests/system/../../module/bizswitch/log/test/BizSwitch.log
========================================================================================= short test summary info ==========================================================================================
FAILED tests/system/test_modules.py::Test::test_fileset_file_0_bizswitch - Exception: Key 'bizswitch.thread' found in event is not documented!
====================================================================================== 1 failed in 165.39s (0:02:45) =======================================================================================
Even though the key can be found in the fields.yml file.
for key in flat.keys():
metaKey = key.startswith('@metadata.')
# Range keys as used in 'date_range' etc will not have docs of course
isRangeKey = key.split('.')[-1] in ['gte', 'gt', 'lte', 'lt']
if not(is_documented(key, expected_fields) or metaKey or isRangeKey):
> raise Exception("Key '{}' found in event is not documented!".format(key))
E Exception: Key 'bizswitch.thread' found in event is not documented!
../libbeat/tests/system/beat/beat.py:729: Exception
------------------------------------------------------------------------------------------- Captured stdout call -------------------------------------------------------------------------------------------
Using elasticsearch: http://localhost:9200
Testing bizswitch/log on /home/justint/projects/go/src/github.com/elastic/beats/filebeat/tests/system/../../module/bizswitch/log/test/BizSwitch.log
========================================================================================= short test summary info ==========================================================================================
FAILED tests/system/test_modules.py::Test::test_fileset_file_0_bizswitch - Exception: Key 'bizswitch.thread' found in event is not documented!
====================================================================================== 1 failed in 142.49s (0:02:22) =======================================================================================
If I modify the fields.yml file to remove the bizswitch.thread field, I obtain the same error as you do. What seems to indicate that your fields are not updated.
In your last change, you modified the pipeline as I suggested, but you introduced some changes in the fields.yml file too. At least the thread and category fields need to be defined line this, without the bizswitch preffix that is automatically added:
If I download your code, and apply the changes on the fields.yml file of the bizswitch module, everything works for me. No need to run make create-fields again or anything.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.