Recently, i ran into a problem with file locking. One application here is generating some log file, one per client, when nxlog try to read file, i got error :

ERROR failed to open LOGFILEPATH; Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.  

Initaly my configuration was :

<Input Orbis>
    Module im_file
    File 'LogDirectory\\*'
    SavePos TRUE
    ReadFromLast FALSE
    CloseWhenIdle TRUE
    InputType orbisLog
    Exec if $raw_event !~ /^L:.*/  drop();
    Exec $ClientNAme = replace(file_basename(file_name()),'.LOG','');


I have changed the PollIntervall to 60 and 3600, no effect... Except that at PollInterval 3600, nxlog grab 40% of CPU.

Is there a way to insctruct nxlog to retry to read the file ?

AskedSeptember 2, 2015 - 9:51am

Answer (1)

If pollinterval 3600 results in a high CPU utilization then there is obviously something wrong.

Other than that NXLog should retry the file later after encountering an error.