This repository has been archived by the owner on Jul 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sam Kottler
committed
Jun 19, 2014
1 parent
322754a
commit 1014216
Showing
3 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,48 @@ | ||
gem_package "sensu-plugin" do | ||
gem_binary "/opt/sensu/embedded/bin/gem" | ||
gem_package 'sensu-plugin' do | ||
gem_binary '/opt/sensu/embedded/bin/gem' | ||
end | ||
|
||
package "nagios-plugins" | ||
package 'nagios-plugins' | ||
|
||
%w{ check-procs.rb }.each do |plugin| | ||
cookbook_file "/etc/sensu/plugins/#{plugin}" do | ||
source plugin | ||
path "/etc/sensu/plugins/#{plugin}" | ||
owner "sensu" | ||
group "sensu" | ||
mode "0755" | ||
owner 'sensu' | ||
group 'sensu' | ||
mode '0755' | ||
action :create | ||
end | ||
end | ||
|
||
sensu_check "check_procs" do | ||
command "/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb" | ||
handlers ["default", "slack"] | ||
subscribers ["all"] | ||
sensu_check 'check_procs' do | ||
command '/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb' | ||
handlers ['default', 'slack'] | ||
subscribers ['all'] | ||
interval 30 | ||
additional(:notification => 'There is a high number of procs running', :occurences => 3) | ||
end | ||
|
||
sensu_check "check_ssh" do | ||
command "/usr/lib/nagios/plugins/check_ssh localhost" | ||
handlers ["default", "slack"] | ||
subscribers ["all"] | ||
sensu_check 'check_ssh' do | ||
command '/usr/lib/nagios/plugins/check_ssh localhost' | ||
handlers ['default', 'slack'] | ||
subscribers ['all'] | ||
interval 30 | ||
additional(:notification => 'sshd is not running', :occurences => 3) | ||
end | ||
|
||
sensu_check "check_apt" do | ||
command "/usr/lib/nagios/plugins/check_apt" | ||
sensu_check 'check_apt' do | ||
command '/usr/lib/nagios/plugins/check_apt' | ||
handlers ['default', 'slack'] | ||
subscribers ['all'] | ||
interval 60 | ||
additional(:notification => 'There are pending package upgrades', :occurences => 3) | ||
end | ||
|
||
sensu_check 'check_ntp_time' do | ||
command '/usr/lib/nagios/plugins/check_ntp_time -H localhost' | ||
handlers ['default', 'slack'] | ||
subscribers ['all'] | ||
interval 30 | ||
additional(:notification => 'NTP is out of sync', :occurences => 3) | ||
end |