daytonpa / node_exporter

Cookbook that installs and configures Prometheus Node Exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node_exporter

Author(s)


About

The cookbook installs/configures the Prometheus Node Exporter metrics collection service.


Usage

Simply add this cookbook within your run list, and have the chef-client run the default recipe. The default configuration for this cookbook will install Node Exporter v0.18.1 without overriding the default collectors. To update the desired metrics Collectors, go to the Attributes section of this README.


Attributes

The primary attributes to focus on are the following:

  • default['node_exporter']['version']: The desired version of the Node Exporter to install
    • Default is 0.18.1
  • default['node_exporter']['user']: The system user to run the Node Exporter service
    • Default is node_exporter
  • default['node_exporter']['group']: The system group to run the NodeExporter service
    • Default is node_exporter

There are additional attributes that can override the default settings for the Node Exporter service, as well as which Collectors to use for the service.

To modify the desired Node Exporter Collectors, modify the attribtues within default['node_exporter']['config']['collectors'].


Linting/Testing

Linting is performed with both Foodcritic and Cookstyle. Both are bundled within the ChefDK, and can be executed with the following commands:

Foodcritic

$ chef exec foodcritic .

Cookstyle

$ chef exec cookstyle -D .

Unit tests are performed with ChefSpec, and integration tests are performed via InSpec. Unit tests are stored within this cookbook, and the corresponding InSpec tests are saved within the node_exporter_inspec_profile repository.

When performing automated checks via GitHub Actions, the only supported CI processes at this time are Lint checks and Unit tests. Lint checks are performed for every Push action for this repository, and both Lint and Unit tests are performed for every Pull Request.

About

Cookbook that installs and configures Prometheus Node Exporter

License:Other


Languages

Language:Ruby 80.9%Language:Shell 16.2%Language:HTML 2.9%