From 7f954466ace41c9044b3c75e69ae47c65a99142a Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Sat, 8 Sep 2012 21:16:39 +0100 Subject: [PATCH] Minor fixes --- scripts/freeradius.monit | 11 +++++++++-- scripts/{logrotate.freeradius.in => logrotate.freeradius} | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) rename scripts/{logrotate.freeradius.in => logrotate.freeradius} (64%) diff --git a/scripts/freeradius.monit b/scripts/freeradius.monit index 5cfea16..96433d6 100644 --- a/scripts/freeradius.monit +++ b/scripts/freeradius.monit @@ -3,9 +3,16 @@ # # http://mmonit.com/monit/ # -check process radiusd with pidfile /var/named/chroot/var/run/radiusd/radiusd.pid + +# +# Totalmem limit should be lowered to 200.0 if none of the +# interpreted language modules or rlm_cache are being used. +# +check process radiusd with pidfile /var/run/radiusd/radiusd.pid start program = "/etc/init.d/radiusd start" stop program = "/etc/init.d/radiusd stop" if failed host 127.0.0.1 port 1812 type udp protocol radius secret testing123 then alert - if failed host 127.0.0.1 port 1812 type udp protocol radius secret testing123 then alert + if failed host 127.0.0.1 port 1813 type udp protocol radius secret testing123 then alert + if cpu > 95% for 2 cycles then alert + if totalmem > 1024.0 MB for 5 cycles then restart if 5 restarts within 5 cycles then timeout diff --git a/scripts/logrotate.freeradius.in b/scripts/logrotate.freeradius similarity index 64% rename from scripts/logrotate.freeradius.in rename to scripts/logrotate.freeradius index a54df0e..8bb9280 100644 --- a/scripts/logrotate.freeradius.in +++ b/scripts/logrotate.freeradius @@ -3,7 +3,7 @@ # # It needs to be edited for your local configuration. # -@localstatedir@/log/radius/radius.log { +/var/log/radius/radius.log { daily rotate 14 compress @@ -11,6 +11,6 @@ missingok notifempty postrotate - kill -HUP `cat @localstatedir@/run/radiusd.pid` > /dev/null 2>&1 + kill -HUP `cat /var/run/radiusd.pid` > /dev/null 2>&1 endscript } -- 2.1.4