________________________________ Gönderen: Bekir Niyaz <bagaf...@hotmail.com> Gönderildi: 26 Ağustos 2020 Çarşamba 10:53 Kime: nxlog-ce-users@lists.sourceforge.net <nxlog-ce-users@lists.sourceforge.net> Konu: Nothing Written to Output File
Hi all, I'm trying this sample but nothing in output file. What I'm doing wrong ? https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html#im_file Example 63. Parsing DICOM Logs the full path input file /var/lib/nxlog/modules/extension/multiline/xm_multiline4.in why in configuration input file using double quotes when output file single quotes "modules/extension/multiline/xm_multiline4.in" 'tmp/output' Nxlog version: nxlog-ce-2.10.2150 Os: CentOS 7 Example 63. Parsing DICOM Logs Each log message has a header (TIMESTAMP INTEGER SEVERITY) which is used as the message boundary. A regular expression is defined for this with the HeaderLine<https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html#xm_multiline_config_headerline> directive. Each log message is prepended with an additional line containing dashes and is written to a file. nxlog.conf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <Extension dicom_multi> Module xm_multiline HeaderLine /^\d\d\d\d-\d\d-\d\d\d\d:\d\d:\d\d\.\d+\s+\d+\s+\S+\s+/ </Extension> <Input filein> Module im_file File "modules/extension/multiline/xm_multiline4.in" InputType dicom_multi </Input> <Output fileout> Module om_file File 'tmp/output' Exec $raw_event = "--------------------------------------\n" + $raw_event; </Output> <Route parse_dicom> Path filein => fileout </Route> Input Sample 2011-12-1512:22:51.000000 4296 INFO Association Request Parameters: Our Implementation Class UID: 2.16.124.113543.6021.2 Our Implementation Version Name: RZDCX_2_0_1_8 Their Implementation Class UID: Their Implementation Version Name: Application Context Name: 1.2.840.10008.3.1.1.1 Requested Extended Negotiation: none Accepted Extended Negotiation: none 2011-12-1512:22:51.000000 4296 DEBUG Constructing Associate RQ PDU 2011-12-1512:22:51.000000 4296 DEBUG WriteToConnection, length: 310, bytes written: 310, loop no: 1 2011-12-1512:22:51.015000 4296 DEBUG PDU Type: Associate Accept, PDU Length: 216 + 6 bytes PDU header 02 00 00 00 00 d8 00 01 00 00 50 41 43 53 20 20 20 20 20 20 20 20 20 20 20 20 52 5a 44 43 58 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00 2011-12-1512:22:51.031000 4296 DEBUG DIMSE sendDcmDataset: sending 146 bytes Output Sample -------------------------------------- 2011-12-1512:22:51.000000 4296 INFO Association Request Parameters: Our Implementation Class UID: 2.16.124.113543.6021.2 Our Implementation Version Name: RZDCX_2_0_1_8 Their Implementation Class UID: Their Implementation Version Name: Application Context Name: 1.2.840.10008.3.1.1.1 Requested Extended Negotiation: none Accepted Extended Negotiation: none -------------------------------------- 2011-12-1512:22:51.000000 4296 DEBUG Constructing Associate RQ PDU -------------------------------------- 2011-12-1512:22:51.000000 4296 DEBUG WriteToConnection, length: 310, bytes written: 310, loop no: 1 -------------------------------------- 2011-12-1512:22:51.015000 4296 DEBUG PDU Type: Associate Accept, PDU Length: 216 + 6 bytes PDU header 02 00 00 00 00 d8 00 01 00 00 50 41 43 53 20 20 20 20 20 20 20 20 20 20 20 20 52 5a 44 43 58 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00 -------------------------------------- 2011-12-1512:22:51.031000 4296 DEBUG DIMSE sendDcmDataset: sending 146 bytes this is the log [root@localhost multiline]# nxlog -c /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG reading config cache from /var/spool/nxlog/configcache.dat 2020-08-26 03:16:58 DEBUG read config cache item: filein/modules/extension/multiline/xm_multiline4.in=0 2020-08-26 03:16:58 DEBUG Setting up module 'dicom_multi' using xm_multiline 2020-08-26 03:16:58 DEBUG Setting up module 'filein' using im_file 2020-08-26 03:16:58 DEBUG module filein has 1 exported functions 2020-08-26 03:16:58 DEBUG registering function file_name 2020-08-26 03:16:58 DEBUG function 'file_name' registered 2020-08-26 03:16:58 DEBUG module filein has 0 exported procedures 2020-08-26 03:16:58 DEBUG FlowControl enabled for filein 2020-08-26 03:16:58 DEBUG Setting up module 'fileout' using om_file 2020-08-26 03:16:58 DEBUG module fileout has 2 exported functions 2020-08-26 03:16:58 DEBUG registering function file_name 2020-08-26 03:16:58 DEBUG function 'file_name' registered 2020-08-26 03:16:58 DEBUG registering function file_size 2020-08-26 03:16:58 DEBUG function 'file_size' registered 2020-08-26 03:16:58 DEBUG module fileout has 2 exported procedures 2020-08-26 03:16:58 DEBUG registering procedure rotate_to 2020-08-26 03:16:58 DEBUG procedure 'rotate_to' registered 2020-08-26 03:16:58 DEBUG registering procedure reopen 2020-08-26 03:16:58 DEBUG procedure 'reopen' registered 2020-08-26 03:16:58 DEBUG CONFIG: dicom_multi 2020-08-26 03:16:58 DEBUG inputreader 'dicom_multi' registered 2020-08-26 03:16:58 DEBUG Inputreader 'dicom_multi' registered 2020-08-26 03:16:58 DEBUG CONFIG: filein 2020-08-26 03:16:58 DEBUG adding string [modules/extension/multiline/xm_multiline4.in] 2020-08-26 03:16:58 DEBUG string literal declared at line 11, character 66 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG literal 2020-08-26 03:16:58 DEBUG parsed expression 2020-08-26 03:16:58 DEBUG CONFIG: fileout 2020-08-26 03:16:58 DEBUG adding string [tmp/output] 2020-08-26 03:16:58 DEBUG string literal declared at line 17, character 32 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG literal 2020-08-26 03:16:58 DEBUG parsed expression 2020-08-26 03:16:58 DEBUG nx_expr_new_field: raw_event 2020-08-26 03:16:58 DEBUG field declared at line 18, character 22 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG left_value expr 2020-08-26 03:16:58 DEBUG adding string [--------------------------------------\n] 2020-08-26 03:16:58 DEBUG string literal declared at line 18, character 67 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG literal 2020-08-26 03:16:58 DEBUG nx_expr_new_field: raw_event 2020-08-26 03:16:58 DEBUG field declared at line 18, character 80 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG binary operation declared at line 18, character 81 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG assignment declared at line 18, character 81 in /etc/nxlog.conf 2020-08-26 03:16:58 DEBUG assignment: left_value = expr 2020-08-26 03:16:58 DEBUG statement: assignment 2020-08-26 03:16:58 DEBUG finished parsing statements 2020-08-26 03:16:58 DEBUG pidfile /var/run/nxlog/nxlog.pid removed 2020-08-26 03:16:58 DEBUG daemonizing... Best Regards
_______________________________________________ nxlog-ce-users mailing list nxlog-ce-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users