$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$WorkDirectory /path/to/rsyslog/spool

# Input for PHP
$InputFileName /var/log/php.log
$InputFileTag php_log:
$InputFileStateFile nls-state-php_log # Must be unique for each file being polled
# Uncomment the folowing line to override the default severity for messages
# from this file.
#$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor

# Forward to Nagios Logserver and then discard.
if $programname == 'php_log' then @@%hostname%:%syslog_port%
if $programname == 'php_log' then ~