Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


nrpe (47) Versions 4.0.14

Installs and configures Nagios NRPE client

cookbook 'nrpe', '= 4.0.14', :supermarket
cookbook 'nrpe', '= 4.0.14'
knife supermarket install nrpe
knife supermarket download nrpe
Quality 50%

nrpe cookbook

Cookbook Version
Build Status

Chef cookbook to install Nagios NRPE client (was previously part of the Nagios cookbook)


This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit or come chat with us on the Chef Community Slack in #sous-chefs.



Chef 15.3+


  • Debian
  • FreeBSD
  • Ubuntu
  • RHEL including CentOS and Oracle Linux
  • Amazon Linux (2.x cannot be installed via package)
  • Fedora
  • SUSE / openSUSE

Notes: This cookbook has been tested on the listed platforms. It may work on other platforms with or without modification.


  • yum-epel



Installs the NRPE client via packages or source depending on platform and attributes set


Configures the NRPE client. This will be called internally by the default recipe but can also be used to re-configure later on.


platform specific attributes (auto set based on platform)

  • node['nrpe']['install_method'] - whether to install from package or source. Default chosen by platform based on known packages available for NRPE: debian/ubuntu 'package', Redhat/CentOS/Fedora/Scientific: source
  • node['nrpe']['home'] - home directory of NRPE
  • node['nrpe']['ssl_lib_dir'] - ssl directory used by NRPE
  • node['nrpe']['pid_file'] - location to store the NRPE pid file
  • node['nrpe']['conf_dir'] - location of the nrpe configuration, default /etc/nagios
  • node['nrpe']['bin_dir'] - location of the nrpe binary, default /usr/sbin
  • node['nrpe']['packages'] - nrpe / plugin packages to install. The default attribute for RHEL/Fedora platforms contains a bare minimum set of packages. The full list of available packages is available at:
  • node['nrpe']['log_facility'] - log facility for nrpe configuration, default nil (not set)
  • node['nrpe']['plugin_dir'] - location where Monitoring plugins (aka Nagios plugins) go, default '/usr/lib/nagios/plugins'.

