add monit::clamdcheck
1 parent 7ed0c72 commit d02191508ec62ed87e75ea68e67dafa661a7201e
@Andreas Jaggi Andreas Jaggi authored on 28 Feb 2013
Showing 2 changed files
View
11
manifests/monit.pp
require => File['/etc/monit/conf.d'],
}
}
 
define monit::clamdcheck ($clamd_port=3310, $clamd_ips=[]) {
file { "/etc/monit/conf.d/$name":
mode => 600,
owner => root,
group => root,
content => template("/etc/puppet/modules/monit/templates/clamd.erb"),
notify => Service['monit'],
require => File['/etc/monit/conf.d'],
}
}
View
11
templates/clamd.erb 0 → 100644
#
# automatically generated by puppet for <%= fqdn %>, DO NOT MODIFY!
#
check process clamd with pidfile /var/run/clamav/clamd.pid
start program = "/etc/inid.d/clamav-daemon start"
stop program = "/etc/inid.d/clamav-daemon stop"
if failed host 127.0.0.1 port <%= clamd_port %> protocol CLAMAV for 5 cycle then restart
<% clamd_ips.each do |clamd_ip| -%>
if failed host <%= clamd_ip %> port <%= clamd_port %> protocol CLAMAV for 5 cycle then restart
<%- end %>