case $operatingsystem {
default: { include ejabberd::base }
}
+ if $use_nagios {
+ include ejabberd::nagios
+ }
+
+ if $use_munin {
+ include ejabberd::munin
+ }
}
class ejabberd::base {
hasstatus => true, #fixme!
require => Package[ejabberd],
}
-
- if $use_munin {
- include ejabberd::munin
- }
}
--- /dev/null
+# manifests/nagios.pp
+
+class jabber::nagios {
+ case $jabber_nagios_domain {
+ '': { $jabber_nagios_domain = $fqdn }
+ }
+ nagios::service{ "jabber_${fqdn}": check_command => "check_jabber!${jabber_nagios_domain}" }
+
+ case $jabber_nagios_user {
+ '': { $jabber_nagios_user = 'nagios' }
+ }
+
+ case $jabber_nagios_pwd {
+ '': { info("no \$jabber_nagios_pwd supplied for ${fqdn}! Can't test jabber login") }
+ default: {
+ nagios::service{ "jabber_${fqdn}": check_command => "check_jabber_login!${jabber_nagios_user}@${jabber_nagios_domain}!${jabber_nagios_pwd}" }
+ }
+ }
+}