[rsyslog-notify] Forum Thread: Re: imfile error: no file name given - (Mode 'edit_last_post')

noreply at adiscon.com noreply at adiscon.com
Tue Jul 26 13:33:56 CEST 2016


User: anjoed 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26819#p26819

Message: 
----------
Sorry, my mistake. About he version, I am trying to convince my team to
remove this version and install the new. 

whereas it doesn't happen, I am trying fix this issue.


Thank you for the answer.

Here the output with -c5:

[root at ds2soaldap2p ~]# rsyslogd -f /etc/rsyslog.conf -N2 -c5
rsyslogd: version 5.8.10, config validation run (level 2), master config
/etc/rsyslog.conf
rsyslogd: unknown priority name "log" [try <!-- m --><a class="postlink"
href="http://www.rsyslog.com/e/3000">http://www.rsyslog.com/e/3000</a><!--
m --> ]
rsyslogd: the last error occured in /etc/rsyslog.d/graylog.conf, line
19:"InputFileName /var/log/openldap_conexoes.log"
rsyslogd: imfile error: no file name given, file monitor can not be created
[try <!-- m --><a class="postlink"
href="http://www.rsyslog.com/e/2046">http://www.rsyslog.com/e/2046</a><!--
m --> ]
rsyslogd: the last error occured in /etc/rsyslog.d/graylog.conf, line
26:"$InputRunFileMonitor"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: the last error occured in /etc/rsyslog.conf, line
44:"$IncludeConfig /etc/rsyslog.d/*.conf"
rsyslogd: CONFIG ERROR: could not interpret master config file
'/etc/rsyslog.conf'. [try <!-- m --><a class="postlink"
href="http://www.rsyslog.com/e/2124">http://www.rsyslog.com/e/2124</a><!--
m --> ]



My config:

 cat /etc/rsyslog.conf 
# rsyslog v5 configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see <!-- m --><a class="postlink"
href="http://www.rsyslog.com/doc/troubleshoot.html">http://www.rsyslog.com/doc/troubleshoot.html</a><!--
m -->

#### MODULES ####

$ModLoad imuxsock # provides support for local system logging (e.g. via
logger command)
$SystemLogRateLimitInterval 1
$SystemLogRateLimitBurst 1500
$ModLoad imklog   # provides kernel logging support (previously done by
rklogd)
#$ModLoad immark  # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####
$MaxMessageSize 5k
$FileOwner root
$FileGroup root
$FileCreateMode 0600
$DirOwner root
$DirGroup root
$DirCreateMode 0750
$PrivDropToUser root
$PrivDropToGroup root
$WorkDirectory /var/lib/rsyslog
$Umask 0000

# Use default timestamp format
#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# File syncing capability is disabled by default. This feature is usually
not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf


#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local0.none    /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog


# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log


# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList   # run asynchronously
#$ActionResumeRetryCount -1    # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###
local4.*	-/var/log/openldap.log

cat /etc/rsyslog.d/graylog.conf 
$ModLoad imfile
$ModLoad imklog   # for reading kernel log messages
$ModLoad imuxsock # for reading local syslog messages

#### Openldap Log ####

$template ldap_monitor_template,"<%PRI%>%timegenerated% %HOSTNAME%
%syslogtag% %msg%"

$InputFileName /var/log/openldap.log
$InputFileTag ldap.soa.tag:
$InputFileStateFile open-stat-file
$InputFileSeverity info
$InputFileFacility local0
$InputFilePollInterval 1
$InputRunFileMonitor

#### SyncRepl Log ####

InputFileName /var/log/openldap_conexoes.log
$InputFileTag ldap.scon.tag:
$InputFileStateFile sync-stat-file
$InputFileSeverity info
$InputFileFacility local0
$InputFilePollInterval 1
$InputFilePersistStateInterval 1
$InputRunFileMonitor


if $syslogtag contains 'ldap.' and $syslogfacility-text == 'local0' then
@@xxxxxxx.xxxxxx.net:10514;ldap_monitor_template
if $syslogtag contains 'ldap.' and $syslogfacility-text == 'local0' then
@@xxxxx.xxxxx.net:10534;ldap_monitor_template
:syslogtag, contains, "scon" or "soa" ~


More information about the rsyslog-notify mailing list