0
votes

I have added more than one path to logstash forwarder config file. But only the first one works. It is not sending logs for the second path. My config file.

 "network": {
 "servers": [ "x.x.x.x:5000" ],
 "ssl certificate": "./logstash-forwarder.crt",
 "ssl ca": "/etc/pki/tls/certs/logstash-forwarder.crt",
 "timeout": 15
 },
 "files": [
 {
 "paths": [ 
  "/opt/app1/application.log"
  ],
  "fields": { "type": "app1" }
},
{
    "paths":[
            "/opt/app2/application.log"
            ],
    "fields":{"type": "app2"}
}

]
}

I know I can add them together in the first path block and it will work, but I want to add two different types, which I guess can't be done in one path block.

1

1 Answers

0
votes

This is resolved. Actually the issue is that my second log file is not updated for more than a day. So, logstash-forwarder skipped it.

2015/08/07 04:55:14.029097 Skipping file (older than dead time of 24h0m0s):