This cookbook downloads and installs scollector for bosun.
- Chef Client 11.x or better
- Centos 7+ with systemd
- Ubuntu 14.04. Probably works on Debian and may work on others
- runit (used on Debian/Ubuntu)
- golang
node['scollector']['host']
- Sets bosun server hostnode['scollector']['port']
- Sets bosun server portnode['scollector']['bin_path']
- Sets path to scollector executablenode['scollector']['conf_dir']
- Sets dir for scollector config dirnode['scollector']['log_dir']
- Sets dir for logs dirnode['scollector']['collectors_dir']
- Sets dir for external collectors (scollector runs all executables everyinterval
sec in collectors_dir/interval
/)node['scollector']['config_cookbook']
- Cookbook where template scollector.conf.erb is storednode['scollector']['tags']
- Tags to add to metrics, that scollector sends to bosun.node['scollector']['init_style']
- explicitly set the init system used. Options aresystemd
orrunit
. The default is to automatically infer it. Only CentOS 7+ is recognised so far; everything else defaults to runit.
This section describes the recipes in the cookbook and how to use them in your environment.
Includes the golang::packages
and scollector::configure
recipes by default.
Configures scollector.conf and:
- On CentOS 7+: installs systemd service for scollector and starts it
- Elsewhere: enables runit service for scollector and starts it
You can include scollector::default
in your company cookbook and redefine attributes there like
default['scollector']['host'] = '192.168.169.21'
default['scollector']['port'] = 8070
Or you can redefine it in your role or environment.
NOTE: Make sure that you are using golang cookbook from github (see Berksfile).
Kitchen tests via busser-serverspec:
cp contrib/kitchen.yml.sample .kitchen.yml
kitchen test
A sample .kitchen.yml
is included in the contrib/
tree.
- Author:: Tony Nyurkin (ptqa.mail@gmail.com)
- Author:: Alex Hewson (alex@mbird.biz)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.