Closed tuahk closed 9 years ago
Changes look good but I don't see where bluepill is logging for this service. I feel like we should set a default logging location by default for any init service that we handle and allow the user to configure if they prefer to log somewhere else. Runit currently logs to it's default runit location but perhaps we can standardize on logging to /var/log/prometheus/prometheus.log for all init styles?
Ok, by default bluepill uses syslog and logging location is in /var/log/bluepill.log. I could either change that location or use only log file as they did in nginx cookbook, any preference on this? Maybe all so make an attribute that defines logging location
@tuahk Yup probably makes sense to set stdout as it's done in nginx cookbook and yeah probably set up a log location attribute. The other init styles can be based on that attribute where needed.
process.stdout = process.stderr = "<%= node['prometheus']['log_dir'] %>/prometheus.log"
would work nicely.
Wow, I don't know what my night brain was thinking. I added directory resource for prometheus logs and added that line you suggested to pill.erb. I did remove log_file attribute from pill.erb so bluepill logs are in default location.
I added support and chefspecs for bluepill. I think this is a good structure where we could easily start adding more init options. It follows pretty closely nginx cookbook.
I all so moved flag generation in to libraries/prometheus_helper.rb