Ask questions. Get answers. Find technical product solutions from passionate experts in the NXLog community.

Code error in line where there is no code
When I use xm_perl with this code from /usr/libexec/nxlog/modules/extension/perl/event1.pl: use Log::Nxlog; use strict; use warnings; use feature 'say'; use JSON; use utf8; sub rec2msg { my $msgsrcaddr = Log::Nxlog::get_field($event, 'MessageSourceAddress'); if ( defined($msgsrcaddr) ) { Log::Nxlog::set_field_string($event, 'MessageSourceCountry', "France"); } } It gives me strange error: syntax error at /usr/libexec/nxlog/modules/extension/perl/event1.pl line 16, at EOF However , there is no code at line 16 at all. What does that mean? It happens when I use any perl code.

EZ created
Replies: 1
View post »
last updated
How could I pass output of to_json() from nxlog.conf to perl file?
Hi, I have this type of input in nxlog.conf: <Input udp> Module im_udp Host 0.0.0.0 Port 514 Exec parse_syslog(); to_json(); perl_call("process"); </Input> My question is, how should I include that JSON output that I get from to_json() to my perl code? Should I write like this?: my ( $event ) = @_; Or it's only the output of parse_syslog_bsd() (as in example for xm_perl https://nxlog.co/documentation/nxlog-user-guide/xm_perl.html)? More generally, my question is how to include JSON output that i get from to_json() to perl code of xm_perl module?

EZ created
Replies: 1
View post »
last updated
xm_perl.dll is not present in extension directory
I am trying to use the perl extension in Windows, but nxlog complains that it cannot find the xm_perl.dll. The complaint is correct, the file is not there. My question is why? Does the windows version not support using perl?

MagnusBjarnlid created
Replies: 1
View post »
last updated