shipper.py problem's
Posted: Tue Feb 07, 2017 11:14 am
HI,
I try to use shipper.py to push some log to analyze them.
I have two problem. First is about
The second problem is about multiline support. In that log file I have couple java stack trace and that stack trace is not in 1 message. I see it in multiple log entry in Nagios Log Server. Not really usefull for us.
It's possible to use JSON with multiline support or other option to support that type of log entry.
Thank you!
I try to use shipper.py to push some log to analyze them.
Code: Select all
cat as_sq_prd_408_01_SystemOut_17.02.01_22.09.54.log | python ../shipper.py | nc nagioslogserver 2057Code: Select all
'utf8' codec can't decode bytes in position 131-133: invalid dataCode: Select all
cat as_sq_prd_408_01_SystemOut_17.02.01_22.09.54.log | python shipper.py | nc nagioslogserver 2057
'utf8' codec can't decode bytes in position 131-133: invalid data
Traceback (most recent call last):
File "shipper.py", line 242, in ?
main()
File "shipper.py", line 237, in main
process_stream(sys.stdin, message)
File "shipper.py", line 217, in process_stream
print json.dumps(message)
File "/usr/lib/python2.4/site-packages/simplejson/__init__.py", line 230, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.4/site-packages/simplejson/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.4/site-packages/simplejson/encoder.py", line 260, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 131-133: invalid data
It's possible to use JSON with multiline support or other option to support that type of log entry.
Thank you!