diff options
author | Micah Anderson <micah@riseup.net> | 2012-09-25 16:27:37 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2012-09-25 16:27:37 -0400 |
commit | 16e77b3a8b257dafcf059bfcebc095178995fda5 (patch) | |
tree | 2673fa226de03b0be14ceef4df64140372643ea6 /files | |
parent | ad1f714b06faf229ec1b0f310e81c425a6906581 (diff) | |
parent | eafb4c73ee82915bf83eac01bb26265c531a68e2 (diff) |
Merge branch 'merge_immerda'
Conflicts:
manifests/apache.pp
this conflict was just a indentation difference.
Diffstat (limited to 'files')
-rw-r--r-- | files/nrpe/nrpe_commands.cfg | 1 | ||||
-rw-r--r-- | files/plugins/check_jabber_login | 30 |
2 files changed, 30 insertions, 1 deletions
diff --git a/files/nrpe/nrpe_commands.cfg b/files/nrpe/nrpe_commands.cfg index 1a26cc3..b725a36 100644 --- a/files/nrpe/nrpe_commands.cfg +++ b/files/nrpe/nrpe_commands.cfg @@ -1,6 +1,5 @@ # default plugins command[check_users]=/usr/lib/nagios/plugins/check_users $ARG1$ -command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$ command[check_disk]=/usr/lib/nagios/plugins/check_disk $ARG1$ -x "/dev" -x "/dev/shm" -x "/lib/init/rw" command[check_apt]=sudo /usr/lib/nagios/plugins/check_apt -u $ARG1$ command[check_swap]=/usr/lib/nagios/plugins/check_swap $ARG1$ diff --git a/files/plugins/check_jabber_login b/files/plugins/check_jabber_login new file mode 100644 index 0000000..dac0e1f --- /dev/null +++ b/files/plugins/check_jabber_login @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +require 'rubygems' +require 'xmpp4r' + + +def usage + puts "#{$0} jabberid password" + exit 3 +end + +usage unless ARGV.size == 2 + +begin + my_client = Jabber::Client.new(ARGV[0]) + my_client.connect + my_client.auth(ARGV[1]) +rescue Jabber::ClientAuthenticationFailure => detail + puts "CRITICAL: Login Error" + exit 2 +rescue Errno::ECONNREFUSED => detail + puts "CRITICAL: Connection refused" + exit 2 +rescue SocketError => detail + puts "CRITICAL: Socket Error" + exit 2 +#rescue +# puts "CRITICAL: Unknown Error" +# exit 2 +end +puts "OK: Login for #{ARGV[0]} successfull" |