nagios ejabberd check via ruby
Below is an example of using Ruby and xmpp4r to check ejabberd’s status from within nagios
You’ll need to define the below nagios command within you nagios config file and then include the below ruby.
define command {
command_name check_xmpp
command_line ruby /opt/nagios/plugins/check_xmpp.rb --hostname $HOSTADDRESS$ --jid username@domain.com --password password
}
Here is the ruby example