From: <abe...@us...> - 2014-12-20 00:19:56
|
Revision: 6864 http://sourceforge.net/p/astlinux/code/6864 Author: abelbeck Date: 2014-12-20 00:19:36 +0000 (Sat, 20 Dec 2014) Log Message: ----------- monit, add default AstLinux specific monit.d/services config file Modified Paths: -------------- branches/1.0/package/monit/monit.mk Added Paths: ----------- branches/1.0/package/monit/monit.services Modified: branches/1.0/package/monit/monit.mk =================================================================== --- branches/1.0/package/monit/monit.mk 2014-12-19 17:14:04 UTC (rev 6863) +++ branches/1.0/package/monit/monit.mk 2014-12-20 00:19:36 UTC (rev 6864) @@ -33,10 +33,7 @@ define MONIT_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/monit $(TARGET_DIR)/usr/sbin/monit - $(INSTALL) -m 0600 -D $(@D)/monitrc $(TARGET_DIR)/stat/etc/monit/monit.d/services - $(SED) '1,/^## Services/ d' \ - -e '/^## Includes/,$$ d' \ - $(TARGET_DIR)/stat/etc/monit/monit.d/services + $(INSTALL) -m 0600 -D package/monit/monit.services $(TARGET_DIR)/stat/etc/monit/monit.d/services $(INSTALL) -m 0755 -D package/monit/monit.init $(TARGET_DIR)/etc/init.d/monit ln -sf /tmp/etc/monit $(TARGET_DIR)/etc/monit ln -sf ../../init.d/monit $(TARGET_DIR)/etc/runlevels/default/S98monit Added: branches/1.0/package/monit/monit.services =================================================================== --- branches/1.0/package/monit/monit.services (rev 0) +++ branches/1.0/package/monit/monit.services 2014-12-20 00:19:36 UTC (rev 6864) @@ -0,0 +1,78 @@ +## +## Check general system resources such as load average, cpu and memory +## usage. Each test specifies a resource, conditions and the action to be +## performed should a test fail. +## +check system $HOST + if memory usage > 85% then alert +# if loadavg (1min) > 4 then alert +# if loadavg (5min) > 2 then alert +# if cpu usage (user) > 70% for 3 cycles then alert +# if cpu usage (system) > 30% for 3 cycles then alert + + +## +## Check that a process is running. +## +#check process asterisk +# pidfile /var/run/asterisk/asterisk.pid + + +## +## Check filesystem permissions, uid, gid, space and inode usage. +## +check filesystem tmp_tmpfs + path /tmp + if space usage > 80% then alert + +check filesystem var_tmpfs + path /var + if space usage > 80% then alert + +check filesystem asturw + path /oldroot/mnt/asturw + if space usage > 80% then alert + +#check filesystem kd +# path /mnt/kd +# if space usage > 80% then alert + + +## +## Check if a file exists, checksum, permissions, uid and gid. +## +#check file rc.conf +# path /etc/rc.conf + + +## +## Check for remote host availability. +## +#check host sip_gateway +# address pbx +# if failed +# ping +# then alert +# if failed +# port 5060 +# type udp +# protocol sip +# target s@pbx +# maxforward 6 +# then alert + +#check host web_server +# address 10.10.50.62 +# if failed +# ping +# then alert +# if failed +# port 80 +# protocol http +## request /some/path with content = "a string" +# then alert +# if failed +# port 443 +# protocol https +# then alert + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |