Page 1 of 1

nxlog memory leak?

Posted: Thu Jun 16, 2016 10:44 am
by cpatterson1
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:

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>
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!

Re: nxlog memory leak?

Posted: Thu Jun 16, 2016 3:00 pm
by hsmith
Hello,

As we didn't write NXLog, I don't have a lot of advice on this issue to offer up. Can you take a look here and see if you have more success asking?