[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Configuration of logging



Dear Nicolas,

Am 20.04.2018 um 09:22 schrieb Nicolas FOURNIALS:
> Le 18/04/2018 Ã 17:06, Oliver Freyermuth a ÃcritÂ:
>>> HTCondor doesnât have a way to automatically compress old log files. I suppose you could set up a cron job to do so.
>>>
>>> You can specify a time instead of a file size for when the daemon logs should be rotated, like so:
>>>
>>> # Save a dayâs worth of logs
>>> MAX_SCHEDD_LOG = 4Hr
>>> MAX_NUM_SCHEDD_LOG = 6
>>>
>>> See MAX_DEFAULT_LOG in the manual for details.
>> thanks, this is a valid workaround, indeed I did not know one could also specify a time instead of bytes there!
>>
>> However, my cronjob for compression would also need to:
>> - Check which files to compress (e.g. by matching all uncompressed files with date-extension).
>> - Take care by itself about expiring and deleting old logs.
> 
> The (undocumented?) option "LOG_TO_SYSLOG = true" can probably help to get a standard and system-backed logging behavior.
> 


wow - this is brilliant! 
With this, I get the logs to journald (as expected on CentOS 7) allowing me to watch them in chronological order, which really helps with debugging sometimes - 
and I can still filter by PID / Process Name as usual, with journalctl. In addition, the full "classic" logging infrastructure (/var/log/messages etc.) is used, with logrotate - 
and in case we finally set up the ELK stack (ElasticSearch, Logstash, Kibana) it will hugely simplify monitoring! 

Thanks a lot for digging out this parameter! Would really love it if the documentation would also mention that. 

Good to see HTCondor, even though it has a huge legacy and had two decades of time to adapt to the classic logrotate, still allows to make use of modern system-backed tools :-). 

All the best and cheers,
	Oliver

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature