Open zhihuiFan opened 6 years ago
Prometheus exporters do not generate logs normally, what log do you want to configure & rotate?
The logs of mongodb, sometime it may take a lot of spaces
Prometheus exporters expose metrics, they do not manage log files
OP probably refers to all the stuff accumulating at /var/log/prometheus in the form prometheus-mongodb-exporter.MACHINE.TIMESTAMP. Those log files are generated by prometheus-mongodb-exporter and by default they take a lot of disk space.
I agree that it would be nice to have a procedure allowing the user to rotate those logs.
my log file is named like mongodb_exporter.ip-10-72-229-205.ec2-user.log.INFO.20180502-212317.24179.
How to change the log level to others than INFO?
OP probably refers to all the stuff accumulating at /var/log/prometheus in the form prometheus-mongodb-exporter.MACHINE.TIMESTAMP. Those log files are generated by prometheus-mongodb-exporter and by default they take a lot of disk space.
I agree that it would be nice to have a procedure allowing the user to rotate those logs.
Yeah, I'd like to know what and how generates those files. The largest one I have is aroung 350 MB and others are no less than 80 MB. Would be cool if there is some way to rotate/compress/purge old those file.
You can configure glog to log to stderr -logtostderr=true
or log to another dir -log_dir="<ANOTHER_DIR>"
to avoid filling up disk space. I need to redirect logs for long running containers.
More documentation for glog: https://godoc.org/github.com/golang/glog
Hi @dcu Currently I'm using mongodb_expoerter in my environment, and I don't want to install too many agents. Now I want a feature to a different url path.
I know it is not part of Prometheus agent, so I want to know if it is welcome to send such PR to this repo. Personally, I do want add it.
Thanks