|
From: | Paul Sun |
Subject: | RE: Help on building MONIT on Solaris x86-64 |
Date: | Sun, 10 Apr 2011 06:00:26 +0800 |
Hi! I realized the
problem now. It is due to the syslog configuration. Sorry for any
inconvenience. Apr 10 05:58:24 host1
monit[16128]: [ID 111343 local1.error] 'applog' process is not running Apr 10 05:58:24 host1
monit[16128]: [ID 111343 local1.error] 'applog' process is not running Apr 10 05:58:24 host1
monit[16128]: [ID 341506 local1.info] 'applog' trying to restart Apr 10 05:58:24 host1
monit[16128]: [ID 112587 local1.info] 'applog' start: /bin/su Apr 10 05:58:24 host1
monit[16128]: [ID 111343 local1.error] 'applog' process is not running Apr 10 05:59:30 host1
monit[16128]: [ID 111343 local1.info] 'applog' process is running with pid
25426 BTW, can I use MONIT
to check the ipcs queue? - paul From:
address@hidden
[mailto:address@hidden On Behalf Of Paul Sun Hi Below is my
configuration and details. Appreciated if you could help. - PS host1% uname -a SunOS csgbspspsgapp02
5.10 Generic_144489-04 i86pc i386 i86pc host1%
/usr/local/bin/monit -V This is Monit version
5.2.5 Copyright (C)
2000-2011 Tildeslash Ltd. All Rights Reserved. MONIT
CONFIG check process
logger.pl with pidfile /user/run/logger.pl.pid
group user
start program = "/user/scripts/start-stop.sh logger.pl start"
stop program = "/user/scripts/start-stop.sh logger.pl stop"
if cpu > 80% for 2 cycles then alert
if totalmem > 80% for 4 cycles then alert check process applog
with pidfile /user/run/applog.pid
group user
start program = "/bin/su - user -c '/user/scripts/start-stop.sh applog
start '"
stop program = "/bin/su - user -c '/user/scripts/start-stop.sh applog
stop'"
if cpu > 80% for 2 cycles then alert
if totalmem > 80% for 4 cycles then alert host1% ps -ef|grep
log user 15955 1 0 21:20:11
? 0:00 ./applog
root 15941 1 0 21:20:06
? 0:00
/usr/bin/perl /user/scripts/logger.pl -d /data/log host1% ls -ltr total 8 -rw-r--r--
1 root root
6 Apr 9 21:20 logger.pl.pid -rw-r--r--
1 user user 6 Apr 9 21:20
applog.pid host1% cat applog.pid 15955 host1% cat
logger.pl.pid 15941 From:
address@hidden
[mailto:address@hidden On Behalf Of Martin Pala Hi, please can you show the monit configuration for
'logger.pl' service? ('check process ...') and tell which monit version do you
use? If you use the pidfile based check, make sure that the pid which is
stored in the file matches the running process - if the pidfile was not updated
or doesn't exist, monit cannot recognize the process. Martin On Apr 9, 2011, at 3:21 PM, Paul Sun wrote: Hi I am able to complie
now. The monit is running, but I observed that the monit did not tell the
process pid after the application is restarted by MONIT. Any idea? I remembered
I use MONIT in linux, and the pid will be reported after the application is
started successfully. Apr 9 21:20:05
app02 monit[15938]: [ID 111343 local1.error] 'logger.pl' process is not running Apr 9 21:20:05
app02 last message repeated 1 time Apr 9 21:20:10
app02 monit[15938]: [ID 111343 local1.error] 'applogr' process is not running Thanks - paul |
[Prev in Thread] | Current Thread | [Next in Thread] |