From 28cbe7f7b2b80e194d4cc09236b62ea4da5f8924 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Mon, 26 Feb 2024 15:34:17 +0800 Subject: [PATCH] add logstash alert imgpull --- dev-upgrade/elastic/logstash-alert.yaml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/dev-upgrade/elastic/logstash-alert.yaml b/dev-upgrade/elastic/logstash-alert.yaml index 0de4d2e..a82f83e 100644 --- a/dev-upgrade/elastic/logstash-alert.yaml +++ b/dev-upgrade/elastic/logstash-alert.yaml @@ -54,28 +54,31 @@ data: command => "/usr/local/bin/log-alert.sh '%{@timestamp}' '%{serviceName}' '%{env}' '%{level}' '%{message}'" } } +logstash.yml: |- + http.host: "0.0.0.0" + xpack.monitoring.elasticsearch.hosts: [ "http://elastic:9200" ] --- apiVersion: apps/v1 kind: Deployment metadata: - name: logstash + name: logstash-alert labels: - app: logstash + app: logstash-alert spec: replicas: 1 selector: matchLabels: - app: logstash + app: logstash-alert template: metadata: labels: - app: logstash + app: logstash-alert spec: imagePullSecrets: - - name: docker-hub + - name: deploy-regcred containers: - - name: logstash + - name: logstash-alert image: beaconfireiic/logstash:7.16.3 ports: - containerPort: 5044 @@ -98,7 +101,7 @@ spec: volumes: - name: config configMap: - name: logstash-config-alert + name: logstash-alert-config items: - key: logstash.conf path: logstash.conf @@ -109,13 +112,14 @@ spec: apiVersion: v1 kind: Service metadata: - name: logstash + name: logstash-alert labels: - app: logstash + app: logstash-alert spec: ports: - port: 5044 targetPort: 5044 + nodePort: 30011 selector: - app: logstash + app: logstash-alert type: ClusterIP \ No newline at end of file