zhmcclient / zhmc-prometheus-exporter

A Prometheus exporter for the IBM Z HMC
Apache License 2.0
11 stars 8 forks source link

how to limit the log size #528

Open fulwang opened 1 week ago

fulwang commented 1 week ago

hello,

I'm running zhmc-prometheus-exporter inside a container managed by podman.

podman run -itd --rm -v /opt/zhmcexporter:/root/myconfig -p 9291:9291 --name zhmcexporter zhmcexporter:latest -c /root/myconfig/hmccreds.yaml -v

and just found the file "/var/lib/containers/storage/overlay-containers/a3365f0168372b863449f814d2dcff3dbdef0948f40913176925b6d4a74a9aaa/userdata/ctr.log" getting too large after several days, the biggest one is the ctr.log reched 40GB now. is there any method can control the log file size or rotate it?

[root@lpar27 userdata]# [root@lpar27 userdata]# ls -lh total 41G drwxr-xr-x 2 root root 6 Jun 24 18:44 artifacts srwx------ 1 root root 0 Jun 24 18:44 attach -rw-r--r-- 1 root root 12K Jun 24 18:44 config.json prw-r----- 1 root root 0 Jun 24 18:44 ctl -rw------- 1 root root 41G Jun 27 11:56 ctr.log drwxr-xr-x 2 root root 6 Jun 24 18:44 secrets drwxrwxrwt 2 root root 40 Jun 24 18:44 shm prw-r----- 1 root root 0 Jun 24 18:44 winsz [root@lpar27 userdata]#