Hi,

As the error massage indicates, you do not have a module instance called out 
defined. You probably need to write logs_out->reopen(); instead of 
out->reopen();

Regards,

Natanel Savion
Software Engineer
natan...@algotec.co.il<mailto:natan...@algotec.co.il>
+972-9-7625682
+972-54-6388735
Algotec Systems Ltd.
A Carestream Health Co.



From: Paul Fontenot [mailto:ssdv6...@gmail.com]
Sent: Friday, July 11, 2014 7:09 PM
To: nxlog-ce-users@lists.sourceforge.net
Subject: [nxlog-ce-users] Schedule and log rotation question

Hi, I'm implementing log rotation in an output block and I'm running into 
issues. While using the following configuration I receive an error. When I 
comment out the Schedule block I receive no error.

Configuration
----------------------------------------------------------------------------
#
# Defined
define  LOGDIR   /mnt/raid0/nxlog
define  NXLOG    /mnt/raid0/nxlog/nxlog.log
define  MESSAGES /mnt/raid0/nxlog/messages.log
#
# File Operations module
<Extension _fileop>
        Module  xm_fileop
</Extension>
#
# Syslog module
<Extension _syslog>
        Module  xm_syslog
</Extension>
#
# kernel stuff
<Input kern_in>
        Module  im_kernel
        Exec    parse_syslog_bsd();
</Input>
<Input uds_in>
        Module  im_uds
        uds     /dev/log
        Exec    parse_syslog_bsd();
</Input>
#
# Processor modules
<Processor patterns>
        Module  pm_pattern
        PatternFile     /etc/nxlog.d/patterndb.xml
</Processor>
#
# Outputs
<Output logs_out>
        Module  om_file
        #Exec   if $raw_event =~ /REJECTED/ { \
        #               $dst = "iptables"; \
        #       } \
        #       else $dst = "messages";
        Exec    to_syslog_bsd();
        File    "%MESSAGES%"
        <Schedule>
                When    @daily
                Exec    file_rename("%MESSAGES", "%MESSAGES" + '.' + 
strftime(now(), "%Y%m%d%H%M%S")); \
                        out->reopen();
        </Schedule>
</Output>
#
# Everything else
<Route logs_route>
        Path    kern_in,uds_in => patterns => logs_out
</Route>

----------------------------------------------------------------------------

Error
----------------------------------------------------------------------------
2014-07-11 09:07:54 ERROR Couldn't parse Exec block at 
/etc/nxlog.d/01-local.conf:46;couldn't parse statement at line 46, character 
101 in /etc/nxlog.d/01-local.conf;module out not found
2014-07-11 09:07:54 WARNING already running as uid 0
2014-07-11 09:07:54 ERROR module 'logs_out' has configuration errors, not 
adding to route 'logs_route' at /etc/nxlog.d/01-local.conf:52
2014-07-11 09:07:54 ERROR route logs_route is not functional without output 
modules, ignored at /etc/nxlog.d/01-local.conf:52
2014-07-11 09:07:54 WARNING no routes defined!
2014-07-11 09:07:54 WARNING not starting unused module kern_in
2014-07-11 09:07:54 WARNING not starting unused module uds_in
2014-07-11 09:07:54 WARNING not starting unused module patterns
2014-07-11 09:07:54 WARNING not starting unused module logs_out
2014-07-11 09:07:54 INFO nxlog-ce-2.7.1189 started


------------------------------------------------------------------------------
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to