2017-11-08 5 views
1

私はlog rotateを使っていますが、私のaerospikeの設定である90日後に何らかのログが消去されていません。また、ログは指数関数的に増加しています。 logrotateののaerospikeでログをパージする方法は?

構成:エアロスパイクの

/var/log/aerospike/aerospike.log { 
    daily 
    rotate 90 
    dateext 
    compress 
    olddir /var/log/aerospike/ 
    postrotate 
     kill -HUP `cat /var/run/aerospike/asd.pid` 
    endscript } 

構成:デフォルトでSYSVを使用するディストリビューションにlogrotateのスクリプトと

logging { 
     file /var/log/aerospike/aerospike.log { 

       context any info 

       context migrate debug 

     } 
} 

ls -ltr on /var/log/aerospike

答えて

4

エアロスパイク出荷されます。

デフォルトでsystemdを使用するディストリビューションでは、logrotateスクリプトがパッケージに含まれないようにjournaldを使用すると見なされます。

出荷logrotateのスクリプトは、ここで見つけることができます:

  1. https://github.com/aerospike/aerospike-server/blob/master/as/etc/logrotate_asd
  2. https://github.com/aerospike/aerospike-server/blob/master/as/etc/logrotate_telemetry
1

もエアロスパイクページからログローテートコンフィギュレーションガイドを参照してください。

https://www.aerospike.com/docs/operations/configure/log/logrotate.html

そして、エラーメッセージに対して冗長フラグを付けてlogrotateを手動で実行してみてください。

cat /var/lib/logrotate.status 

/var/log/aerospike/aerospike.log { 
    daily 
    rotate 90 
    dateext 
    compress 
    olddir /var/log/aerospike/ 
    postrotate 
     /bin/kill -HUP `pidof asd` 
    endscript 
} 

はまた、追加情報については、ステータスファイルを確認してください。

sudo logrotate -f -v /etc/logrotate.d/aerospike 

回転ディレクティブは、あなたの設定で90日後にパージする必要があります

関連する問題