diff --git a/.github/workflows/back-dev.yml b/.github/workflows/back-dev.yml index 732a581aa..cd2910236 100644 --- a/.github/workflows/back-dev.yml +++ b/.github/workflows/back-dev.yml @@ -50,7 +50,6 @@ jobs: mkdir -p deploy cp build/libs/*.jar deploy/application.jar cp -r .ebextensions deploy/.ebextensions - cp -r deploy-config deploy cd deploy && zip -r deploy.zip . - name: Deploy to EB diff --git a/backend/.ebextensions/02-set-filebeat.config b/backend/.ebextensions/02-set-filebeat.config new file mode 100644 index 000000000..5a0648d88 --- /dev/null +++ b/backend/.ebextensions/02-set-filebeat.config @@ -0,0 +1,48 @@ +files: + "/tmp/make_filebeat_yml.sh": + mode: "000755" + content: | + #!/bin/bash + PASSWORD=$(sudo /opt/elasticbeanstalk/bin/get-config environment -k ELASTICSEARCH_PASSWORD) + HOST=$(sudo /opt/elasticbeanstalk/bin/get-config environment -k ELASTICSEARCH_HOST) + PORT=$(sudo /opt/elasticbeanstalk/bin/get-config environment -k ELASTICSEARCH_PORT) + USER=$(sudo /opt/elasticbeanstalk/bin/get-config environment -k ELASTICSEARCH_USER) + cat > /home/ec2-user/filebeat-7.14.1-linux-x86_64/filebeat.yml < /dev/null 2>&1 &" diff --git a/backend/deploy-config/promtail-local-config.yaml b/backend/deploy-config/promtail-local-config.yaml deleted file mode 100644 index c13d78b87..000000000 --- a/backend/deploy-config/promtail-local-config.yaml +++ /dev/null @@ -1,46 +0,0 @@ -server: - http_listen_port: 9080 - grpc_listen_port: 0 - -positions: - filename: /tmp/positions.yaml - -clients: - - url: http://13.125.198.59:3100/loki/api/v1/push - -scrape_configs: - - job_name: access - static_configs: - - targets: - - localhost - labels: - job: access - __path__: /var/app/current/logs/access/access.log - - job_name: info - static_configs: - - targets: - - localhost - labels: - job: info - __path__: /var/app/current/logs/info/info.log - - job_name: warn - static_configs: - - targets: - - localhost - labels: - job: warn - __path__: /var/app/current/logs/warn/warn.log - - job_name: error - static_configs: - - targets: - - localhost - labels: - job: error - __path__: /var/app/current/logs/error/error.log - - job_name: performance - static_configs: - - targets: - - localhost - labels: - job: performance - __path__: /var/app/current/logs/performance/performance.log