Configuration of pm_buffer behind om_file
Hi,
Here's my case :
I'm trying to create Syslog Server Configuration, based on CentOS. Server must :
-- Receive log from tcp
-- store log into a NFS Volume automaticaly mounted by fstab on server startup
---- in case of fail of the NFS Volume, create a buffer on local disk.
Here's my configuration :
<Extension _syslog> Module xm_syslog </Extension>
<Extension _xm_file> Module xm_fileop </Extension>
<Input in> Module im_tcp Host 0.0.0.0 Port 39458 <Exec> $SERVER = hostname(); parse_syslog_ietf(); $DATE = strftime($EventTime, "%Y%m%d"); </Exec> </Input>
<Processor buffer> Module pm_buffer maxSize 204800 Type Disk Directory %LOGDIR% WarnLimit 190000 </Processor>
<Processor blocker> Module pm_blocker <Exec> $CHEMIN = "/var/partage/"+$SERVER; $test = dir_exists($CHEMIN); if $test == TRUE { blocker->block(FALSE); } else blocker->block(TRUE); </Exec> </Processor>
<Output out> Module om_file File "/var/partage/"+$SERVER+"/"+$Hostname+"/"+$DATE+"_"+$Hostname+".log" CreateDir TRUE Exec to_syslog_ietf(); </Output>
<Route tcp_to_file> Path in => buffer => blocker => out </Route>
My Problem :
- When NFS Volume is down, pm_blocker write " can't check condition "dir_exists(<Path>)" : input/outpur Error"
- When i try without pm_blocker, om_file fails with same error and no buffer created....
Question :
- What is the best solution to implement a disk buffer system for om_file module ?
- How can i catch NFS volume exceptions ?
Thanks in advance, best regards, Julien
Can you show line for NFS mount in fstab?