I am looking into the possibility of being able to be notified if nxlog cannot output to redis. Has anyone managed to setup anything that writes to redis and if it cannot it sends an email.
peterc created
Hi,
I encountered the following error suddenly in Nxlog:
ERROR ### ASSERTION FAILED at line 74 in om_http.c/om_http_timeout_event(): "modconf->timeout_event == NULL"
I have an INPUT that reads from multiple files and then send to an output, on_http, which makes a request to an ElasticSearch instance.
Do you have more details on what can cause this error?
alexandru.enciu created
This is so strange, I was looking at the previous questions regarding the type of failure and we're seeing it too, but not related to IIS logs but ftp logs. Here I'll include a sample of the logs and part of the config.
2018-07-25 12:42:02 ERROR if-else failed at line 449, character 236 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; procedure 'parse_csv' failed at line 449, character 90 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; Not enough fields in CSV input, expected 12, got 1 in input 'java.lang.NullPointerException' 2018-07-25 12:42:02 ERROR if-else failed at line 449, character 236 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; procedure 'parse_csv' failed at line 449, character 90 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; Not enough fields in CSV input, expected 12, got 8 in input '20180725 12:42:01 ERROR Exception Caught in channel 1189859467: ' 2018-07-25 12:42:02 ERROR if-else failed at line 449, character 236 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; procedure 'parse_csv' failed at line 449, character 90 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; Not enough fields in CSV input, expected 12, got 5 in input 'java.net.ConnectException: Connection refused: connect: /xx.xx.xx.xx:22'
Windows FTP events log:
<Input FTP_Logs> Module im_file File "D:\GAMFT\logs\goanywhere_*" SavePos TRUE
Exec if $raw_event =~/^#|(\s+at\s+)/ drop();\
else\
{\
w3c_ftp->parse_csv();\
$EventTime = parsedate($date + " " + $time);\
$SourceName = "WINFTP";\
$raw_event = to_json();\
}
the config looks right too me. Suggestions?
nicholasG created
Hello,
I currently am sending ms eventlogs from a server to our syslog server, and this is working fine. So I wanted to add to the nxlog conf file to allow it to collect the IIS W3C logs from this server as well and send them to the syslog server. A lot of the support examples out there added scripting to parse the w3c logs to json format. I do not want to do this. Just need to the raw logs to go to our syslog server. Below is my conf file. I'd appreciate pointers and/or the pointing out of errors.
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data LogFile %ROOT%\data\nxlog.log
<Extension syslog> Module xm_syslog </Extension> <Extension w3c> Module xm_csv Fields $date, $time, $s-sitename, $s-computername, $s_ip, $cs_method, $cs_uri_stem, $cs_uri_query, $s_port, $cs_username, $c_ip, $cs-version, $cs_User_Agent, $cs(Cookie), $cs_Referer, $cs-host, $sc_status, $sc_substatus, $sc_win32_status, $sc-bytes, $cs-bytes, $time_taken FieldTypes string, string, string, string, string, string, string, string, integer, string, string, string, string, string, string, string, integer, integer, integer, integer, integer, integer Delimiter ' ' </Extension>
<Input EventLogs> Module im_msvistalog </Input> <Input IIS> Module im_file File "C:\inetpub\logs\LogFiles\W3SVC1\u_ex*" SavePos TRUE UndefValue - </Input>
<Output Syslog> Module om_udp Host 172.16.x.x Port 514 Exec to_syslog_snare(); </Output>
<Route 1> Path EventLogs, IIS => Syslog </Route>
jmeyers created
When attempting to input IIS logs I see the following error: 'ERROR invalid keyword: w3c->parse_csv()'. Has anyone come across this before and knows how I can parse IIS log into a JSON format to input to redis my config
<Extension _exec> Module xm_exec </Extension>
<Extension _json> Module xm_json </Extension>
<Extension _csv> Module xm_csv Fields $date, $time, $s_ip, $cs_method, $cs_uri_stem, $cs_uri_query, $s_port, $cs_username, $c_ip, $cs(User_Agent), $cs(Referer), $sc_status, $sc_substatus, $sc_win32_status, $time_taken FieldTypes string, string, string, string, string, string, integer, string, string, string, string, string, string, string, integer </Extension>
<Extension w3c> Module xm_csv #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken Fields $date, $time, $s_ip, $cs_method, $cs_uri_stem, $cs_uri_query, $s_port, $cs_username, $c_ip, $cs(User_Agent), $cs(Referer), $sc_status, $sc_substatus, $sc_win32_status, $time_taken FieldTypes string, string, string, string, string, string, integer, string, string, string, string, string, string, string, integer Delimiter ' ' QuoteChar ''' </Extension>
<Extension w3cinput> Module xm_w3c Delimiter ' ' </Extension>
<Input iis_logs>
Module im_file
File "C:\inetpub\logs\W3SVC2\u_ex*.log"
ReadFromLast True
Recursive True
SavePos True
Exec if $raw_event =~ /^#/ drop();
else
{
w3c->parse_csv();
$EventTime = parsedate($date + " " + $time);
$SourceName = "IIS";
to_json();
}
</Input>
<output out_iis> Module om_redis Host # Port # Key "iis" </Output>
<Route 1>
Path iis_logs => out_iis
</Route>
peterc created
The following config is working for me to send application event logs to server via tcp, but it is sending duplicate messages for every Event Viewer event/entry.
config below as follows.
User nxlog Group nxlog
LogFile /var/log/nxlog/nxlog.log LogLevel INFO
<Extension exec> Module xm_exec </Extension>
<Extension syslog> Module xm_syslog </Extension>
<Input in> Module im_tcp Port 1514 Host 0.0.0.0 Exec parse_syslog_bsd(); </Input>
<Output out> Module om_file File "/application/logs/" + $Hostname + "" + "app.log" <Exec> if out->file_size() > 1G { set_var('newfile', file_name() + strftime(now(), '%Y%m%d%H%M%S')); rotate_to(get_var('newfile')); exec_async('/bin/bzip2', get_var('newfile')); } </Exec> </Output>
<Route 1> Path in => out </Route>
Suryaprakash created
Hi
I'm using nxlog version 2.10.2102.
I have created the following Input:
<Input Test>
Module im_file
File "D:\TEST\Data\posWS\UploadLogs\61\\."
SavePos TRUE
<Exec>
if $raw_event =~ /[^,]+/g;
{
$datetime = $1;
$log_level = $2;
$version = $3;
$company_id = $4;
$device_code = $5;
$device_manufacturer = $6;
$device_board = $7;
$sdk_version = $8;
$process_id = $9;
$thread_id = $10;
$class_name = $11;
$method_name = $12;
$file_name = $13;
$line = $14;
$description = $15;
$stack_trace = $16;
$EventTime = parsedate($datetime);
$SourceName = "POS_Device";
}
delete($datetime);
</Exec>
</Input>
When I start the nxlog service, I receive the following error:
ERROR Couldn't parse Exec block at C:\Program Files (x86)\nxlog\conf\nxlog.conf:73; couldn't parse statement at line 74, character 29 in C:\Program Files (x86)\nxlog\conf\nxlog.conf; syntax error, unexpected ;, expecting (
I have tested the regex on https://regex101.com/ and it is working fine (flavour = pcre).
Sample data would be:
2018-07-19 10:26:07.830,ASSERT,3.0.2420InternalTest,145,352099091773370,samsung,universal7870,24,8521,1,CrashHandler,uncaughtException,CrashHandler.java,32,"UncaughtException","java.lang.NullPointerException: Attempt to invoke virtual method 'boolean bll.core.Product.isDiscountProduct()' on a null object reference;at bll.core.Sale$SaleItem.isDiscountItem(Sale.java:5514);at bll.core.Sale.containsSpecial(Sale.java:7685);at activity.SalesControlDisplaySale.setItemsPayments(SalesControlDisplaySale.java:454);at activity.SalesControlDisplaySale.displaySale(SalesControlDisplaySale.java:316);at activity.SalesControlDisplaySale.access$400(SalesControlDisplaySale.java:96);at activity.SalesControlDisplaySale$1.onItemSelected(SalesControlDisplaySale.java:213);at android.widget.AdapterView.fireOnSelected(AdapterView.java:1319);at android.widget.AdapterView.dispatchOnItemSelected(AdapterView.java:1308);at android.widget.AdapterView.-wrap1(AdapterView.java);at android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:1275);at android.os.Handler.handleCallback(Handler.java:751);at android.os.Handler.dispatchMessage(Handler.java:95);at android.os.Looper.loop(Looper.java:154);at android.app.ActivityThread.main(ActivityThread.java:6776);at java.lang.reflect.Method.invoke(Native Method);at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496);at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386);"
If I do not use the "/g" (Global) at the end, it only returns the first match.
Any help would be greatly appropriated.
Many thanks
Stephen
stephen created
alexandru.enciu created
Hello,
I'm trying to use the log rotation functionality of nxlog but when nxlog tries to rotate is get the follow error message:
Error failed to rename file from C:\Users\me\Desktop\pfirewall.log to C:\Users\me\Desktop\pfirewall.log.1: The process cannot access the file because it is being used by another process.
Is there anyway to get around this?
Here is my nxlog.conf
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data LogFile %ROOT%\data\nxlog.log
define FWLOG C:\Users\me\Desktop\pfirewall.log
<Extension _syslog> Module xm_syslog </Extension>
<Extension fileop> Module xm_fileop </Extension>
<Input FWLOG> Module im_file File '%FWLOG%' InputType LineBased SavePos TRUE </Input>
<Output OUT> Module om_file File '%FWLOG%'
<Schedule>
Every 10 sec
Exec if (file_size('%FWLOG%') >= 1K) \
{ \
file_cycle('%FWLOG%',10); \
OUT->reopen(); \
}
</Schedule>
</Output>
<Route 1> Path FWLOG => OUT </Route>
EL_GA created
Hello,
Is there a way to import .evt files with nxlog? Using im_file doesn't throw errors, but data doesnt seem to ship.
I also tried using:
module im_mseventlog file "file_path"
but that didn't work either.
Thanks for your help.
Deleted user created
Hello,
Has anyone successfully configured the new event tracing for windows (ETW) input module in nxlog 4.0 to collect Windows DNSServer events? I configured it in nxlog, but the output file doesn't show most of the DNS queries being made. When I look at the nxlog output and compare it with a trace session in Event Viewer, Event Viewer shows all of the events but nxlog is missing almost all of them. There are a few entries in the nxlog file, but not many. I can't seem to reproduce the scenario that causes them to be included in the nxlog output file.
Info on setup: Server 2016 datacenter, v1607 nxlog 4.0.3735-x64
Related nxlog config:
<Input winetw> Module im_etw Provider Microsoft-Windows-DNSServer </Input> <Output file> Module om_file File 'C:\Windows\Logs\nxlog\test.txt' </Output> <Route messages_to_file> Path winetw => file </Route>
bcid created
Hello,
I'm trying to avoid having duplicate logs send to my OSSIM server. I tried using the pm_norepeat module but to no avail. Here the line I added in nxlog.conf file :
<Processor sans_doublons> Module pm_norepeat </Processor>
<Route route_windows_logs> Path in_windows_events => sans_doublons => out_alienvault_csv </Route>
I also tried adding "CheckFields raw_event" in the processor, but I still get duplicate logs. Does anyone know what could be the problem ?
Thanks
CharlesCharles created
lipc created
JaVa created
jdalyasc created
Hello,
Where can I find Nxlog-ce source code for Windows?
lukasz created
Hi,
i have a very basic question.
i have to use nxlog as a logshipper on the (solaris) client side to logstash (elk).
Within this configuration there are some bigger logfiles with multilines to parse (java traces / xml ...).
Should i handle the multiline on the nxlog side or on the logstash receiver side?
thanks in advance
Andreas
awahlert created
Hi,
Does NXLog supports sending log files to Amazon S3 cloud storage?
Thanks,
Amishai
Amishai created
Hi,
I have configured nxlog with Graylog2, i am seeing below warning in nxlog.log, wat could be the issue 2018-07-03 11:34:03 WARNING string limit (1048576) exceeded while trying to append 2018-07-03 11:41:37 INFO inode changed for '/var/log/Store/Store.log' (96469298->96469281): reopening possibly rotated file 2018-07-03 12:03:22 INFO inode changed for '/var/log/Store/Store.log' (96469281->96469298): reopening possibly rotated file
Sateesh.Huvinahalli created
Can someone please let me know if Community Edition support TSL v 1.2 as currently i'm using 1.0 and that does not seem to be working after one of the vendors blocked it due to vulnerability in v 1.0. Can you please let me know what options i have now.
Thanks, Zee
zaeem created