Created
October 27, 2014 16:16
-
-
Save skihero/22078090a6b0cd31edb3 to your computer and use it in GitHub Desktop.
add or remove an nrpecheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
examples $ cat base_monitoring.rb | |
# | |
# Cookbook Name:: monitoring | |
# Recipe:: base_monitoring | |
# | |
# Copyright 2013, Example Company, Inc. | |
# | |
# This recipe defines the necessary NRPE commands for base system monitoring | |
# in Example Company Inc's Chef environment. | |
# Check for high load. This check defines warning levels and attributes | |
nagios_nrpecheck 'check_load' do | |
command "#{node['nagios']['plugin_dir']}/check_load" | |
warning_condition '6' | |
critical_condition '10' | |
action :add | |
end | |
# Check all non-NFS/tmp-fs disks. | |
nagios_nrpecheck 'check_all_disks' do | |
command "#{node['nagios']['plugin_dir']}/check_disk" | |
warning_condition '8%' | |
critical_condition '5%' | |
parameters '-A -x /dev/shm -X nfs -i /boot' | |
action :add | |
end | |
# Check for excessive users. This command relies on the service definition to | |
# define what the warning/critical levels and attributes are | |
nagios_nrpecheck 'check_users' do | |
command "#{node['nagios']['plugin_dir']}/check_users" | |
action :add | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment