Hallo,

I'm a new to nxlog. I've tried to search an archive but I didn't find  
similar topic.
I installed nxlog 2.6.1131 on Windows 2003 Srv and tried to prepare exec  
script for sorting logs to different files.
While this one works:

<Output out_multiple>
     Module      om_file

     exec if ($MessageSourceAddress == "192.168.1.1") \
          { \
             if ($Message =~ /id=03203/ or $Message =~ /id=03700/) \
             { \
                 $dst = "remotelogin.txt"; \
             } \
             else \
               $dst = "rest.txt"; \
          } else if ($MessageSourceAddress == "192.168.1.2") \
              $dst = "mainswitch.txt"; \
          else \
            $dst = "multiple-rest.txt";

     File        $dst
</Output>


This one:

<Output out_multiple>
     Module      om_file

     exec if ($MessageSourceAddress == "192.168.1.1") \
          { \
             if ($Message =~ /id=03203/ or $Message =~ /id=03700/) \
             { \
                 $dst = "remotelogin.txt"; \
             } \
             else if ($Message =~ /121.121.125.1/) \
             { \
                 $dst = "fromto-office"; \
             } \
             else if ($Message =~ /121.121.125.2/) \
             { \
                 $dst = "fromto-ftpserver"; \
             } \
             else \
               $dst = "rest.txt"; \
          } else if ($MessageSourceAddress == "192.168.1.2") \
              $dst = "mainswitch.txt"; \
          else \
            $dst = "multiple-rest.txt";

     File        $dst
</Output>


generates a following error in nxlog's log:

2013-12-14 12:46:12 ERROR module 'out_multiple' has configuration errors,  
not adding to route 'from_udp' at C:\Program Files\nxlog\conf\nxlog.conf:69
2013-12-14 12:46:12 ERROR route from_udp is not functional without output  
modules, ignored at C:\Program Files\nxlog\conf\nxlog.conf:69
2013-12-14 12:46:12 WARNING not starting unused module im_udp
2013-12-14 12:46:12 WARNING not starting unused module out_multiple
2013-12-14 12:46:12 INFO nxlog-ce-2.6.1131 started


It seems that EXEC statement is limited in length and the allowed length  
is quite small.
Is there any simple way to overcome it or any other elegant way to make  
filtering and sorting logs to different files?


-- 
BR
Bartosz.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to