Upstart Logrotate?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
What's wrong with my config? I had to --force the logrotate a couple times to see changes, but the numbering is all wonky.
----@----------:/var/log/upstart# ls -Anh
total 4.0G
-rw-r----- 1 0 0 56K Aug 21 08:41 graylog-server.log
-rw-r----- 1 0 0 1.1G Aug 21 08:36 graylog-server.log.1.1.gz
-rw-r----- 1 0 0 727M Aug 21 08:35 graylog-server.log.1.gz.1.gz
-rw-r----- 1 0 0 0 Aug 20 11:22 graylog-server.log.2.gz
-rw-r----- 1 0 0 28K Aug 20 10:40 graylog-server.log.3.gz.1.gz
-rw-r----- 1 0 0 1.2G Aug 20 10:29 graylog-server.log.4.gz.1
-rw-r----- 1 0 0 861M Aug 21 08:40 graylog-server.log.4.gz.1.gz
-rw-r----- 1 0 0 212M Aug 20 10:25 graylog-server.log.5.gz
-rw-r----- 1 0 0 5.3M Aug 20 06:25 graylog-server.log.6.gz
Config:
----@----------:/var/log/upstart# vim /etc/logrotate.d/upstart
/var/log/upstart/*-server.log.*
size 3G
missingok
rotate 5
compress
notifempty
nocreate
Using logrotate
--force /etc/logrotate.d/upstart
to rotate.
logs configuration logrotate upstart
add a comment |Â
up vote
0
down vote
favorite
What's wrong with my config? I had to --force the logrotate a couple times to see changes, but the numbering is all wonky.
----@----------:/var/log/upstart# ls -Anh
total 4.0G
-rw-r----- 1 0 0 56K Aug 21 08:41 graylog-server.log
-rw-r----- 1 0 0 1.1G Aug 21 08:36 graylog-server.log.1.1.gz
-rw-r----- 1 0 0 727M Aug 21 08:35 graylog-server.log.1.gz.1.gz
-rw-r----- 1 0 0 0 Aug 20 11:22 graylog-server.log.2.gz
-rw-r----- 1 0 0 28K Aug 20 10:40 graylog-server.log.3.gz.1.gz
-rw-r----- 1 0 0 1.2G Aug 20 10:29 graylog-server.log.4.gz.1
-rw-r----- 1 0 0 861M Aug 21 08:40 graylog-server.log.4.gz.1.gz
-rw-r----- 1 0 0 212M Aug 20 10:25 graylog-server.log.5.gz
-rw-r----- 1 0 0 5.3M Aug 20 06:25 graylog-server.log.6.gz
Config:
----@----------:/var/log/upstart# vim /etc/logrotate.d/upstart
/var/log/upstart/*-server.log.*
size 3G
missingok
rotate 5
compress
notifempty
nocreate
Using logrotate
--force /etc/logrotate.d/upstart
to rotate.
logs configuration logrotate upstart
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
What's wrong with my config? I had to --force the logrotate a couple times to see changes, but the numbering is all wonky.
----@----------:/var/log/upstart# ls -Anh
total 4.0G
-rw-r----- 1 0 0 56K Aug 21 08:41 graylog-server.log
-rw-r----- 1 0 0 1.1G Aug 21 08:36 graylog-server.log.1.1.gz
-rw-r----- 1 0 0 727M Aug 21 08:35 graylog-server.log.1.gz.1.gz
-rw-r----- 1 0 0 0 Aug 20 11:22 graylog-server.log.2.gz
-rw-r----- 1 0 0 28K Aug 20 10:40 graylog-server.log.3.gz.1.gz
-rw-r----- 1 0 0 1.2G Aug 20 10:29 graylog-server.log.4.gz.1
-rw-r----- 1 0 0 861M Aug 21 08:40 graylog-server.log.4.gz.1.gz
-rw-r----- 1 0 0 212M Aug 20 10:25 graylog-server.log.5.gz
-rw-r----- 1 0 0 5.3M Aug 20 06:25 graylog-server.log.6.gz
Config:
----@----------:/var/log/upstart# vim /etc/logrotate.d/upstart
/var/log/upstart/*-server.log.*
size 3G
missingok
rotate 5
compress
notifempty
nocreate
Using logrotate
--force /etc/logrotate.d/upstart
to rotate.
logs configuration logrotate upstart
What's wrong with my config? I had to --force the logrotate a couple times to see changes, but the numbering is all wonky.
----@----------:/var/log/upstart# ls -Anh
total 4.0G
-rw-r----- 1 0 0 56K Aug 21 08:41 graylog-server.log
-rw-r----- 1 0 0 1.1G Aug 21 08:36 graylog-server.log.1.1.gz
-rw-r----- 1 0 0 727M Aug 21 08:35 graylog-server.log.1.gz.1.gz
-rw-r----- 1 0 0 0 Aug 20 11:22 graylog-server.log.2.gz
-rw-r----- 1 0 0 28K Aug 20 10:40 graylog-server.log.3.gz.1.gz
-rw-r----- 1 0 0 1.2G Aug 20 10:29 graylog-server.log.4.gz.1
-rw-r----- 1 0 0 861M Aug 21 08:40 graylog-server.log.4.gz.1.gz
-rw-r----- 1 0 0 212M Aug 20 10:25 graylog-server.log.5.gz
-rw-r----- 1 0 0 5.3M Aug 20 06:25 graylog-server.log.6.gz
Config:
----@----------:/var/log/upstart# vim /etc/logrotate.d/upstart
/var/log/upstart/*-server.log.*
size 3G
missingok
rotate 5
compress
notifempty
nocreate
Using logrotate
--force /etc/logrotate.d/upstart
to rotate.
logs configuration logrotate upstart
logs configuration logrotate upstart
asked Aug 21 at 12:50
KuboMD
225
225
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
It seems that you are log-rotating already log-rotated logs.
In your config you use /var/log/upstart/*-server.log.*
to select the files to rotate. This expression matches graylog-server.log.1
but no graylog-server.log
. So you are rotating the old rotated log files but not the current log file.
Probably you want to use /var/log/upstart/*-server.log
instead.
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that.1
. Please, check if there is any other rule in logrotate config files matching that log file.
â andcoz
Aug 21 at 16:08
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It seems that you are log-rotating already log-rotated logs.
In your config you use /var/log/upstart/*-server.log.*
to select the files to rotate. This expression matches graylog-server.log.1
but no graylog-server.log
. So you are rotating the old rotated log files but not the current log file.
Probably you want to use /var/log/upstart/*-server.log
instead.
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that.1
. Please, check if there is any other rule in logrotate config files matching that log file.
â andcoz
Aug 21 at 16:08
 |Â
show 1 more comment
up vote
1
down vote
accepted
It seems that you are log-rotating already log-rotated logs.
In your config you use /var/log/upstart/*-server.log.*
to select the files to rotate. This expression matches graylog-server.log.1
but no graylog-server.log
. So you are rotating the old rotated log files but not the current log file.
Probably you want to use /var/log/upstart/*-server.log
instead.
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that.1
. Please, check if there is any other rule in logrotate config files matching that log file.
â andcoz
Aug 21 at 16:08
 |Â
show 1 more comment
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It seems that you are log-rotating already log-rotated logs.
In your config you use /var/log/upstart/*-server.log.*
to select the files to rotate. This expression matches graylog-server.log.1
but no graylog-server.log
. So you are rotating the old rotated log files but not the current log file.
Probably you want to use /var/log/upstart/*-server.log
instead.
It seems that you are log-rotating already log-rotated logs.
In your config you use /var/log/upstart/*-server.log.*
to select the files to rotate. This expression matches graylog-server.log.1
but no graylog-server.log
. So you are rotating the old rotated log files but not the current log file.
Probably you want to use /var/log/upstart/*-server.log
instead.
answered Aug 21 at 12:59
andcoz
11.9k32938
11.9k32938
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that.1
. Please, check if there is any other rule in logrotate config files matching that log file.
â andcoz
Aug 21 at 16:08
 |Â
show 1 more comment
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that.1
. Please, check if there is any other rule in logrotate config files matching that log file.
â andcoz
Aug 21 at 16:08
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
Ok, I'll give that a try. I also wanted to ask how often the system checks for the size condition...like if it has to sit at 3GB for a couple hours before it'll rotate or if it happens instantly? edit: that does fix the file extension issue.
â KuboMD
Aug 21 at 13:56
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
@KuboMD ask this in another question.
â andcoz
Aug 21 at 14:07
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
I tried making that change to the conf and running the logrotate force again. It works the first time around, but the second time around it adds a ".1" to the end of my plaintext, uncompressed log - which means it is no longer caught by "*-server.log". Any suggestions?
â KuboMD
Aug 21 at 15:15
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
Fascinating. Did you cleaned the dir of old wrong files before you tried again?
â andcoz
Aug 21 at 16:06
There is no reason (in your config file) for that
.1
. Please, check if there is any other rule in logrotate config files matching that log file.â andcoz
Aug 21 at 16:08
There is no reason (in your config file) for that
.1
. Please, check if there is any other rule in logrotate config files matching that log file.â andcoz
Aug 21 at 16:08
 |Â
show 1 more comment
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463859%2fupstart-logrotate%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password