kind: ConfigMap
metadata:
name: logstash-config
namespace: ns-erp
data:
logstash.conf: |-
input {
beats {
port => "9600"
}
}
output {
# You can uncomment this line to investigate the generated events by the logstash. 10.160.89.16
stdout {codec => rubydebug}
elasticsearch {
hosts => "http://10.160.89.16:9200"
index => "trapeze-logs"
username => "xxxx"
password => "xxxx"
}
}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: logstash
namespace: ns-erp
spec:
selector:
matchLabels:
app: logstash
template:
metadata:
labels:
app: logstash
spec:
hostname: logstash
containers:
- name: logstash
ports:
- containerPort: 9600
name: logstash
image: docker.elastic.co/logstash/logstash:7.5.0
volumeMounts:
- name: logstash-conf
mountPath: /usr/share/logstash/pipeline
command:
- logstash
volumes:
# Previously defined ConfigMap object.
- name: logstash-conf
configMap:
name: logstash-config
items:
- key: logstash.conf
path: logstash.conf
---
kind: Service
apiVersion: v1
metadata:
name: logstash
namespace: ns-erp
spec:
type: NodePort
selector:
app: logstash
ports:
- protocol: TCP
port: 9600
targetPort: 9600
name: logstash
---```
------------------------------------------------------------
Getting error like
sion.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set `xpack.monitoring.enabled: true` in logstash.yml
licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elasticsearch:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch: Name or service not known"}
licensereader] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch {:url=>http://elasticsearch:9200/, :error_message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
licensereader] Unable to retrieve license information from license server {:message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch"}
Welcome to our community!
It's not clear what the issue is here sorry, all I can see is some config?
Dear Mark,
We are getting error like Unable to retrieve license information from license server
and This is likely due to failure to reach a live Elasticsearch cluster.
I had attached our lagstash.yml file for your reference.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.