How would I go about statically assigning the value of x-forward-for the end of an IIS message that is being read through IM_FIle?
I am doing testing of IIS Log files and I want to take a value from an internal system and add the x-forward-for field to the message.
I have tried adding it to the Input on im_file
Exec $Message = $x_forwarded_for + ' ' + 'x.x.x.x';
I have tried it as
$raw_event = $raw_event + 'x.x.x.x'
Either the value never shows up or it ends up outside of the message. What I need is for it to be inside the message. Essentially where the time-taken is on this example message I would end up with my static x-forwarded-for entry.
#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2017-10-02 17:11:27 #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 2017-10-02 17:11:27 fe80::b5d8:132c:cec9:daef%6 RPC_IN_DATA /rpc/rpcproxy.dll 1d4026cb-6730-43bf-91eb-df80f41c050f@test.com:6001&CorrelationID=<empty>;&RequestId=11d6a78a-7c34-4f43-9400-ad23b114aa62&cafeReqId=11d6a78a-7c34-4f43-9400-ad23b114aa62; 80 TEST\HealthMailbox418406e fe80::b5d8:132c:cec9:daef%6 MSRPC - 500 0 0 7990 2017-10-02 17:12:57 fe80::a425:345a:7143:3b15%2 POST /powershell clientApplication=ActiveMonitor;PSVersion=5.1.14393.1715 80 - fe80::a425:345a:7143:3b15%2 Microsoft+WinRM+Client - 500 0 0 11279
kmschramm created
Using one dedicated NXlog node as master collector that forwards logs to SIEM, I also dump all logs into a file and I rotate that file weekly, keeping 4 weeks worth of logs on the collector; this very clean setup is taken from the documentation and I like it - it works well (see Log rotate in documentation, example 103). Problem is: This consumes much disk, so I'll need to compress the rotated file. Can I add compression to that output to compress the rotate-copy? I'd prefer not using the example 113 in said log-rotation documentation page.
DS_534595 created
I'm fairly new to this, but wanted to get some pointers. I've been provided with a syslog.conf file, and am trying to determine what events are being logged. Can someone please let me know what I should be looking for? Alternatively if the syslog.conf file doesn't contain this info, where can I find what events are being logged? On the other hand, is there a standard list of event types that are automatically logged?
R9_779777 created
Hi,
I am new to NXLog and I am setting up relay log servers in IP ranges to collect and forward log events from hosts (different OS) with dynamically assigend IP addresses.
While doing so, I figured out that the forwarded log events missing important details about the orginating systems and I like to enrich the log events while receiving (accepting ) them with the following details:
- hostname as SOURCE_HOSTNAME
- ipv4 address as SOURCE_HOSTIP
How is the best practice to do so?
Rgds, Thorsten
TK_238869 created
hi who i can get iis web server logs and then send them to ossim log server?
BZ_708214 created
AH_601191 created
Hello
windows ---> nxlog-------->graylog&splunk(syslog)
how can i do?
this conf is right?
p.s. graylog 192.168.1.20 splunk 192.168.1.21
------------------------------------My conf------------------------------------------------------------------ Panic Soft #NoFreeOnExit TRUE
define ROOT C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert define CONFDIR %ROOT%\conf define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE%
Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data
<Extension _syslog> Module xm_gelf
</Extension>
<Extension _syslog> Module xm_syslog
</Extension>
<Input in>
Module im_msvistalog
</Input>
<Output out> Module om_udp Host 192.168.1.20 Port 10554 OutputType GELF </Output>
<Output out1> Module om_udp Host 192.168.1.21 Port 10554 Exec to_syslog_snare(); </Output>
<Route 1> Path in => out </Route>
<Route 2> Path in => out1 </Route>
lokeliu created
JP_128812 created
Hope someone can provide some pointers.
I have an application that uses mySQL database and it is installed on Windows Server 2019. I just downloaded NXLog CE on the same Windows Server 2019. I am new to this but the goal is to extract a table from mySQL and output it as JSON format so that I can ingest it to another platform. Appreciate if someone can point me to the right direction to make this work.
Thanks !
DC_475094 created
- I am using https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi to download the nxlog file.
- I am using below configuration:
This is a sample configuration file. See the nxlog reference manual about the
configuration options. It should be installed locally and is also available
online at http://nxlog.org/docs/
Please set the ROOT to the folder your nxlog was installed into,
otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog 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 _json> Module xm_json </Extension>
<Input in>
Module im_msvistalog
Query <QueryList>
<Query Id="0">
<Select Path="Security">* </Select>
<Select Path="Application">* </Select>
<Select Path="Setup">* </Select>
<Select Path="System">* </Select>
</Query>
</QueryList>
<Exec>
if ($EventID NOT IN (%aisiem%)) drop();
</Exec>
</Input>
<Output out> Module om_udp Host CCE_IP_ADDRESS Port 5154 Exec to_json(); </Output>
<Route 1> Path in => out </Route>
-
Getting this error: 2020-10-22 19:11:05 WARNING stopping nxlog service 2020-10-22 19:11:05 WARNING nxlog-ce received a termination request signal, exiting... 2020-10-22 19:11:16 ERROR Failed to load module from C:\Program Files (x86)\nxlog\modules\output\om_udp .dll, Invalid argument; Invalid argument 2020-10-22 19:11:16 ERROR module 'out' is not declared at C:\Program Files (x86)\nxlog\conf\nxlog.conf:52 2020-10-22 19:11:16 ERROR route 1> is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:52 2020-10-22 19:11:16 WARNING no routes defined! 2020-10-22 19:11:16 WARNING not starting unused module in 2020-10-22 19:11:16 INFO nxlog-ce-2.10.2150 started
-
I am using windows 10. Please suggest what should I change to configure successfully.
PS_793095 created
Hello,
I'm trying to query some EventID with a specific SeverityValue in "im_msvistalog", the config is something like this:
<Input eventlog>
Module im_msvistalog
<QueryXML>
<QueryList>
<Query Id='0'>
<Select Path='System'>*[System[(EventID=6005 or EventID=6008 or EventID=7036)]</Select>
</Query>
</QueryList>
</QueryXML>
Exec if $SeverityValue NOT IN (2, 4) drop();
Exec $Message =~ s/(\t|\R)/ /g;
I'm trying for a test to output on file, but nothing is outputted.
Anyone has some hint?
Thanks
LP_577584 created
Hi everyone,
I'm getting this issue of
-
assignment failed at line 215, character 67 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted function 'strftime' failed at line 215, character 66 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. expression evaluation has been aborted got 'unknown' for first argument of function 'strftime(datetime, string)'.
-
if-else failed at line 208, character 277 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted procedure 'parse_csv' failed at line 208, character 129 in C:\Program Files (x86)\nxlog\conf\nxlog.conf. statement execution has been aborted Not enough fields in CSV input, expected 17, got 0 in input ''
Below is the line the error is refering to:
- Exec $EventTime = strftime($EventTime, '%Y-%m-%d %H:%M:%S, %z');
- }
Kindly help me out to fix this issue and what is causing the error.
Thanks.
vishnus9330 created
Hi guys,
I must forwarding some logs, but only of some users. this's my current configuration.
Panic Soft #NoFreeOnExit TRUE
define ROOT C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert define CONFDIR %ROOT%\conf define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE%
Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data
<Extension _syslog> Module xm_syslog </Extension>
<Extension _charconv> Module xm_charconv AutodetectCharsets iso8859-2, utf-8, utf-16, utf-32 </Extension>
<Extension _exec> Module xm_exec </Extension>
<Extension _fileop> Module xm_fileop
# Check the size of our log file hourly, rotate if larger than 5MB
<Schedule>
Every 1 hour
Exec if (file_exists('%LOGFILE%') and \
(file_size('%LOGFILE%') >= 5M)) \
file_cycle('%LOGFILE%', 8);
</Schedule>
# Rotate our log file every week on Sunday at midnight
<Schedule>
When @weekly
Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
</Schedule>
</Extension>
<Input eventlog> Module im_msvistalog <QueryXML> <QueryList> <Query Id='0'> <Select Path='Security'>*[System[(EventID=4720 or EventID=4634 or EventID=4625 or EventID=4624 or EventID=4726)]]</Select> </Query> </QueryList> </QueryXML> Exec $Message = 'EventID: ' + $EventID +' Source: '+ $IpAddress + ' Username: ' + $TargetUserName ; </Input>
<Output tcp> Module om_udp Host xx.xxx.xx.xxx Port xxx Exec to_syslog_bsd(); </Output>
<Route eventlog_to_tcp> Path eventlog => tcp </Route>
can you help me? thank you
Emanuele created
Hello,
After looking on the community forum i didn't really get the answer i was seeking.
I'm sending windows log to a syslog and to a splunk,
I got some issue about parsing the Message part as you can see : https://cdn.discordapp.com/attachments/700242491227635714/766300884971159562/unknown.png
This is my conf : https://cdn.discordapp.com/attachments/700242491227635714/766301478897451048/unknown.png https://cdn.discordapp.com/attachments/700242491227635714/766301597541335060/unknown.png
Maybe this is not the good way to do it, i have to send in syslog because i'm sending it after to an elasticsearch and the splunk.
Thank you for your help :)
MB_318874 created
Hello In the end I have to come to you because I can't find the way to do it and I'm going a bit crazy.
I have a record entry from a file. This file sends the data in a disorderly way and I have managed to assign it to variables.
Now the only thing I want is to create an output in a file but with the order I need.
EJ of log entry :
user1 2020 barcelona 12 13:39 12 spaghetti
And I want an exit like
Place: <variable of place> , Date: <variable of date> , Age :<variable of age> To generate a line like this : Place : barcelona , Date : 2020 , Age : 12 ....
This is my config.
<Input LOG_IN> Module im_file File "C:\logs\u_ex*" SavePos TRUE <Exec> if $raw_event =~ /(.?)\s"(.?)"\s"(.?)"\s(.?)\s(.?)\s(.?)\s"(.?)"\s"(.?)"\s(.?)\s(.?)\s(.?)\s"(.?)"\s"(.?)"\s(.?)\s(.?)\s"(.?)"/; { $a = $1; $b = $2; $c = $3; $d = $4; $e = $5; $f = $6; $g = $7; $h = $8; $i = $9; $j = $10; $k = $11; $l = $12; $m = $13; $n = $14; $o = $15; $p = $16; } </Exec> </Input>
<Output file> Module om_file File "C:\logs\output.log" </Output>
JM_782883 created
Hi. I'm new to both Graylog and NxLog. I am getting the following errors when trying to add inputs.
2020-10-14 11:48:27 WARNING stopping nxlog service 2020-10-14 11:48:27 WARNING nxlog-ce received a termination request signal, exiting... 2020-10-14 11:48:28 ERROR invalid keyword: Output at C:\Program Files (x86)\nxlog\conf\nxlog.conf:66 2020-10-14 11:48:28 ERROR module 'graylog' has configuration errors, not adding to route 'graylog_route' at C:\Program Files (x86)\nxlog\conf\nxlog.conf:70 2020-10-14 11:48:28 ERROR route graylog_route is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:70 2020-10-14 11:48:28 WARNING no routes defined! 2020-10-14 11:48:28 WARNING not starting unused module win 2020-10-14 11:48:28 WARNING not starting unused module graylog 2020-10-14 11:48:28 INFO nxlog-ce-2.10.2150 started
I added the following lines to my config file
<Extension _gelf> Module xm_gelf </Extension>
<Input win>
Module im_msvistalog
Query <QueryList>
<Query Id="0">
<Select Path="Application"></Select>
<Select Path="System"></Select>
<Select Path="Security">*</Select>
</Query>
</QueryList>
</Input>
<Output graylog> Module om_udp host 172.16.101.33 Port 12201 Output Type GELF </Output>
<Route graylog_route> Path win => graylog </Route>
Any help is appreciated.
ZE_043114 created
DS_534595 created
JF_427179 created
TK_276781 created
hello i have i question about windows 2012 > nxlog ce > graylog my nxlog-ce ver is 2.10.2150
question : my nxlog-ce to graylog have question but the log is not go to graylog so im open windows taskmgr to see nxlog.exe PID and Internet connection
- nxlog source ip and Destination is "ipv4 Loopback " 2.nxlog log : WARNING The following sources are omitted to avoid exceeding the limit in the generated query: Microsoft-Windows-Workplace Join/Admin Microsoft-Windows-WPD-ClassInstaller/Operational Microsoft-Windows-WPD-CompositeClassDriver/Operational Microsoft-Windows-WPD-MTPClassDriver/Operational Microsoft-WS-Licensing/Admin Setup WitnessClientAdmin
my nxlog.conf
Panic Soft #NoFreeOnExit TRUE
define ROOT C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert define CONFDIR %ROOT%\conf define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE%
Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data
<Extension _syslog> Module xm_gelf </Extension>
<Input in>
Module im_msvistalog
</Input>
<Output out> Module om_udp Host Port 10554 OutputType GELF </Output>
<Route 1> Path in => out </Route>
so how can i do to Solve the problem
please help me thx~~
lokeliu created