Upstart Logrotate?

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question

























    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.










    share|improve this question























      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.










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 21 at 12:50









      KuboMD

      225




      225




















          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.






          share|improve this answer




















          • 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










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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






























          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.






          share|improve this answer




















          • 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














          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.






          share|improve this answer




















          • 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












          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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
















          • 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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?