Is there a way to state a headerline to be blank while using multiline module? My data shows as:
data
data
(blank)
data
data
(blank)
Thanks
Deleted user created
I've been using NXLOG for quite some time now all of a sudden on server 2016 it's not working. Please provide the necessary config for server 2016 as im_msvistalog is returning errors:
<11>Mar 23 10:33:28 onsitephysio-welsh MSWinEventLog 4 N/A N/A Fri Mar 23 10:33:28 2018 N/A nxlog-ce N/A N/A N/A onsitephysio-welsh N/A EvtNext failed with error 13: The data is invalid. N/A <11>Mar 23 10:33:28 onsitephysio-welsh MSWinEventLog 4 N/A N/A Fri Mar 23 10:33:28 2018 N/A nxlog-ce N/A N/A N/A onsitephysio-welsh N/A ### ASSERTION FAILED at line 319 in im_msvistalog.c/im_msvistalog_event_to_logdata(): "event != NULL" ### N/A
dbreise created
Hello,
I'm new to nxlog and tries to integrate it with GrayLog. It's working fine but to filter data from certain Windows Event Logs into a separate stream in GrayLog I need to insert the Channel value (available in im_msvistalog) into the message text. How can this be done?
Mats-Ove
matsovef created
Does anyone know how to do bit-wise arithmetic in NxLog? I am attempt to decode New and Old UAC Values from the Windows message id 4720. For example, the Old UAC Value is 0x1 and the New UAC Value is 0x21.
michaelkendall created
I have nxlog configured to capture syslog messages and write them to a file and all is fine but now I would like the ability to parse for a specific string in the syslog message being received and then write those syslog messages to a separate file (nxdomain.log). For example, when receiving syslog messages that contain the string "NXDOMAIN", I want to then write that specific syslog message to a separate file just for those cases so I can track those specific messages and not have to later parse the daily log (log.txt) file.
How would I modify this configuration file to do just that?
define ROOT /usr/bin define FILENAME /logs/log.txt
Moduledir /usr/libexec/nxlog/modules CacheDir %ROOT%/data Pidfile %ROOT%/data/nxlog.pid SpoolDir /var/spool/nxlog LogFile /var/log/nxlog/nxlog.log LogLevel INFO
<Extension xm_exec> Module xm_exec </Extension>
<Extension xm_fileop> Module xm_fileop </Extension>
<Extension syslog> Module xm_syslog </Extension>
<Input in> Module im_tcp Host 0.0.0.0 Port 514 Exec parse_syslog_bsd() ; </Input>
<Output out>
Module om_file
File "%FILENAME%"
<Schedule>
When @daily
Exec file_rename ("%FILENAME%","%FILENAME%"+'.'+strftime(now(),"%Y%m%d"));
out->reopen();
</Schedule>
</Output>
<Route 1> Path in => out
bluelotus created
I want to use source_code to product a msi package for windows. I run ./pkgmsi.sh , It's error ./pkgmsi.sh: line 1: c:\Program Files (x86)\Windows Installer XML v3.5\bin\candle.exe: command not found How can I package msi correctly??? if you help me, I will be grateful for you.
caibaoying created
Hello
I'm using "NXLog CE" for send a file by syslog. So far I got this:
<Input filezilla>
Module im_file
File "C:\\Program Files (x86)\\FileZilla Server\\Logs\\fzs-*.log"
SavePos TRUE
Exec $Message = '%FileZilla: ' + $raw_event;
</Input>
<Output outfiles>
Module om_tcp
Host 10.226.6.210
Port 514
Exec to_syslog_bsd();
</Output>
The file has lines like "(125419) 13/03/2018 12:32:59 - prtg (10.4.171.245)> QUIT" I want to get (on my syslog sever) "%FileZilla: (125419) 13/03/2018 12:32:59 - prtg (10.4.171.245)> QUIT" Instead, I got: "Mar 13 12:33:00 DSCRESJ %FileZilla: (125419) 13/03/2018 12:32:59 - prtg (10.4.171.245)> QUIT"
I think the "Mar 13 12:33:00 DSCRESJ" part is the header from to_syslog_bsd(). Anyway, I wonder If there a way to remove that header.
Regards.
_omar_ created
I am trying to evaluate om_kafka module on RHEL system.
It starts ok and sends some messages from files to kafka but after a while these messages appear:
2018-03-13 14:52:52 ERROR Unable to produce message 2018-03-13 14:52:55 ERROR last message repeated 183044 times
Sometimes it can be fixed with NXLog service restart, while others not.
nxlog-3.99.3332_RHEL7_x86_64_trial Any suggestion?
bourazaniss created
Hello there,
I'm using NXLOG Community Edition, and I want to inquire about how can I just forward the events log from Windows OS without modified the original log's contents. Because, the NXLOG extracted the fields from any message. So, is there a way to avoid the extraction?
Thanks and Regard.
mammari created
Hello all,
I'm trying out NXLog to do some basic log file rotation. I'm just looking for it to rotate a specifed log file when it gets past 100K. For a PoC I've set up my nxlog.conf as follows, but no logs are ever rotated nor do any of the log_info calls ever get into the nxlog.log. Can someone help me with what I'm trying to accomplish? Thanks.
define TESTLOG 'C:\Logs\testlog.log' <Extension fileop> Module xm_fileop </Extension>
<Input logrotatein> Module im_file File "%TESTLOG%" </Input>
<Output logrotateout> Module om_file File %TESTLOG%
<Schedule>
Every 30 seconds
log_info('I am doing something');
Exec if (file_size('%TESTLOG%') >= 100K)
{
log_info('I am rotating');
file_cycle('%TESTLOG%',500);
logrotate->reopen();
}
</Schedule>
</Output>
<Route 1> Path logrotatein => logrotateout </Route>
mdemougin created
tail -f nxlog
INFO input file '/kafka/logs/s3/s3sinkfirewall.log' was truncated,
restarting from the beginning
INFO input file '/kafka/logs/s3/s3sinkfirewall.log' was truncated,
restarting from the beginning
INFO input file '/kafka/logs/s3/s3sinkfirewall.log' was truncated,
restarting from the beginning
Attached my config file:
## This is a sample configuration file. See the nxlog reference manual about
the
## configuration options. It should be installed locally under
## /usr/share/doc/nxlog-ce/ and is also available online at
## http://nxlog.org/docs
########################################
# Global directives #
########################################
User nxlog
Group nxlog
LogFile /var/log/nxlog/nxlog.log
LogLevel INFO
# Machine Specific Variables
define CurrentHost kafkavm5
define HeadNxPort 8084
# Common Functions/Variables
include
/kafka/connectors/consumers/MonitorScripts/nxLogConf/nxlogCommon.conf
<Route S3consumer>
Path s3consumerlogs => nxlog_dailys3consumerlogs
</Route>
Also adding nxLogCommon.conf:
<Input s3consumerlogs>
Module im_file
File "%Consumers3Logs%/s3sinkfirewall.log"
SavePos TRUE
ReadFromLast TRUE
<Schedule>
# Check processes every 5 min
Every 30 sec
Exec exec_async("%ScriptPath%/CheckProcesses.py","%Email%","%ConsumerSplunkLogs%");
</Schedule>
<Schedule>
# Remove logs daily
When @daily
<Exec>
file_remove("%DailyLogPrefix%*");
</Exec>
</Schedule>
<Exec>
#$Message = $raw_event;
$Message = substr($raw_event, 0, 1000);
$SourceFile = file_name();
$SourceHost = "%CurrentHost%";
to_json();
</Exec>
I can add if anything else is required.
Pavan_Obj created
Hello,
I am working on shipping snort logs to an Elastic stack environment. I have found this https://nxlog.co/documentation/nxlog-user-guide.pdf but unfortunately it doesn't seem to help me. It all looks promising on the pdf, but the output does not look like what it shows at the end there. Instead, all of the logs are processed and shipped one line at a time, and as mentioned in that pdf, that is not helpful in this case.
I am using the linux version of the Community Edition and here are sample files:
/var/log/snort/alert:
[] [1:1000001:1] I saw mommy kissing Santa Clause [] [Classification: Generic ICMP event] [Priority: 3] 03/09-15:47:56.187476 src -> dest ICMP TTL:124 TOS:0x0 ID:16888 IpLen:20 DgmLen:60 Type:8 Code:0 ID:1 Seq:60 ECHO
[] [1:1000001:1] I saw mommy kissing Santa Clause [] [Classification: Generic ICMP event] [Priority: 3] 03/09-15:47:56.187583 src -> dst ICMP TTL:64 TOS:0x0 ID:62815 IpLen:20 DgmLen:60 Type:0 Code:0 ID:1 Seq:60 ECHO REPLY
/etc/nxlog.conf:
<Extension snort> Module xm_multiline HeaderLine /^[**] [\S+] (.*) [**]/ Exec if $raw_event =~ /^\s+$/ drop(); </Extension>
<Extension _json> Module xm_json </Extension>
<Input in> Module im_file File "/var/log/snort/alert" InputType snort SavePos FALSE ReadFromLast FALSE <Exec> if $raw_event =~ /(?x)^[**]\ [\S+]\ (.*)\ [**]\s+ (?:[Classification:\ ([^]]+)]\ )? [Priority:\ (\d+)]\s+ (\d\d).(\d\d)-(\d\d:\d\d:\d\d.\d+) \ (\d+.\d+.\d+.\d+):?(\d+)?\ -> \ (\d+.\d+.\d+.\d+):?(\d+)?\s+\ /
{
$EventName = $1;
$Classification = $2;
$Priority = $3;
$EventTime = parsedate(year(now()) + "-" + $4 + "-" + $5 + " " + $6);
$SourceIPAddress = $7;
$SourcePort = $8;
$DestinationIPAddress = $9;
$DestinationPort = $10;
}
</Exec>
</Input>
<Output out> Module om_file File "/root/nxlog/snort"
Exec to_json();
This had to be commented out or all the log entries looked like this...{"EventReceivedTime":"2018-03-09 16:14:21","SourceModuleName":"in","SourceModuleType":"im_file"}
</Output>
<Route> Path in => out </Route>
but the output in /root/nxlog/snort looks just like it did when it went in. there is no separation of any of the data and everything is on the sames lines as it went in. Nothing is in quotes like in the example.
Any help would be great. Thanks!
Deleted user created
gogi100 created
gogi100 created
<Input Result_Log> Module im_file File "C:\xxx\Result*.log" SavePos TRUE </Input>
above is my nxlog input config.
Result-3156.log is my log file name and 3156 is pid.
The log file will rotate when it reaches the max size and generate Result-3156.log.1 file.
I find some logs loss at the bottom of Result-123.log.1
And nxlog's log shows "2018-03-01 20:48:02 INFO inode changed for 'C:\xxx\Result-3156.log' (25746->25799): reopening possibly rotated file" at the same time point.
I suspect this is caused by the monitor interval 1 second.
Is it a bug ? or nxlog can not guarantee this scenario ? or something can do to avoid it ?
SamRui created
i have a log with format time, date, description. how i can exclude time and date from $raw_event. i just need field description?
gogi100 created
JenaHalo created
hi, i newbie on nxlog. i need help how convert common log format (apache) to syslog and send to log server (KiwiSyslog server) windows
gogi100 created
Hello,
I can send the event log from Server 2012 with the same configuration, but it is not running on Server 2016. The event log does not go to Graylog. Does NXLog not work on Server 2016? If so, what is the appropriate nxlog.conf?
Thanks.
uptimeexpert created
I have about 3 days of experience with NXLog and what I am attempting to do is pull Cisco Umbrella Logs via an s3fs mount, unzip them and then read the logs using nxlog.
I am still working out the specifics of how to get all the logs unzipped and into one working file but my test file is failing to be read and sent to the syslog server.
I have taken a new nxlog.conf and set it up with the following:
########################################
# Global directives #
########################################
User nxlog
Group nxlog
LogFile /var/log/nxlog/nxlog.log
LogLevel INFO
########################################
# Modules #
########################################
<Extension csv>
Module xm_csv
</Extension>
<Input in>
Module im_file
File "/tmp/incoming.csv"
</Input>
<Output out>
Module om_udp
Host 10.x.x.x
Port 10514
Exec to_syslog_bsd();
</Output>
########################################
# Routes #
########################################
<Route 1>
Path in => out
</Route>
My nxlog.log file shows no issues with the connection or service but I am not getting any data from my test file.
Has anyone been able to do this or can you provide guidance on why I am not getting any data to transfer using my current setup?
schrammbo created