options for package install

  • Package manager node['nrpe']['package']['options'] - options when installing nrpe via package manager. The default value for this attribute is nil.`
  • EPEL repo node['nrpe']['install_yum-epel'] - whether to install the EPEL repo or not. The default value is true. Set this to false if you do not wish to install the EPEL RPM; in this scenario you will need to make the relevant NRPE packages available via another method e.g. local repo.

nrpe.conf attributes

  • Server port: node['nrpe']['server_port'] - the port nrpe will listen on, default 5666
  • Address: node['nrpe']['server_address'] - the IP the nrpe server will listen on. This allows you to bind to particular IPs in situations where the system has more than one IP. This is particularly handy in determining if nrpe should bind to the internal or public IP in a cloud environment. Set the attribute to the node attribute for the cloud interface you wish to use. Defaults to nil (not enabled)
  • node['nrpe']['log_facility'] - syslog facility to log to, default nil (not set)
  • node['nrpe']['command_prefix'] - command to prefix to every nrpe command (like perhaps sudo), default nil (not set)
  • node['nrpe']['debug'] - debug level nrpe configuration, default 0
  • node['nrpe']['connection_timeout'] - connection timeout for nrpe configuration, default nil (not set)
  • node['nrpe']['dont_blame_nrpe'] - allows the server to send additional values to NRPE via arguments. this needs to be enabled for most checks to function
  • node['nrpe']['command_timeout'] - the amount of time NRPE will wait for a command to execute before timing out
  • node['nrpe']['allow_bash_command_substitution'] - allows bash command substitution in your nrpe commands - defaults to nil

urls for source installations

  • node['nrpe']['url'] - url to retrieve NRPE source
  • node['nrpe']['version'] - version of NRPE source to download
  • node['nrpe']['checksum'] - checksum of the NRPE source tarball
  • node['nrpe']['plugins']['url'] - url to retrieve the plugins source from
  • node['nrpe']['plugins']['version'] - version of the plugins source to download
  • node['nrpe']['plugins']['checksum'] - checksum of the plugins source tarball

authorization and server discovery

  • node['nrpe']['server_role'] - the role that the Nagios server will have in its run list that the clients can search for.
  • node['nrpe']['allowed_hosts'] - additional hosts that are allowed to connect to this client. Must be an array of strings (i.e. %w( These hosts are added in addition to, ::1, and IPs that are found via search.
  • node['nrpe']['using_solo_search'] - discover server information in node data_bags even with chef solo through the use of solo-search (
  • node['nrpe']['multi_environment_monitoring'] - search for nagios servers in all environments not just that of the node when building the array of allowed hosts, default 'false'

user and group attributes

  • node['nrpe']['user'] - NRPE user, default 'nagios'.
  • node['nrpe']['group'] - NRPE group, default 'nagios'.



The check resource provides an easy way to add and remove NRPE checks from within cookbooks.


  • :add creates a NRPE configuration file and reloads the NRPE process. Default action.
  • :remove removes the configuration file and reloads the NRPE process

Attribute Parameters

  • command_name The name of the check. This is the command that you will call from your nagios_service data bag check
  • warning_condition String that you will pass to the command with the -w flag
  • critical_condition String that you will pass to the command with the -c flag
  • command The actual command to execute (including the path). If this is not specified, this will use #{node['nrpe' ['plugin_dir']}/command_name as the path to the command.
  • parameters Any additional parameters you wish to pass to the plugin.
  • template Use the specific erb template to render NRPE config command.


# Use resource to define check_load
nrpe_check "check_load" do
  command "#{node['nrpe']['plugin_dir']}/check_load"
  warning_condition '10'
  critical_condition '15'
  action :add
# Remove the check_load definition
nrpe_check "check_load" do
  action :remove

Using template:

nrpe_check "check_load" do
  template "check_load.cfg.erb"
  action :add


This project exists thanks to all the people who contribute.


Thank you to all our backers!


Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

CHANGELOG for nrpe

This file is used to list changes made in each version of nrpe

4.0.14 - 2023-09-29

4.0.13 - 2023-07-10

4.0.12 - 2023-06-08

Standardise files with files in sous-chefs/repo-management

4.0.11 - 2023-05-17

4.0.10 - 2023-05-03

4.0.9 - 2023-04-01

4.0.8 - 2023-03-22

  • Standardise files with files in sous-chefs/repo-management
  • Update overcommit
  • Update yamllint
  • Update Renovate config

4.0.7 - 2023-02-14

  • Standardise files with files in sous-chefs/repo-management

4.0.6 - 2023-02-14

  • Standardise files with files in sous-chefs/repo-management

4.0.5 - 2023-02-14

  • Standardise files with files in sous-chefs/repo-management

4.0.4 - 2022-02-08

  • Remove delivery folder

4.0.3 - 2022-02-01

  • Update tested platforms

4.0.2 - 2022-01-25

  • Cookstyle fixes

4.0.1 - 2021-08-30

  • Standardise files with files in sous-chefs/repo-management

4.0.0 - 2021-07-21

  • Enable unified_mode for Chef 17 compatibility
  • Bump minimum Chef version to 15.3

3.0.1 (2020-05-05)

  • Add bin_dir to nrpe version check

3.0.0 (2020-01-26)

  • Require Chef Infra Client 14 or later
  • Fix failing openSUSE source installs by adding gzip as a dependency package
  • Better check for systemd platforms
  • Don't rely on the build-essential cookbook now that build_essential resource is built-in
  • Resolve all the latest cookstyle warnings
  • Update .gitignore and chefignore files to newer versions
  • Move the test cookbook into an integration group in the Berksfile
  • Move the template files out of the templates/default directory and just put them in templates/
  • Remove the .foodcritic that was no longer needed as all rules pass
  • Remove the Gemfile that was used to install stove which is part of Chef DK and Workstation now
  • Add the latest platforms the kitchen configs

2.1.0 (2019-10-31)

  • Remove windows references and use Chef defaults for file and template resources
  • Update checks for node['platform_family'] to handle amazon
  • Respect NRPE version attribute
  • Update NRPE version for source installs to 3.2.1
  • Systemd tmpfiles config updated to create the nrpe directory in the run directories for the configured pid directory
  • Removed the unnecessary long_description metadata in metadata.rb
  • Updated platform checks to use platform? and platform_family? everywhere
  • Removed if respond_to checks in metadata.rb
  • Simplified ChefSpecs to avoid the need to update them for new platform releases

2.0.5 (2018-12-14)

  • Backport systemd unit from the package install to the cookbook

2.0.4 (2018-12-14)

  • Allow Windows users to use the nrpe_check resource

2.0.3 (2018-02-18)

  • Allow IPv6 localhost ::1

2.0.2 (2017-07-13)

  • Fix broken template

2.0.1 (2017-07-13)

  • Allow option to disable PID file as it's not needed by systemd and causes issues with SELinux at this time

2.0.0 (2017-03-03)

  • Convert the check LWRP to a custom resource with simplified restart logic. This increases the requirement of Chef to 12.9 or later
  • Add support for package installs on openSUSE Leap
  • Update RHEL platforms to use the nrpe user and pid file defined in the package
  • Remove logic which built node['nrpe']['checks'] as it broke on modern Chef clients
  • Added Chefspec matchers for the check resource
  • Use multi-package installs to speed up package installs
  • Simplify the Fedora check in the attributes file
  • Rework test kitchen testing and test the check resource in Travis
  • Switch from testing in Rake to Delivery local mode

1.6.4 (2016-09-07)

  • Only restart NRPE at the end of the chef-run

1.6.3 (2016-08-12)

  • Updated cookbook to support nrpe 3.0 using source install method
  • Added ability to define node['nrpe']['bin_dir'] default to /usr/sbin
  • Removed duplicate line from for node['nrpe']['conf_dir'] attribute

1.6.2 (2016-08-12)

  • Fixing service reload/restart issue
  • Fixing the use_inline_resources error on chef 12 client

1.6.0 (2016-07-21)

  • Added support for openSUSE via source install
  • Added chef_version to the metadata
  • Updated the monitoring plugins to 2.1.2 for source installs
  • Fixed user/group creation in the source recipe, which would fail chef runs
  • Fixed source installs for systemd based distros by properly managing the unit file
  • Resolved a scenario where the NRPE compilation could fail and never run again
  • Ensured we run the NRPE process using our attribute defined user/group in the source recipe
  • Ensured NRPE is compiled into /usr/sbin not /usr/bin so init / systemd files work
  • Require Chef 11. Chef 10 is end of life moving to Chef 11 allows us to remove Ruby 1.8.7 backwards compatibility
  • Removed support for Fedora < 17
  • Enabled caching the Chefspecs to speedup runs 3.5X
  • Removed make from source installs as build-essential already handles this
  • Added a Rakefile for simplified testing
  • Disabled FC003 with a .foodcritic file
  • Removed the Vagrantfile as we already have a Kitchen file
  • Switched from Rubocop to Cookstyle and resolve all warnings
  • Added yum to the Berksfile for integration testing
  • Removed chef-solo-search from the Berksfile as we don't need this for testing -


  • Documentation fix for pid_file attribute
  • Make sure that systemd unit file matches the nrpe user attribute


  • Add template support for config files
  • Remove node.set in default recipe (Issue #27)


  • Fedora 20+ / RHEL 7+ systems now run the daemon as nrpe/nrpe since the user installed by the package changed
  • Fedora 20+ / RHEL 7+ systems now restart on check updates since the systemd scipt doesn't include a reload action
  • Removed the retry count for starting the NRPE service, which didn't fix the real issue on RHEL 7+


  • Added 3 retries with a delay of 3 to the nrpe service start for RHEL/CentOS 7
  • Added ability to define node['nrpe']['packages'] as a Hash to add version information as sample below. In your environment specific cookbook, this version infomation for each individual package can be overriden for required versions (instead of latest one). If it is nil it will install latest one from repositories.

Sample: default['nrpe']['packages'] = { 'nagios-nrpe-server' => {'version' => nil}, 'nagios-plugins' => {'version' => nil}, 'nagios-plugins-basic' => {'version' => nil}, 'nagios-plugins-standard' => {'version' => nil} }

For backward compatibiility, it will also install packages if it is defined as an array in your env specific cookbook.


  • Added default['nrpe']['checks'] to store all checks as a node attribute
  • Removed Ruby 1.9.3 and added Ruby 2.2.0 to Travis
  • Make the yum-epel recipe optional with default['nrpe']['install_yum-epel']


  • Add support for CentOS / RHEL
  • Update the LWRP to use the default action functionality introduced in Chef 0.10.10


  • Rubocop fixes
  • Remove .DS_Store files in the supermarket file that caused failures on older versions of Berkshelf
  • Remove strainer gem from Gemfile


  • Update specs to Chefspec 4.1
  • Add additional platforms to the Vagrantfile
  • Fix a compile error / logic error when running on Fedora


  • Add a chefignore file so that Berkshelf wont fail on dsstore files


  • NRPE running on a Nagios server would not enable polling from other Nagios servers


  • Update from nagios-plugins to monitoring-plugins in source installs since the project name changed
  • Update nagios-plugins 1.5 to 2.0 for source installs
  • Reorder the attributes so that FreeBSD has log_facility properly set
  • Add additional specs and update specs to the latest Debian / FreeBSD releases
  • Update Berkshelf to 3.1.X and update the Berksfile to the new format


  • Source lsb init-functions in the init script on Ubuntu source installs so the service doesn't start every run
  • Added new attribute node['nrpe']['allow_bash_command_substitution'] to allow using the allow_bash_command_substitution config option
  • When searching the the monitoring role search for roles vs. role so the monitoring role can be nested on the run_list
  • Sort and Unique the array of allowed monitor hosts. This prevents NRPE from restarting on every run when the results come back in a different order
  • Fix deprecated warning when running specs


  • Add status / reload commands to the init script for source installs resolving issues with the service on source installs
  • Add new node['nrpe']['package']['options'] attribute for adding install options to the package install
  • Add Ubuntu 14.04 to the Test Kitchen config and remove Ubuntu 13.04
  • Add source install suite to Test Kitchen


  • Include an example base monitoring recipe with base NRPE checks defined
  • Fix the LWRP example in the Readme to reflect the current state of the cookbook


  • Added a server_address attribute to allow binding NRPE to the IP of a specific interface
  • Added a server_port attribute to allow changing the NRPE port
  • Added a command_prefix attribute to allow prefixing all commands with another command such as sudo
  • Minor fixes to the readme


  • Reload NRPE instead of restarting it when a new check is added
  • Fix log_facility in the NRPE config to write out on its own line vs clobbering the config


  • Expanded the chefspecs to multiple platforms and install methods
  • Fixed a bug where the plugin dir wasn't defined for RHEL platforms causing source install failures


  • Add chefspecs
  • Fix test kitchen setup on FreeBSD
  • Lint fixes with Rubocop
  • Nagios plugin_dir for Debian/Ubuntu was incorrect. Should always be /usr/lib/nagios/plugins regardless of CPU arch
  • Update readme to remove several references to the old Nagios cookbook


  • Initial release of the cookbook with client functionality split from the existing nagios cookbook

Collaborator Number Metric

4.0.14 passed this metric

Contributing File Metric

4.0.14 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, and your repo must contain a file

Cookstyle Metric

4.0.14 passed this metric

No Binaries Metric

4.0.14 passed this metric

Testing File Metric

4.0.14 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, and your repo must contain a file

Version Tag Metric

4.0.14 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, and your repo must include a tag that matches this cookbook version number