Closed gfa closed 9 years ago
Hello,
Your dead time configuration is in the wrong place I think.
[snip]
"files": [
{ "dead time":"1h" },
{"paths": ["/var/log/nova/nova-api.log",
"/var/log/upstart/nova-api.log" ],
"fields": {"type": "nova", "tags": [ "oslofmt", "nova-api" ]}},
[snip]
The dead time should be within the configuration for a file. I will look into why this passed configuration validation as it should have failed. The block with a dead time contains no path entry (so it is invalid).
It should be:
[snip]
"files": [
{"paths": ["/var/log/nova/nova-api.log",
"/var/log/upstart/nova-api.log" ],
"dead time":"1h",
"fields": {"type": "nova", "tags": [ "oslofmt", "nova-api" ]}},
[snip]
The behaviour is as designed though. If we close the log on rotation, and haven't sent the logs contents to the Logstash server, the contents will be lost, and this would break the at-least-once delivery guarantee that Log Courier provides. Maybe there's a way to handle problematic situations like this where the existing behaviour can lead to disk filling up.
Suggestions are welcome - I'm thinking along the lines of a "delete hold max" or something that says, only keep a deleted file open for this long before giving up and reporting an ERROR to log file that logs were lost. For the majority of situations the transmission will have completed by the time rotation occurs so should not impact anyone else.
OK I confirm the bug where you can specify a files entry with no path! I'll get this fixed soon for 1.7 maintenance release.
I hate the invalid label, sorry :X gonna rename it to be less patronising :-1:
ouch! same issue again /me not parsing the docs appropriately :(
@gfa no worries! Doesn't help when the daft developer doesn't validate the config properly :) (that's me, doh!)
ufff. what a title
here the problem i've found. sometimes my logstash-server gets unreachable, due network problems or logstash-server itself. if log files (on the client side) get rotated during that period. logcourier will not release the files when reconnect to logstash-server, making my /var/log full and ops people unhappy
it happened for some time now, i've upgraded to 1.6 and still happens (i have more logs, and info saved, just pasteing what i think is relevant)
log-courier's log when the files were rotated
log-courier's log when it reconnected to logstash-server
i have setup "dead time" and "persist directory" shouldn't deltas of what can't be send stored on "persist directory" ? that would be good
thanks, awesome software