Problema con rsyslog.conf
Estimados, estoy tratando de configurar un servidor de Rsyslog para que
loguee en directorios diferentes según determinadas condiciones. Estoy
probando utilizar el lenguaje RainerScript y por ahora voy bien por lo
básico, hacer que todo lo que es remoto loguee en un determinado
directorio, para lo cual uso las siguientes sentencias (además de las
que están por defecto):
module(load="imudp") # needs to be done just once
input(type="imudp" port="514")
ruleset(name="remote"){
action(type="omfile" file="/var/log/rsyslog/remote.log")
}
input(type="imudp" port="514" ruleset="remote");
El problema es que luego cuando hago un "syslogd -N1" para chequear la
sintaxis me encuentro con cosas como estas:
rsyslogd: version 5.8.11, config validation run (level 1), master config
/etc/rsyslog.conf
rsyslogd: WARNING: rsyslogd is running in compatibility mode.
Automatically generated config directives may interfer with your
rsyslog.conf settings. We suggest upgrading your config and adding -c5
as the first rsyslogd option.
rsyslogd: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line
14:"module(load="imudp") # needs to be done just once"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line
15:"input(type="imudp" port="514")"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line
38:"ruleset(name="remote"){"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: unknown priority name "log")" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line 39:"
action(type="omfile" file="/var/log/rsyslog/remote.log")"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line 40:"}"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
rsyslogd: the last error occured in /etc/rsyslog.conf, line
42:"input(type="imudp" port="514" ruleset="remote");"
rsyslogd: warning: selector line without actions will be discarded
rsyslogd: CONFIG ERROR: could not interpret master config file
'/etc/rsyslog.conf'. [try http://www.rsyslog.com/e/2124 ]
rsyslogd: Warning: backward compatibility layer added to following
directive to rsyslog.conf: ModLoad immark
rsyslogd: Warning: backward compatibility layer added to following
directive to rsyslog.conf: MarkMessagePeriod 1200
rsyslogd: Warning: backward compatibility layer added to following
directive to rsyslog.conf: ModLoad imuxsock
Y por supuesto que no obtengo los logs deseados en el directorio
/var/log/rsyslog/remote.log.
La verdad que he buscado bastante y no doy pié con bola, por eso acudo a
ustedes. Hasta donde tengo entendido la versión que estoy usando
(5.8.11) soporta el lenguaje Rainer Script (aunque pareciera que en este
caso no le gusta todo lo que es escrito en este lenguaje), así que no
entiendo porque todos esos errores al chequear la sintaxis del archivo.
Si me pueden dar una mano se los agradecería mucho.
Saludos, Mauro.
Reply to: