# $Id$

allowed_hosts=<%= node['nagios']['nrpe']['allowed_hosts'] %>

command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w <%= node['nagios']['nrpe']['check_total_procs']['warn'] %> -c <%= node['nagios']['nrpe']['check_total_procs']['crit'] %>
command[check_memory]=/usr/lib/nagios/plugins/check_memory

command[check_apt]=/usr/lib/nagios/plugins/check_apt

# Disk
<%
(0..3).each {|num|
  target = node['nagios']['nrpe']["check_disk#{num}"]
-%>
command[check_disk<%= num %>]=/usr/lib/nagios/plugins/check_disk -w <%= target['warn'] %> -c <%= target['crit']%> -p <%= target['path'] %> <%= target['extra_opts'] %>
<%
}
-%>
<%
(0..3).each {|num|
  target = node['nagios']['nrpe']["check_smart#{num}"]
-%>
command[check_smart<%= num %>]=sudo /usr/lib/nagios/plugins/check_ide_smart -n -d <%= target['device'] %>
<%
}
-%>
command[check_smart_devs]=sudo /usr/lib/nagios/plugins/check_smart.pl -g '/dev/sd[a-c]' -i scsi

# DNS lookup
<%
dig = node['nagios']['nrpe']['check_dig']
dig_in = node['nagios']['nrpe']['check_dig_in']
dig_ex = node['nagios']['nrpe']['check_dig_ex']
-%>
command[check_dig]=/usr/lib/nagios/plugins/check_dig -H <%= dig['host'] %> -l <%= dig['lookup'] %>
command[check_dig_in]=/usr/lib/nagios/plugins/check_dig -H <%= dig_in['host'] %> -l <%= dig_in['lookup'] %>
command[check_dig_ex]=/usr/lib/nagios/plugins/check_dig -H <%= dig_ex['host'] %> -l <%= dig_ex['lookup'] %>

# APC
command[check_apc_status]=/usr/lib/nagios/plugins/check_apc status
command[check_apc_load]=/usr/lib/nagios/plugins/check_apc load 75 85
command[check_apc_bcharge]=/usr/lib/nagios/plugins/check_apc bcharge 60 40
command[check_apc_time]=/usr/lib/nagios/plugins/check_apc time 10 5

# Local messages logs
command[check_logs]=/usr/lib/nagios/plugins/check_logs.pl -c /etc/nagios/check_logs/check_logs.cfg

# Local Mail Queue
command[check_mailq_exim]=sudo /usr/lib/nagios/plugins/check_mailq -w 5 -c 10 -M exim
command[check_mailq_postfix]=/usr/lib/nagios/plugins/check_mailq -w 5 -c 10 -M postfix
command[check_mailq_qmail]=/usr/lib/nagios/plugins/check_mailq -w 5 -c 10 -M qmail
command[check_mailq_sendmail]=/usr/lib/nagios/plugins/check_mailq -w 5 -c 10 -M sendmail

# Local MySQL
command[check_mysql_heartbeat]=/usr/lib/nagios/plugins/check_mysql_heartbeat.pl -H localhost -w 60 -c 90

# Local JBoss
#command[check_jboss_freemem]=/usr/lib/nagios/plugins/check_jbossjmx localhost 4 "jboss.system:type=ServerInfo" FreeMemory 33554432 16777216 -r
#command[check_jboss_freemem]=/usr/lib/nagios/plugins/negate /usr/lib/nagios/plugins/check_jbossjmx localhost 4 "jboss.system:type=ServerInfo" FreeMemory 134217728 16777216
#command[check_jboss_jk_curthread]=/usr/lib/nagios/plugins/check_jbossjmx localhost 4 "jboss.web:name=jk-127.0.0.1-8009,type=ThreadPool" currentThreadCount 100 200
#command[check_jboss_ds_conn1]=/usr/lib/nagios/plugins/check_jbossjmx localhost 4 "jboss.jca:name=env/jdbc/accountbook,service=ManagedConnectionPool" InUseConnectionCount 50 90
#command[check_jboss_ds_conn2]=/usr/lib/nagios/plugins/check_jbossjmx localhost 4 "jboss.jca:name=env/jdbc/accountbook,service=ManagedConnectionPool" InUseConnectionCount 50 90
command[check_jboss_logs]=/usr/lib/nagios/plugins/check_logs.pl -c /etc/nagios/check_logs/jboss_check_logs.cfg

