Re: [syslog-ng] create_dir and "dynamic" destinations.
I would check doing a manual mkdir -p </some/long/path> as the user specified in the config. Then try as root if different. Also look at how that file system is mounted. Is it local disk or NFS ? NFS treats root differently. Also I have seen the permissions of the underlying mount point also cause problems. That is rwxr-x--- for the directory on which the NFS is mounted can cause problems for the mounted filesystem. And you won't see it unless you unmount the NFS piece. Anyway that's what I can think of right off. Jim Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: "AVELING, BEN (BEN)" <ben.aveling@alcatel-lucent.com> Date:08/21/2014 6:33 PM (GMT-05:00) To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Cc: Subject: Re: [syslog-ng] create_dir and "dynamic" destinations. Permissions problem? Is anything reported in syslog-ng’s own logs? Regards, Ben From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Renato Bezerra Sent: Friday, 22 August 2014 05:51 To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] create_dir and "dynamic" destinations. I use this same config and work very well. Em 21/08/2014 16:44, "Balazs Scheidler" <bazsi77@gmail.com> escreveu: Hmm it should create the entire path. On Aug 20, 2014 5:16 PM, "Scot Needy" <scotrn@gmail.com> wrote: Yes, I have the create-dies() option enabled but that does not seem to work for upper level directories. Example: Only works if the 192_168_9_0 directory is pre-created. destination d_192_168_9_0 { file(/opt/syslog-ng/logs/192_168_9_0/$YEAR/$MONTH/$DAY/$HOST.log);}; On Aug 20, 2014, at 7:24 AM, Fabien Wernli <wernli@in2p3.fr> wrote:
Hi Scot,
You have the `create-dirs()` option for that:
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.5-guide...
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
Hey Scot, Have your read the FAQ? http://campin.net/syslog-ng/faq.html There's a relevant section to what you were asking to achieve, just search for " *Directories with names like "Error", "SCSI", "", are showing up in the directory that holds the syslogs for the different hosts that we monitor. * " I know the title doesn't seem relevant but the response in that sections is what I used to setup exactly what you were asking, hope that helps. On Thu, Aug 21, 2014 at 6:08 PM, Jim Hendrick <jrhendri@roadrunner.com> wrote:
I would check doing a manual mkdir -p </some/long/path> as the user specified in the config. Then try as root if different. Also look at how that file system is mounted. Is it local disk or NFS ? NFS treats root differently. Also I have seen the permissions of the underlying mount point also cause problems. That is rwxr-x--- for the directory on which the NFS is mounted can cause problems for the mounted filesystem. And you won't see it unless you unmount the NFS piece. Anyway that's what I can think of right off. Jim
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message -------- From: "AVELING, BEN (BEN)" <ben.aveling@alcatel-lucent.com> Date:08/21/2014 6:33 PM (GMT-05:00) To: Syslog-ng users' and developers' mailing list < syslog-ng@lists.balabit.hu> Cc: Subject: Re: [syslog-ng] create_dir and "dynamic" destinations.
Permissions problem? Is anything reported in syslog-ng’s own logs?
Regards, Ben
*From:* syslog-ng-bounces@lists.balabit.hu [mailto: syslog-ng-bounces@lists.balabit.hu] *On Behalf Of *Renato Bezerra *Sent:* Friday, 22 August 2014 05:51 *To:* Syslog-ng users' and developers' mailing list *Subject:* Re: [syslog-ng] create_dir and "dynamic" destinations.
I use this same config and work very well.
Em 21/08/2014 16:44, "Balazs Scheidler" <bazsi77@gmail.com> escreveu:
Hmm it should create the entire path.
On Aug 20, 2014 5:16 PM, "Scot Needy" <scotrn@gmail.com> wrote:
Yes, I have the create-dies() option enabled but that does not seem to work for upper level directories.
Example:
Only works if the 192_168_9_0 directory is pre-created. destination d_192_168_9_0 { file(/opt/syslog-ng/logs/192_168_9_0/$YEAR/$MONTH/$DAY/$HOST.log);};
On Aug 20, 2014, at 7:24 AM, Fabien Wernli <wernli@in2p3.fr> wrote:
Hi Scot,
You have the `create-dirs()` option for that:
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.5-guide...
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- *Nullius In Verba*
This was dumb user error. I'm glad to report the create_dir function works as expected. Sent from my iPad
On Aug 21, 2014, at 9:08 PM, Jim Hendrick <jrhendri@roadrunner.com> wrote:
I would check doing a manual mkdir -p </some/long/path> as the user specified in the config. Then try as root if different. Also look at how that file system is mounted. Is it local disk or NFS ? NFS treats root differently. Also I have seen the permissions of the underlying mount point also cause problems. That is rwxr-x--- for the directory on which the NFS is mounted can cause problems for the mounted filesystem. And you won't see it unless you unmount the NFS piece. Anyway that's what I can think of right off. Jim
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message -------- From: "AVELING, BEN (BEN)" <ben.aveling@alcatel-lucent.com> Date:08/21/2014 6:33 PM (GMT-05:00) To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Cc: Subject: Re: [syslog-ng] create_dir and "dynamic" destinations.
Permissions problem? Is anything reported in syslog-ng’s own logs?
Regards, Ben
From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Renato Bezerra Sent: Friday, 22 August 2014 05:51 To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] create_dir and "dynamic" destinations.
I use this same config and work very well.
Em 21/08/2014 16:44, "Balazs Scheidler" <bazsi77@gmail.com> escreveu:
Hmm it should create the entire path.
On Aug 20, 2014 5:16 PM, "Scot Needy" <scotrn@gmail.com> wrote:
Yes, I have the create-dies() option enabled but that does not seem to work for upper level directories.
Example:
Only works if the 192_168_9_0 directory is pre-created. destination d_192_168_9_0 { file(/opt/syslog-ng/logs/192_168_9_0/$YEAR/$MONTH/$DAY/$HOST.log);};
On Aug 20, 2014, at 7:24 AM, Fabien Wernli <wernli@in2p3.fr> wrote:
Hi Scot,
You have the `create-dirs()` option for that:
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.5-guide...
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
participants (3)
-
Jim Hendrick
-
Scot
-
VMI X