nxlog memory leak?
Posted: Thu Jun 16, 2016 10:44 am
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... 37&t=36623
In the future, please create a new thread and link to the old one instead of adding on.
I am seeing a potential memory leak issue and have found it to be related to this non-default module we created:
When this is removed, nxlog sits around 7 MB over 20 minutes. When adding it back in, nxlog is over 100 MB in the same timeframe (for reference, ULS logging is very heavy at ~8MB/minute). I'd prefer to not lose this log type and am open to suggestions/corrections on what I am doing here.
Thanks!
In the future, please create a new thread and link to the old one instead of adding on.
I am seeing a potential memory leak issue and have found it to be related to this non-default module we created:
Code: Select all
# Create the parse rule for SharePoint logs.
<Extension SharePoint_Extension>
#map SharePoint ULS Logs
Module xm_csv
Fields $datetime, $process, $tid, $area, $category, $eventid, $level, $message, $correlation
FieldTypes string, string, string, string, string, string, string, string, string
Delimiter \t
</Extension>
# Convert the SharePoint logs
<Input SharePoint_Input>
Module im_file
File 'L:\AGC3*.log'
SavePos TRUE
Exec if $raw_event =~ /^#/ drop(); \
else \
{ \
SharePoint_Extension->parse_csv(); \
$Message = $raw_event; \
}
</Input>
<Output SharePoint_out>
Module om_tcp
Host nagios.agoc.com
Port 5366
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
#Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>
<Route SharePoint>
Path SharePoint_Input => SharePoint_out
</Route>
Thanks!