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

Add Elk Stack to Cantabular Import #106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ cantabular-import/analysis/count-log-events/*.txt
cantabular-import/analysis/tmp/*.txt

cantabular-import/analysis/simple-plot/*.svg

cantabular-import/elk/elasticsearch_data/*
2 changes: 1 addition & 1 deletion cantabular-import/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
COMPOSE_FILE=deps.yml:dp-import-api.yml:dp-import-cantabular-dataset.yml:dp-import-cantabular-dimension-options.yml:dp-cantabular-server.yml:dp-cantabular-api-ext.yml:dp-dataset-api.yml:dp-cantabular-csv-exporter.yml:dp-cantabular-dimension-api.yml:dp-cantabular-filter-flex-api.yml:dp-cantabular-metadata-service.yml:dp-cantabular-metadata-exporter.yml:dp-cantabular-xlsx-exporter.yml:dp-recipe-api.yml:dp-filter-api.yml:zebedee.yml:dp-download-service.yml:dp-frontend-dataset-controller.yml:dp-api-router.yml:dp-frontend-router.yml:dp-publishing-dataset-controller.yml:florence.yml:the-train.yml:babbage.yml:dp-frontend-filter-flex-dataset.yml:dp-population-types-api.yml
COMPOSE_FILE=elk.yml:deps.yml:dp-import-api.yml:dp-import-cantabular-dataset.yml:dp-import-cantabular-dimension-options.yml:dp-cantabular-server.yml:dp-cantabular-api-ext.yml:dp-dataset-api.yml:dp-cantabular-csv-exporter.yml:dp-cantabular-dimension-api.yml:dp-cantabular-filter-flex-api.yml:dp-cantabular-metadata-service.yml:dp-cantabular-metadata-exporter.yml:dp-cantabular-xlsx-exporter.yml:dp-recipe-api.yml:dp-filter-api.yml:zebedee.yml:dp-download-service.yml:dp-frontend-dataset-controller.yml:dp-api-router.yml:dp-frontend-router.yml:dp-publishing-dataset-controller.yml:florence.yml:the-train.yml:babbage.yml:dp-frontend-filter-flex-dataset.yml:dp-population-types-api.yml
COMPOSE_PATH_SEPARATOR=:
COMPOSE_PROJECT_NAME=cantabular-import-journey
2 changes: 1 addition & 1 deletion cantabular-import/.env.backend
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
COMPOSE_FILE=deps.yml:dp-import-api.yml:dp-import-cantabular-dataset.yml:dp-import-cantabular-dimension-options.yml:dp-cantabular-server.yml:dp-cantabular-api-ext.yml:dp-dataset-api.yml:dp-cantabular-csv-exporter.yml:dp-cantabular-dimension-api.yml:dp-filter-api.yml:dp-cantabular-filter-flex-api.yml:dp-cantabular-metadata-service.yml:dp-cantabular-metadata-exporter.yml:dp-cantabular-xlsx-exporter.yml:dp-recipe-api.yml:zebedee.yml:dp-download-service.yml:dp-population-types-api.yml
COMPOSE_FILE=elk.yml:deps.yml:dp-import-api.yml:dp-import-cantabular-dataset.yml:dp-import-cantabular-dimension-options.yml:dp-cantabular-server.yml:dp-cantabular-api-ext.yml:dp-dataset-api.yml:dp-cantabular-csv-exporter.yml:dp-cantabular-dimension-api.yml:dp-filter-api.yml:dp-cantabular-filter-flex-api.yml:dp-cantabular-metadata-service.yml:dp-cantabular-metadata-exporter.yml:dp-cantabular-xlsx-exporter.yml:dp-recipe-api.yml:zebedee.yml:dp-download-service.yml:dp-population-types-api.yml
COMPOSE_PATH_SEPARATOR=:
COMPOSE_PROJECT_NAME=cantabular-import-journey
40 changes: 40 additions & 0 deletions cantabular-import/elk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '3.3'
services:
logstash:
image: logstash:7.16.2
container_name: logstash
restart: always
volumes:
- ./elk/logstash/logstash.conf:/etc/logstash/logstash.conf
command: logstash -f /etc/logstash/logstash.conf
depends_on:
- elasticsearch
ports:
- '5044:5044'
- '5044:5044/udp'
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"

elasticsearch:
image: elasticsearch:7.16.2
container_name: elasticsearch
restart: always
volumes:
- ./elk/elasticsearch_data:/usr/share/elasticsearch/data/
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
discovery.type: single-node
ports:
- '9200:9200'
- '9300:9300'

kibana:
image: kibana:7.16.2
container_name: kibana
restart: always
ports:
- '5601:5601'
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
depends_on:
- elasticsearch
13 changes: 13 additions & 0 deletions cantabular-import/elk/logstash/logstash.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
input {
gelf {
type => docker
port => 5044
}
}

output {
elasticsearch {
hosts => ["http://elasticsearch:9200"]
index => "containers-%{+YYYY.MM.dd}"
}
}
5 changes: 5 additions & 0 deletions cantabular-import/florence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ services:
API_ROUTER_URL: "http://dp-api-router:23200"
ROUTER_URL: "http://dp-frontend-router:20000"
DATASET_CONTROLLER_URL: "http://dp-publishing-dataset-controller:24000"
logging:
driver: gelf
options:
gelf-address: "udp://127.0.0.1:5044"
tag: "florence"