Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fw index name #79

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## 1.2.x
### 1.2.5
#### Bugfix
* Fixed index name from `fw` to `fw-proxy`
### 1.2.4
#### Bugfix
* Fixed ValueError('make_aware expects a naive datetime') in calc_distance function setting the timezone to True in the `Login.timestamp` model field
Expand Down
2 changes: 1 addition & 1 deletion buffalogs/buffalogs/settings/certego.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
CERTEGO_BUFFALOGS_POSTGRES_USER = os.environ.get("BUFFALOGS_POSTGRES_USER", "default_user")
CERTEGO_BUFFALOGS_POSTGRES_PASSWORD = os.environ.get("BUFFALOGS_POSTGRES_PASSWORD", "password")
CERTEGO_BUFFALOGS_POSTGRES_PORT = os.environ.get("BUFFALOGS_POSTGRES_PORT", "5432")
CERTEGO_BUFFALOGS_ELASTIC_INDEX = os.environ.get("BUFFALOGS_ELASTIC_INDEX", "weblog-*,cloud-*,filebeat-*")
CERTEGO_BUFFALOGS_ELASTIC_INDEX = os.environ.get("BUFFALOGS_ELASTIC_INDEX", "weblog-*,cloud-*,fw-proxy-*,filebeat-*")
CERTEGO_BUFFALOGS_SECRET_KEY = os.environ.get("BUFFALOGS_SECRET_KEY", "django-insecure-am9z-fi-x*aqxlb-@abkhb@pu!0da%0a77h%-8d(dwzrrktwhu")

if CERTEGO_BUFFALOGS_ENVIRONMENT == ENVIRONMENT_DOCKER:
Expand Down
5 changes: 4 additions & 1 deletion buffalogs/impossible_travel/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def process_user(db_user, start_date, end_date):
if "source" in hit:
tmp = {"timestamp": hit["@timestamp"]}
tmp["id"] = hit.meta["id"]
tmp["index"] = hit.meta["index"].split("-")[0]
if hit.meta["index"].split("-")[0] == "fw":
tmp["index"] = "fw-proxy"
else:
tmp["index"] = hit.meta["index"].split("-")[0]
tmp["ip"] = hit["source"]["ip"]
if "geo" in hit.source:
if "location" in hit.source.geo and "country_name" in hit.source.geo:
Expand Down
2 changes: 1 addition & 1 deletion config/buffalogs/buffalogs.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ BUFFALOGS_POSTGRES_PORT=5432
BUFFALOGS_POSTGRES_DB=buffalogs
BUFFALOGS_POSTGRES_USER=default_user
BUFFALOGS_POSTGRES_PASSWORD=password
BUFFALOGS_ELASTIC_INDEX=weblog-*,cloud-*,fw-proxy-*
BUFFALOGS_ELASTIC_INDEX=weblog-*,cloud-*,fw-proxy-*,filebeat-*
BUFFALOGS_SECRET_KEY=django-insecure-am9z-fi-x*aqxlb-@abkhb@pu!0da%0a77h%-8d(dwzrrktwhu