obsrvbl-oss / flowlogs-reader Goto Github PK
View Code? Open in Web Editor NEWCommand line tool and Python library for working with AWS VPC Flow Logs
License: Apache License 2.0
Command line tool and Python library for working with AWS VPC Flow Logs
License: Apache License 2.0
Hi,
Thank you for this tool, very useful!
A couple of suggestion:
Thanks
This is not an issue. Just want to know your opinion, which is the best - CloudWatch logs vs S3 logs in terms of performance using this library for same infrastructure?
On occasion the pager returned by get_paginator('filter_log_events')
will raise PaginationError
, noting The same next token was received twice
.
One hopes that this will be eventually fixed in botocore, and one hopes that this actually signals the end of the stream.
This issue is to catch the exception and terminate without raising an exception.
pip download flowlogs-reader
unzip flowlogs_reader-*.whl
cat flowlogs_reader-*.dist-info/top_level.txt
# flowlogs_reader
# tests
mkvirtualenv example
python -c 'import tests'
# ModuleNotFoundError: No module named 'tests'
pip install flowlogs-reader
python3 -c 'import tests'
# (no error)
docker run --rm -it ubuntu
apt update
apt install python3 python3-pip
python3 -c 'import tests'
# ModuleNotFoundError: No module named 'tests'
pip3 install flowlogs-reader
python3 -c 'import tests'
# (no error)
Trying to use filter pattern with S3FlowLogsReader Class in python and it returns error
FILTER_PATTERN = (
'[version="2", account_id, interface_id, srcaddr, dstaddr, '
'srcport, dstport, protocol="17", packets, bytes, '
'start, end, action, log_status="OK", instance_id]'
)
reader = S3FlowLogsReader('xyz-vpc-flow-logs', include_regions=['us-east-1'], filter_pattern=FILTER_PATTERN)
records = list(reader)
for record in records:
print (record)
Error is as follows
Traceback (most recent call last):
File "flowlogs-read1.py", line 14, in <module>
reader = S3FlowLogsReader('xyz-vpc-flow-logs', include_regions=['us-east-1'], filter_pattern=FILTER_PATTERN)
File "/usr/local/lib/python2.7/site-packages/flowlogs_reader/flowlogs_reader.py", line 266, in __init__
super(S3FlowLogsReader, self).__init__('s3', **kwargs)
TypeError: __init__() got an unexpected keyword argument 'filter_pattern'
The flow_logs_reader hangs while trying to retrieve large result dataset.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 377, in _make_request httplib_response = conn.getresponse(buffering=True) TypeError: getresponse() got an unexpected keyword argument 'buffering'
It would be very helpful if you could tag releases as well. This would enable distributions who want to run your tests to fetch the package from GitHub instead of PyPI, where the tests are excluded.
It looks like that this was done in the past.
Thanks
The AWS region name is currently hardcoded to us-east-1, but it should use Boto's default behavior (e.g. using the default region configured in ~/.aws/config):
https://github.com/obsrvbl/flowlogs-reader/blob/master/flowlogs_reader/flowlogs_reader.py#L128
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.