Unable to send csv logs to graylog udp


(Nav) #1

Hi Everyone,
I have copied jira access logs, filter it using csv and put under a directory as csv file.
I am using below nxconf which gets loaded and nxlog service gets started, however no logs are send to graylog server.

#define ROOT C:\Program Files\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>

<Extension fileop>
	Module      xm_fileop
</Extension>	
	
<Extension _syslog>
	Module      xm_syslog
</Extension>

<Extension gelf>
  Module xm_gelf
</Extension>

<Extension jira>
Module 	xm_csv
Fields 	$IPAddress,$UserName,$DateTime,$HTTPAction,$ResponseCode,$Column10,$Column11
FieldTypes string,string,string,string,string,string,string
	   Delimiter","
	</Extension>

<Input in>
Module    	im_file
File    	"C:\\Users\\jira\\Documents\\TempOut\\JiraAccessLogs\\accessLog.csv"
	#ReadFromLast False
	#Recursive True
#SavePos True
	
<Exec>
	if $raw_event =~ /^#/ drop(); 
	else
	{
jira->parse_csv();  
to_json();
	}
</Exec>
  

</Input>

<Output out>

	Module om_udp
	Host 172.17.1.87
	Port 5046
	OutputType  GELF_UDP
	Exec $short_message = $raw_event; # Avoids truncation of the short_message field.
	Exec $collector_node_id = 'SINNB0094';
	Exec $Hostname = hostname_fqdn();
	#Use the following line for debugging (uncomment the fileop extension above as well)
	Exec file_write("C:\Users\\jira\\Documents\\TempOut\\JiraAccessLogs\\nxlog-debug.log", $raw_event);
 
	
</Output>

<Route 1>
	Path        in => out
</Route>	

if i replace, output section with below and send the data to txt/log file, i can see the logs converted to json and written.

Module      om_file
File        "C:\\nxlog-debug.txt"

Ii suspect there is some issue with out with om_udp but since i don’t see any error or warning, it’s difficult to troubleshoot.
can you help me spot what is wrong with the out?


(system) #2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.