2
Je suis en train d'utiliser Logstash avec Docker Compose, le fichier .yml ressemble à ceci:Docker Compose - Logstash - avec le code 0 est sorti après le début
user-service:
image: images/user-service
ports:
- "2222:2222"
links:
- logstash
logstash:
image: images/logstash
command: logstash -e 'input{} output{}'
ports:
- "5045:5045"
Et logstash commence et se termine, comme le montre la console :
logstash_1 | Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
logstash_1 | 01:51:30.164 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>250}
logstash_1 | 01:51:30.246 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
logstash_1 | 01:51:30.860 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
logstash_1 | 01:51:33.318 [LogStash::Runner] WARN logstash.agent - stopping pipeline {:id=>"main"}
docker_logstash_1 exited with code 0
Quel pourrait être le problème?
Êtes-vous sûr du fichier de indenter yml? – Val
Je l'ai résolu de changer la commande, j'ai utilisé 'entrée {tcp { port => 9600 host => localhost } } sortie {stdout {}}' Mais je ne sais pas comment faire le logbak. fichier xml, ' logstash: 5045 destination> ' Comment dois-je mettre dans le journal de destination Logstash: 5045 ou Logstash: 5045? Merci. –
AleGallagher