From 2f9d117a705b746685e04abc4367734bfdd4fa20 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sun, 19 Jul 2020 21:10:34 +0200 Subject: [PATCH 1/4] changed default retention to 7d --- geoip2influx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geoip2influx.py b/geoip2influx.py index 2b178a0..acb9fd8 100644 --- a/geoip2influx.py +++ b/geoip2influx.py @@ -40,8 +40,8 @@ influxdb_port = env.get('INFLUX_HOST_PORT', '8086') influxdb_database = env.get('INFLUX_DATABASE', 'geoip2influx') influxdb_user = env.get('INFLUX_USER', 'root') influxdb_user_pass = env.get('INFLUX_PASS', 'root') -influxdb_retention = env.get('INFLUX_RETENTION','30d') -influxdb_shard = env.get('INFLUX_SHARD', '2d') +influxdb_retention = env.get('INFLUX_RETENTION','7d') +influxdb_shard = env.get('INFLUX_SHARD', '1d') geo_measurement = env.get('GEO_MEASUREMENT', 'geoip2influx') log_measurement = env.get('LOG_MEASUREMENT', 'nginx_access_logs') send_nginx_logs = env.get('SEND_NGINX_LOGS','true') @@ -311,4 +311,4 @@ if __name__ == '__main__': try: main() except KeyboardInterrupt: - exit(0) \ No newline at end of file + exit(0) From 336c6337160cc64a3c412bf04d3dc879b11a2eb8 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sun, 19 Jul 2020 21:11:04 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 100c36b..95b839a 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ Add the ones that differ on your system. | LOG_MEASUREMENT | nginx_access_logs | InfluxDB measurement name for nginx logs. Optional, defaults to the example. | | SEND_NGINX_LOGS | true | Set to `false` to disable nginx logs. Optional, defaults to `true`. | | GEOIP2INFLUX_LOG_LEVEL | info | Sets the log level in geoip2influx.log. Use `debug` for verbose logging Optional, defaults to info. | -| INFLUX_RETENTION | 30d | Sets the retention for the database. Optional, defaults to example.| -| INFLUX_SHARD | 2d | Set the shard for the database. Optional, defaults to example. | +| INFLUX_RETENTION | 7d | Sets the retention for the database. Optional, defaults to example.| +| INFLUX_SHARD | 1d | Set the shard for the database. Optional, defaults to example. | | MAXMINDDB_LICENSE_KEY | xxxxxxx | Add your Maxmind licence key | From eef28379980c071aa42e097cd105371aaa27def5 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sat, 25 Jul 2020 11:40:06 +0200 Subject: [PATCH 3/4] added versions --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5abbd2e..82b023b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -geoip2 -geohash2 -influxdb -IPy \ No newline at end of file +geoip2==3.0.0 +geohash2==1.1 +influxdb==5.3.0 +IPy==1.0 From 698c67ca11d1cbc1b2998ef38cf52fd326b38345 Mon Sep 17 00:00:00 2001 From: GilbN Date: Thu, 13 Aug 2020 13:52:41 +0200 Subject: [PATCH 4/4] added logrotate package... --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 95c9bc0..1421581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ echo " ## Installing packages ## " && \ apk add --no-cache --virtual=build-dependencies \ python3 \ py3-pip \ + logrotate \ libmaxminddb && \ echo " ## Installing python modules ## " && \ pip3 install --no-cache-dir -r requirements.txt -COPY root/ / \ No newline at end of file +COPY root/ /