Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[logrotate] custom path log
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
upszot
Guru
Guru


Joined: 29 Apr 2009
Posts: 306
Location: Argentina

PostPosted: Mon Aug 28, 2017 8:27 pm    Post subject: [logrotate] custom path log Reply with quote

Hola gente, tanto tiempo...

Me estoy topando con un problema que no logro dar en el clavo....

Tengo unos logs en "/opt/jws-3.0/httpd/logs" que necesito rotar... para lo cual agrege la siguiente configuracion dentro del logrotate.d/
Code:
cat /etc/logrotate.d/jews
/opt/jws-3.0/httpd/logs/ssl_tws-si_access_log
/opt/jws-3.0/httpd/logs/ssl_tws-si_error_log
/opt/jws-3.0/httpd/logs/access_log
{
   daily
   compress
   delaycompress
   missingok
   notifempty
   maxage 360
}

La configuracion de selinux esta asi...
Code:
cat /etc/selinux/config |grep -v ^#
SELINUX=permissive
SELINUXTYPE=targeted

por lo cual no deberia de estar interfiriendo en nada...

y para probar la ejecucion lo hago asi...
Code:
logrotate -vdf /etc/logrotate.d/jews 2> /tmp/logrotate.debug

y esta seria la salida del log de ejecuccion...
Code:
cat /tmp/logrotate.debug
reading config file /etc/logrotate.d/jews

Handling 1 logs

rotating pattern: /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log
/opt/jws-3.0/httpd/logs/ssl_tws-si_error_log
/opt/jws-3.0/httpd/logs/access_log
 forced from command line (no old logs will be kept)
empty log files are not rotated, old logs are removed
considering log /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log
  log needs rotating
considering log /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log
  log needs rotating
considering log /opt/jws-3.0/httpd/logs/access_log
  log needs rotating
rotating log /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log, log->rotateCount is 0
dateext suffix '-20170828'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1 does not exist
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1.gz to /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.2.gz (rotatecount 1, logstart 1, i 1),
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.0.gz to /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1.gz (rotatecount 1, logstart 1, i 0),
fscreate context set to unconfined_u:object_r:usr_t:s0
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log to /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1
disposeName will be /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1.gz
removing old log /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1.gz
error: error opening /opt/jws-3.0/httpd/logs/ssl_tws-si_access_log.1.gz: No such file or directory
rotating log /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log, log->rotateCount is 0
dateext suffix '-20170828'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1 does not exist
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1.gz to /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.2.gz (rotatecount 1, logstart 1, i 1),
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.0.gz to /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1.gz (rotatecount 1, logstart 1, i 0),
fscreate context set to unconfined_u:object_r:usr_t:s0
renaming /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log to /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1
disposeName will be /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1.gz
removing old log /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1.gz
error: error opening /opt/jws-3.0/httpd/logs/ssl_tws-si_error_log.1.gz: No such file or directory
rotating log /opt/jws-3.0/httpd/logs/access_log, log->rotateCount is 0
dateext suffix '-20170828'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /opt/jws-3.0/httpd/logs/access_log.1 does not exist
renaming /opt/jws-3.0/httpd/logs/access_log.1.gz to /opt/jws-3.0/httpd/logs/access_log.2.gz (rotatecount 1, logstart 1, i 1),
renaming /opt/jws-3.0/httpd/logs/access_log.0.gz to /opt/jws-3.0/httpd/logs/access_log.1.gz (rotatecount 1, logstart 1, i 0),
fscreate context set to unconfined_u:object_r:usr_t:s0
renaming /opt/jws-3.0/httpd/logs/access_log to /opt/jws-3.0/httpd/logs/access_log.1
disposeName will be /opt/jws-3.0/httpd/logs/access_log.1.gz
removing old log /opt/jws-3.0/httpd/logs/access_log.1.gz
error: error opening /opt/jws-3.0/httpd/logs/access_log.1.gz: No such file or directory

despues de ejecutar el logrotate no rota nada...
Code:
 ls -l /opt/jws-3.0/httpd/logs/
total 1197528
-rw-r--r--. 1 root root 144522658 Aug 28 15:58 access_log
-rw-r--r--. 1 root root  13095617 Aug 28 14:24 error_log
-rw-r--r--. 1 root root     27587 Jul 19 15:35 httpd.log
-rw-r--r--. 1 root root   1088471 Nov 30  2016 mod_cluster_log
-rw-r--r--. 1 root root 523400111 Aug 28 15:47 ssl_access_log
-rw-r--r--. 1 root root 414187690 Aug 28 15:47 ssl_error_log
-rw-r--r--. 1 root root         0 Oct 19  2016 ssl_request_log
-rw-r--r--. 1 root root   6434683 Aug 28 15:11 ssl_tws-si_access_log
-rw-r--r--. 1 root root  16177679 Aug 28 15:11 ssl_tws-si_error_log
y obviamente el gzip esta instalado...
Code:
rpm -aq |grep gzip
gzip-1.5-8.el7.x86_64
la version del logrotate es
Code:
logrotate --version
logrotate 3.8.6
los demas logs del sistema que estan en /var/log los rota sin problema.... solo me pasa con estos...

Alguna idea?

PD: Si esto es un redhat 7.2 ya que no es la pc de mi casa (gentoo)... sino un servidor del trabajo...
PD2: Haciendole un head a los archivos de log que quiero rotar... tienen información de hace varios meses atras...
Saludos
_________________
---------------------------------------
Gentoo >> Dell XPS M1530 - T8300 - 4gb - 8600gt 256
ubuntu + xp >> Athon 2000+xp - 1gb - 6600gt 128bt
dd-wrt v24 >> linksys wrt54gl v1.1
android 2.3 (Miui) >> Motorola Defy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum