elijah / chef-prometheus

Chef cookbook for Prometheus. The open source service monitoring system and time-series database.
Apache License 2.0
52 stars 93 forks source link

Init options #14

Closed tuahk closed 9 years ago

tuahk commented 9 years ago

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

rayrod2030 commented 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?

tuahk commented 9 years ago

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

rayrod2030 commented 9 years ago

@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.

rayrod2030 commented 9 years ago

process.stdout = process.stderr = "<%= node['prometheus']['log_dir'] %>/prometheus.log" would work nicely.

tuahk commented 9 years ago

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.