ONEOF block

View thread

Petex

hi I have an application that writes many log files to folder on my windows server. Each log only contain one or two lines. Previously the files were deleted by another system but that is now decommissioned. I wanted to use NXLOG to delete the files once it has treated its contents(nothing else will be added after) looking in the community edition docs I can use an ONEOF block with a remove. The config is parsed correctly and the logs are sent to my graylog server, however the logs are never removed. I saw some posts that suggested this block only works with the paid version but its strange that it is documented in the community docs? Can any one tell me where i am going wrong ou another way of doing this
This is an extract from my config version nxlog-ce-3.0.2284

<Extension _fileop> Module xm_fileop </Extension>

<Extension csv1> Module xm_csv Fields $Method,$Host,$Application,$EventID,$Severity,$Date,$Time,$Description,$Value Delimiter | </Extension>

<Input hyp-in> Module im_file SavePos TRUE ReadFromLast FALSE ActiveFiles 20 CloseWhenIdle TRUE File "C:\HYPERVISION\logFiles*.*" <Exec> csv1->parse_csv(); $InputFileName1 = file_name(); $Message = $raw_event; </Exec> <OnEOF>
Exec file_remove(file_name(), now() - 6000); </OnEOF> </Input>