Re: logrotate strange argus behavior
Monah Baki <[email protected]> Fri, 26 Oct 2018 12:25:43 -0400
| Newsgroups | gmane.network.argus |
|---|---|
| Message-ID | <CALP3=x9EU0r6u5it4FXZ8c+2rTSpPoFBqHysHCDC_OWg4tOcuA@mail.gmail.com> |
--0000000000007e863a0579242c6b Content-Type: text/plain; charset="UTF-8" Thanks Eric, works perfectly. On Fri, Oct 26, 2018 at 10:19 AM Eric Kinzie <[email protected]> wrote: > On Wed Oct 24 11:55:24 -0400 2018, Eric Kinzie wrote: > > On Wed Oct 24 10:58:46 -0400 2018, Monah Baki wrote: > > > Hi Carter, > > > > > > My argus.conf has: > > > ARGUS_OUTPUT_FILE=/var/log/argus/argus.out > > > > > > I can also for testing purposes run the -w option from the command > line, > > > what do you think? > > > > > > > > > > /var/log/argus/argus.out { > > > > > missingok > > > > > notifempty > > > > > compress > > > > > size 100M > > > > > daily > > > > > create 0600 root root > > > > > } > > > > Monah, I think that if you remove the "create 0600..." line from > > the logrotate configuration, argus.out will be recreated by argus > > and new records written to it. > > > > When logrotate creates a replacement file, the logic in argus that > > checks to see if the file has been removed is effectively bypassed. > > The original file it opened is no longer visible with "ls" because > > gzip blows it away, but the file does actually still exist until > > all file descriptors that reference it have been closed; argus > > continues writing to it. > > > Removing the "create" line was not enough. I added "nocreate" and > argus created its own replacement file and started writing records > to it. See if that helps. > --0000000000007e863a0579242c6b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks Eric, works perfectly.</div><br><div class=3D"gmail= _quote"><div dir=3D"ltr">On Fri, Oct 26, 2018 at 10:19 AM Eric Kinzie <<= a href=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1= px #ccc solid;padding-left:1ex">On Wed Oct 24 11:55:24 -0400 2018, Eric Kin= zie wrote:<br> > On Wed Oct 24 10:58:46 -0400 2018, Monah Baki wrote:<br> > > Hi Carter,<br> > > <br> > > My argus.conf has:<br> > > ARGUS_OUTPUT_FILE=3D/var/log/argus/argus.out<br> > > <br> > > I can also for testing purposes run the -w option from the comman= d line,<br> > > what do you think?<br> > > <br> > <br> > > > > /var/log/argus/argus.out {<br> > > > >=C2=A0 =C2=A0 =C2=A0missingok<br> > > > >=C2=A0 =C2=A0 =C2=A0notifempty<br> > > > >=C2=A0 =C2=A0 =C2=A0compress<br> > > > >=C2=A0 =C2=A0 =C2=A0size 100M<br> > > > >=C2=A0 =C2=A0 =C2=A0daily<br> > > > >=C2=A0 =C2=A0 =C2=A0create 0600 root root<br> > > > > }<br> > <br> > Monah, I think that if you remove the "create 0600..." line = from<br> > the logrotate configuration, argus.out will be recreated by argus<br> > and new records written to it.<br> > <br> > When logrotate creates a replacement file, the logic in argus that<br> > checks to see if the file has been removed is effectively bypassed.<br= > > The original file it opened is no longer visible with "ls" b= ecause<br> > gzip blows it away, but the file does actually still exist until<br> > all file descriptors that reference it have been closed; argus<br> > continues writing to it.<br> <br> <br> Removing the "create" line was not enough.=C2=A0 I added "no= create" and<br> argus created its own replacement file and started writing records<br> to it.=C2=A0 See if that helps.<br> </blockquote></div> --0000000000007e863a0579242c6b--