FIFO as a source and imfile.

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

FIFO as a source and imfile.

Postby arv on Tue Sep 30, 2008 5:53 pm

I've tried to take an advantage of FIFOs to direct logs from an application to rsyslog. It works perfectly with one source. However when I've defined two FIFOs and restarted rsyslogd and application daemon, the application was not responding. It showed up (lsof) that rsyslog has opened only one FIFO for reading. FIFO operations are blocking in linux. It means that writing to FIFO is possible only when FIFO is opened for reading. Otherwise process receives a signal and hangs. That was what happened to me.

FIFOs were created like that:
Code: Select all
mkfifo /var/log/some_fifo; mkfifo /var/log/second_one


rsyslogd.conf was:
Code: Select all
$ModLoad imfile.so
$ModLoad omrelp.so

$InputFileName /var/log/some_fifo
$InputFileTag some_fifo
$InputFileStateFile /var/rsyslog/some_fifo.state
$InputFileFacility local6
$InputFileSeverity notice
$InputRunFileMonitor

$InputFileName/var/log/second_one
$InputFileTag second_one
$InputFileStateFile /var/rsyslog/second_one.state
$InputFileFacility local6
$InputFileSeverity notice
$InputRunFileMonitor

$InputFilePollInterval 10

$WorkDirectory /var/rsyslog/spool
$ActionQueueFileName uniqName
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1

local6.*         :omrelp:central_log_host:514


Did I make any mistakes ?
Any sugestions ?

Arv.
arv
New
 
Posts: 6
Joined: Tue Sep 30, 2008 11:25 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Google Ads


Return to Configuration

Who is online

Users browsing this forum: Google Adsense [Bot] and 0 guests

cron