cookbook 'netdata', '~> 0.4.1'
netdata (15) Versions 0.4.1 Follow6
Compile, install and configure netdata
cookbook 'netdata', '~> 0.4.1', :supermarket
knife supermarket install netdata
knife supermarket download netdata
NetData Cookbook
This cookbook provides a way to download, install and configure NetData
from FireHol, a real-time performance monitoring.
Live demo: http://netdata.firehol.org
Github: https://github.com/firehol/netdata
Requirements
Platforms
- Amazon Linux 2013.09+
- Centos 6.7+
- Debian 7.11+
- Fedora 25+
- Ubuntu 14.04+
Chef
- Chef 12.6+
Cookbooks
- yum-epel
- apt
Usage
This cookbook implements resources to install NetData and manage its
configuration files.
Recipies
default
Installs NetData using the netdata_install resource with default parameters.
install_netdata
Deprecated, please use default recipe or netdata_install resource.
Resources
netdata_install
Installs NetData from source or binary on supported platforms (default: source).
netdata_install 'default' do install_method 'source' git_repository 'https://github.com/firehol/netdata.git' git_revision 'master' git_source_directory '/tmp/netdata' autoupdate true update true end
-
install_method
- Installation method. -
git_repository
- Location of git repository to pull the NetData source. -
git_revision
- Tag/Branch/Commit to checkout. -
git_source_directory
- Location to sync the repository to on the server. -
install_path
- Change the location where NetData is installed. -
autoupdate
- Allow NetData to autoupdate itself via a cron entry. -
update
- Allow chef-client to update NetData if it is already installed (note: use 'true' to update NetData on every chef-client run, 'false' is the default value).
It's highly recommended to use a different path than /tmp/netdata
for git_source_directory
and in future versions the default path will change. This is encouraged because when autoupdate
is set to true NetData will create a symbolic link from the source directory to cron.d and you don't want NetData to create a symbolic link to anything in /tmp
netdata_install 'optional' do install_method 'binary' binary_repository 'https://raw.githubusercontent.com/firehol/binary-packages/master' binary_package 'netdata-latest.gz.run' binary_install_options([ '--accept' ]) binary_post_install_options([ '--dont-start-it' ]) end
-
install_method
- Installation method. -
binary_repository
- Location of the repository for binary packages. -
binary_package
- The binary package to be installed (note: 'netdata-latest.gz.run' is the default value that updates NetData on every chef-client run). -
binary_install_options
- Array of options to pass to the binary package installation script ('--accept' is required for automated installation). -
binary_post_install_options
- Array of options to pass to the binary package post installation script.
This resource will create a file /opt/netdata/version.txt
with the filename of the binary package installed.
netdata_config
Manages the main netdata.conf file. Call this as many times as needed.
Each name should be unique. (i.e. web, global)
netdata_config 'web' do owner 'netdata' group 'netdata' base_directory '/etc' configurations( 'bind to' => 'localhost' ) end
Resulting file content (/etc/netdata/netdata.conf):
[web] bind to = localhost
-
owner
- User to own the file -
group
- Group to own the file -
base_directory
- Parent folder that holds the NetData configuration files. -
configurations
- Hash of key, value pairs for customizing NetData.
This resource will restart the NetData service automatically.
netdata_stream
Manages stream.conf file. Call this as many times as needed.
Resource names could be either 'stream' or "#{api_key}" and "#{machine_guid}" depending on whether you configure slave or master NetData.
Name 'stream' should be used only once to configure slave NetData.
Values for api_key and machine_guid should be unique.
netdata_stream 'stream' do owner 'netdata' group 'netdata' base_directory "#{install_path}/netdata" configurations( 'enabled' => 'yes', 'destination' => 'netdata_master:19999', 'api key' => '11111111-2222-3333-4444-555555555555' ) end
Resulting file content ("#{install_path}/netdata/etc/netdata/stream.conf"):
[stream] enabled = yes destination = netdata_master:19999 api key = 11111111-2222-3333-4444-555555555555
-
owner
- User to own the file -
group
- Group to own the file -
base_directory
- Parent folder where the NetData has been installed to (should be "#{install_path}/netdata" ifinstall_path
was used in netdata_install resource, otherwise should not be used). -
configurations
- Hash of key, value pairs for customizing NetData stream configuration.
This resource will restart the NetData service automatically.
netdata_python_plugin
Manages python plugin configuration files.
netdata_python_plugin 'mysql' do owner 'netdata' group 'netdata' base_directory '/etc' global_configuration( 'retries' => 5 ) jobs( 'tcp' => { 'name' => 'local', 'host' => 'localhost', 'port' => 3306 } ) end
Resulting file content (/etc/netdata/python.d/mysql.conf):
# GLOBAL retries: 5 # JOBS tcp: name: local host: localhost port: 3306
-
owner
- User to own the file -
group
- Group to own the file -
base_directory
- Parent folder that holds the NetData configuration files. -
global_configuration
- Hash of global variables for the plugin. -
jobs
- Hash of jobs that tell NetData to pull statistics from.
This resource will restart the NetData service automatically.
netdata_statsd_plugin
Manages statsd plugin configuration files.
netdata_statsd_plugin 'your_app' do owner 'netdata' group 'netdata' base_directory '' app_configuration( 'name' => 'your_app', 'metrics' => 'metrics to match' ) charts( 'heap' => { 'name' => 'heap', 'title' => 'Heap Memory', 'dimension' => 'app.memory.heap.used used last 1 1000000' } ) end
Resulting file content (/etc/netdata/statsd.d/your_app.conf):
# APP [app] name = your_app metrics = metrics to match # CHARTS [heap] name = heap title = Heap Memory dimension = app.memory.heap.used used last 1 1000000
-
owner
- User to own the file -
group
- Group to own the file -
base_directory
- Parent folder that holds the NetData configuration files. -
app_configuration
- Hash with the application configuration. -
charts
- Hash of each specific chart configuration.
netdata_bind_rndc_conf
Deprecated, please use netdata_python_plugin
netdata_nginx_conf
Deprecated, please use netdata_python_plugin
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and Authors
Authors:
* Sergio Pena https://github.com/sergiopena
* João Madureira https://github.com/jmadureira
* Nick Willever https://github.com/nictrix
Dependent cookbooks
yum-epel < 3.0.0 |
apt < 7.0.0 |
compat_resource ~> 12.19.1 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
netdata CHANGELOG
This file is used to list changes made in each version of the netdata cookbook.
0.1.0
- Sergio Pena - Initial release of netdata
0.1.1
- Sergio Pena - Add tests and kitchen specs
0.1.2
- Sergio Pena - Add Ubuntu deps and tests.
0.1.4
- João Madureira - Do not run install if there are no changes in git repo
0.2.0
- Nick Willever - Change install to a resource - Create new generic resource for all python.d plugins - Deprecated netdata_bind_rndc_conf resource - Deprecated netdata_nginx_conf resource - Deprecate use of attributes - Deprecate use of default and install_netdata recipes - Convert to inspec for test-kitchen verifier framework
0.3.0
- Serge A. Salamanka - add update property - add netdata_stream resource
0.3.1
- Serge A. Salamanka - use cookbook dependencies with all tested major version numbers
0.4.0
- João Madureira - Support for statsd plugin configuration
- Serge A. Salamanka - Support for binary installation
Collaborator Number Metric
0.4.1 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.1 failed this metric
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:27
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:28
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:30
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:31
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:32
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:33
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:34
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.1 passed this metric
Testing File Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.1 failed this metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.1 failed this metric
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:27
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:28
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:30
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:31
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:32
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:33
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:34
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.1 passed this metric
Testing File Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.1 failed this metric
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/bind_rndc_conf.rb:27
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_config.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:28
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:30
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:31
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:32
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:33
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_install.rb:34
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_python_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_statsd_plugin.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:24
FC117: Do not use kind_of in custom resource properties: netdata/resources/netdata_stream.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:23
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:25
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:26
FC117: Do not use kind_of in custom resource properties: netdata/resources/nginx_conf.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.4.1 passed this metric
Testing File Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.1 failed this metric
0.4.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number