While running logstash in kubernetes we are facing below issue

[ERROR] 2023-03-03 10:00:52.266 [Ruby-0-Thread-5@[main]>worker0: /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:383] elasticsearch - Encountered a retryable error. Will Retry with exponential backoff {:code=>400, :url=>"https://******:9200/_bulk"}


apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-configmap
namespace: default
data:
logstash.yml: |
http.host: "0.0.0.0"
path.config: /usr/share/logstash/pipeline
logstash.conf: >
# all input will come from filebeat, no local logs

input {

file{ 
 path => "/mnt/azure/logs/*.log"
          start_position => beginning
          tags => [ "rajesh" ]
          sincedb_path => "NUL"
        }
      }
  filter {
  }
output {
if "test-service" in [tags] {
elasticsearch {
hosts => ["https://******:9200"]
cacert => '/mnt/azure/config/certs/ca.crt'
index => "rajesh-%{+YYYY.MM.dd}"
user => "*******"
password => "**********"

}
}
}

apiVersion: apps/v1
kind: Deployment
metadata:
name: logstash-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: logstash
template:
metadata:
labels:
app: logstash
spec:
containers:
- name: logstash
image: docker.elastic.co/logstash/logstash:6.3.0
ports:
- containerPort: 5044
volumeMounts:
- name: azure
mountPath: /mnt/azure/
- name: config-volume
mountPath: /usr/share/logstash/config
- name: logstash-pipeline-volume
mountPath: /usr/share/logstash/pipeline
volumes:
- name: azure
persistentVolumeClaim:
claimName: mountfileshare
- name: config-volume
configMap:
name: logstash-configmap
items:
- key: logstash.yml
path: logstash.yml
- name: logstash-pipeline-volume
configMap:
name: logstash-configmap
items:
- key: logstash.conf
path: logstash.conf


kind: Service
apiVersion: v1
metadata:
name: logstash-service
namespace: default
spec:
selector:
app: logstash
ports:
- protocol: TCP
port: 5044
targetPort: 5044
type: ClusterIP

I would recommend masking password before posting them.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.