El 2013-05-07 11:19, C. L. Martinez escribió:
2013/5/7 <may...@maykel.sytes.net>:
Hola muy buenas, tengo un servidor remoto rsyslog, el tema es que
cuando
rota en una config que le he configurado en
/etc/logrotate.d/apache-rsyslog,
deja de rotar en access.log(que son apaches que escriben es este log
remoto).
/var/log/remote/*.log
{
rotate 7
daily
missingok
noifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
La idea, es que rote los *.log de ése directorio, pero al rotar,
deja el
access.log, en error.log y en ssl-access.log vacío y deja de
loguear...
Prueba esto:
/var/log/remote/*.log
{
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2>
/dev/null || true
endscript
}
Me reporta esto al lanzarlo con logrotate -d -f apache2-rsyslog
reading config file /etc/logrotate.d/apache2-rsyslog
reading config info for /var/log/remote/*.log
Handling 1 logs
rotating pattern: /var/log/remote/*.log
forced from command line (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /var/log/remote/access.log
log needs rotating
considering log /var/log/remote/error.log
log needs rotating
considering log /var/log/remote/ssl_access.log
log needs rotating
rotating log /var/log/remote/access.log, log->rotateCount is 0
dateext suffix '-20130507'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/remote/access.log.1 to /var/log/remote/access.log.2
(rotatecount 1, logstart 1, i 1),
renaming /var/log/remote/access.log.0 to /var/log/remote/access.log.1
(rotatecount 1, logstart 1, i 0),
rotating log /var/log/remote/error.log, log->rotateCount is 0
dateext suffix '-20130507'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/remote/error.log.1 to /var/log/remote/error.log.2
(rotatecount 1, logstart 1, i 1),
renaming /var/log/remote/error.log.0 to /var/log/remote/error.log.1
(rotatecount 1, logstart 1, i 0),
rotating log /var/log/remote/ssl_access.log, log->rotateCount is 0
dateext suffix '-20130507'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/remote/ssl_access.log.1 to
/var/log/remote/ssl_access.log.2 (rotatecount 1, logstart 1, i 1),
renaming /var/log/remote/ssl_access.log.0 to
/var/log/remote/ssl_access.log.1 (rotatecount 1, logstart 1, i 0),
renaming /var/log/remote/access.log to /var/log/remote/access.log.1
disposeName will be /var/log/remote/access.log.1
renaming /var/log/remote/error.log to /var/log/remote/error.log.1
disposeName will be /var/log/remote/error.log.1
renaming /var/log/remote/ssl_access.log to
/var/log/remote/ssl_access.log.1
disposeName will be /var/log/remote/ssl_access.log.1
running postrotate script
running script (multiple) with arg /var/log/remote/*.log
: "
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2>
/dev/null || true
"
removing old log /var/log/remote/access.log.1
removing old log /var/log/remote/error.log.1
removing old log /var/log/remote/ssl_access.log.1
Saludos y muchas gracias por contestar.
--
To UNSUBSCRIBE, email to debian-user-spanish-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
http://lists.debian.org/97755ff05fae940adafc1f2c94aa9...@maykel.sytes.net