Thanks Rainer.  This is clear.

> -----Original Message-----
> From: Rainer Gerhards [mailto:[email protected]]
> Sent: Friday, November 09, 2018 11:27 AM
> To: LOEWENTHAL Sophie
> Cc: Flo Rance; rsyslog-users
> Subject: Re: [rsyslog] Code verification : legacy to new format
> 
> El vie., 9 nov. 2018 a las 10:49,
> [email protected]
> (<[email protected]>) escribió:
> >
> > Hi Flo,
> >
> > https://www.rsyslog.com/doc/v8-stable/configuration/droppriv.html
> > https://www.rsyslog.com/doc/v8-
> stable/configuration/action/rsconf1_dynafilecachesize.html
> >
> > The v8 contains the $ prefixed variables. Does this mean there are no new-
> style equivalent global variables for the legacy variable?
> >
> 
> No - we need someone who updates the older parts of the doc. I do it
> whenever I have time, but that's pretty seldom.
> 
> > But I do see that these can be set individually in omfile module, but it's 
> > easy for
> me and makes more sense for me to set them globally in my case,
> > https://www.rsyslog.com/doc/v8-stable/configuration/modules/omfile.html
> 
> 
> Search for "dynafile" on that page. It shows you the old-style
> *equivalent*. And it indeed is an equivalent, the old style also
> affects the next action. And by this I notice that there seems to be a
> long-standing bug in obsolete legacy doc where it mentions "global".
> It's not, it's "action" scope. Ok, one of the times to do a doc PR
> myself - or is someone up to it?
> 
> Rainer
> > Br,
> > Sophie
> > -----------------------------------------------------
> > From: Flo Rance [mailto:[email protected]]
> > Sent: Friday, November 09, 2018 10:38 AM
> > To: rsyslog-users
> > Cc: Rainer Gerhards; LOEWENTHAL Sophie
> > Subject: Re: [rsyslog] Code verification : legacy to new format
> >
> > Hi,
> >
> > If you search on v8-stable instead of v7-stable, everything is there.
> >
> > Flo
> >
> > On Fri, Nov 9, 2018 at 10:31 AM sophie.loewenthal--- via rsyslog
> <[email protected]> wrote:
> > Is there a page that maps legacy statements to the new version?
> >
> > Why do I ask?
> > * My search on rsyslog.com for PrivDropToUser give me this link:
> > https://www.rsyslog.com/doc/v7-
> stable/search.html?q=PrivDropToUser+&check_keywords=yes&area=default
> > and clicking on the Dropping privileges in rsyslog link gave an Invalid file
> specified :(
> > https://www.rsyslog.com/doc/v7-
> stable/configuration/droppriv.rst.html?highlight=privdroptouser
> >
> > * The first page of google for Dynafilecachesize gives me this:
> > https://www.rsyslog.com/doc/v7-
> stable/configuration/action/rsconf1_dynafilecachesize.html
> >
> > > -----Original Message-----
> > > From: Rainer Gerhards [mailto:[email protected]]
> > > Sent: Friday, November 09, 2018 10:17 AM
> > > To: LOEWENTHAL Sophie
> > > Cc: rsyslog-users; David Lang
> > > Subject: Re: [rsyslog] Code verification : legacy to new format
> > >
> > > El vie., 9 nov. 2018 a las 10:07,
> > > [email protected]
> > > (<[email protected]>) escribió:
> > > >
> > > > Thanks Rainer for the details.
> > > >
> > > > Thus these statements should be replaced with something from the 'basic'
> or
> > > 'advanced' format
> > > >
> > > >  $umask 0000
> > > >  $CreateDirs on
> > > >  $fileOwner rsyslog
> > > >  $fileGroup uxadmin
> > > >  $dirGroup uxadmin
> > > >  $FileCreateMode 0660
> > > >  $DynaFileCacheSize 600
> > > >  $PrivDropToUser rsyslog
> > > >  $PrivDropToGroup rsyslog
> > >
> > >
> > > I think so. Sadly for some there may still be no new-style equivalent.
> > > We have focused on those that are critical, e.g. easy to mistake (like
> > > DynaFileCache, which means folks think to be a global statement). Some
> > > of the real global ones may not be converted yet as we never stumbled
> > > over them. If you find some, it would be great to open a github issue.
> > >
> > > Rainer
> > >
> > > >
> > > >
> > > >
> > > > Best wishes,
> > > > Sophie
> > > >
> > > > > -----Original Message-----
> > > > > From: Rainer Gerhards [mailto:[email protected]]
> > > > > Sent: Friday, November 09, 2018 9:45 AM
> > > > > To: rsyslog-users
> > > > > Cc: David Lang; LOEWENTHAL Sophie
> > > > > Subject: Re: [rsyslog] Code verification : legacy to new format
> > > > >
> > > > > https://www.rsyslog.com/doc/v8-
> stable/configuration/conf_formats.html
> > > > >
> > > > > HTH
> > > > > Rainer
> > > > > El vie., 9 nov. 2018 a las 9:30, sophie.loewenthal--- via rsyslog
> > > > > (<[email protected]>) escribió:
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: David Lang [mailto:[email protected]]
> > > > > > > Sent: Thursday, November 08, 2018 10:30 PM
> > > > > > > To: sophie.loewenthal--- via rsyslog
> > > > > > > Cc: LOEWENTHAL Sophie
> > > > > > > Subject: Re: [rsyslog] Code verification : legacy to new format
> > > > > > >
> > > > > > > On Thu, 8 Nov 2018, sophie.loewenthal--- via rsyslog wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > This seems to work for me, but  I'd be grateful if somebody 
> > > > > > > > would
> > > confirm
> > > > > this
> > > > > > > is actually correct.
> > > > > > > > Dump all nrpe messages into a file, and once done discard.
> > > > > > > >
> > > > > > > > * Legacy format
> > > > > > > > :programname, isequal, "nrpe" /app/rsyslog/messages.nrpe.all
> > > > > > > > :programname, isequal, "nrpe" &
> > > > > > > >
> > > > > > > > * New format
> > > > > > > > if ( $programname == "nrpe" ) then {
> > > > > > > >    action(type="omfile" file="/app/rsyslog/messages.nrpe.all"
> > > > > > > flushOnTXEnd="off")
> > > > > > > >    stop
> > > > > > > > }
> > > > > > >
> > > > > > > This works, but I'll point out that the following also works
> > > > > > >
> > > > > > > if ( $programname == "nrpe" ) then {
> > > > > > >     /app/rsyslog/messages.nrpe.all
> > > > > > >     stop
> > > > > > > }
> > > > > > >
> > > > > > > you don't have to switch everything to use action(), the general
> > > > > > > recommendation
> > > > > > > is taht if it's a single line in the legacy format, and it's at 
> > > > > > > least as clear
> > > > > > > as the new format, go ahead and use the legacy format.
> > > > > > >
> > > > > > > It's when you have things that are multiple lines of config in 
> > > > > > > the old
> > > format
> > > > > > > (setting lots of $foo lines and then having the line that they 
> > > > > > > affect)
> that
> > > the
> > > > > > > old format becomes confusing and you should switch to the new
> format.
> > > > > There
> > > > > > > are
> > > > > > > also new features available in the action() syntax, but if the old
> format
> > > does
> > > > > > > what you want, you aren't using the new feature :-)
> > > > > > >
> > > > > > > David Lang
> > > > > >
> > > > > > Hi David,
> > > > > > I presumed incorrectly that the legacy format was deprecated and
> would
> > > be
> > > > > obsolete later. If this is not the case, I'm happy to mix these 
> > > > > syntaces
> > > together.
> > > > > > This message and any attachments (the "message") is
> > > > > > intended solely for the intended addressees and is confidential.
> > > > > > If you receive this message in error,or are not the intended 
> > > > > > recipient(s),
> > > > > > please delete it and any copies from your systems and immediately
> notify
> > > > > > the sender. Any unauthorized view, use that does not comply with its
> > > purpose,
> > > > > > dissemination or disclosure, either whole or partial, is 
> > > > > > prohibited. Since
> the
> > > > > internet
> > > > > > cannot guarantee the integrity of this message which may not be
> reliable,
> > > BNP
> > > > > PARIBAS
> > > > > > (and its subsidiaries) shall not be liable for the message if 
> > > > > > modified,
> > > changed or
> > > > > falsified.
> > > > > > Do not print this message unless it is necessary, consider the
> environment.
> > > > > >
> > > > > > ---------------------------------------------------------------------------------------
> ----
> > > ----
> > > > > -----------------------------------
> > > > > >
> > > > > > Ce message et toutes les pieces jointes (ci-apres le "message")
> > > > > > sont etablis a l'intention exclusive de ses destinataires et sont
> confidentiels.
> > > > > > Si vous recevez ce message par erreur ou s'il ne vous est pas 
> > > > > > destine,
> > > > > > merci de le detruire ainsi que toute copie de votre systeme et d'en
> avertir
> > > > > > immediatement l'expediteur. Toute lecture non autorisee, toute
> utilisation
> > > de
> > > > > > ce message qui n'est pas conforme a sa destination, toute diffusion 
> > > > > > ou
> > > toute
> > > > > > publication, totale ou partielle, est interdite. L'Internet ne 
> > > > > > permettant
> pas
> > > > > d'assurer
> > > > > > l'integrite de ce message electronique susceptible d'alteration, BNP
> Paribas
> > > > > > (et ses filiales) decline(nt) toute responsabilite au titre de ce 
> > > > > > message
> dans
> > > > > l'hypothese
> > > > > > ou il aurait ete modifie, deforme ou falsifie.
> > > > > > N'imprimez ce message que si necessaire, pensez a l'environnement.
> > > > > >
> > > > > > _______________________________________________
> > > > > > rsyslog mailing list
> > > > > > http://lists.adiscon.net/mailman/listinfo/rsyslog
> > > > > > http://www.rsyslog.com/professional-services/
> > > > > > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > > > > > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
> myriad
> > > of
> > > > > sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> > > DON'T
> > > > > LIKE THAT.
> > _______________________________________________
> > rsyslog mailing list
> > http://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
> LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to