monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Processes not starting


From: Carina Haupt
Subject: Re: Processes not starting
Date: Mon, 15 Oct 2012 16:15:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.8) Gecko/20121009 Thunderbird/10.0.8

Hi,

yes, I just figured this out too. I thought it was enough to just stop and start it since it printed all the new processes too, but on the other hand it makes sense that I need to restart it.
Thanks for your help!

Regards,
Carina

On 15.10.2012 15:28, Martin Pala wrote:
You need to stop monit first and then start it again with the -v option ... the 
attached output shows that monit is running already, so it just woke up the 
monit daemon.

The information will go to the logfile (/var/log/monit/monit.log) - please send it after 
monit one monit cycle finished. Optionally you can run monit in foreground and observe 
the operation on terminal directly: "monit -vI"



On Oct 15, 2012, at 3:16 PM, Carina Haupt<address@hidden>  wrote:

Hi,

you can find the complete output from moit -v below. The pid file for the 
second (or any other) process is not even created. The script virtuoso.sh seems 
not to be executed at all.

virtuoso.sh
-----------
#!/bin/bash

case $1 in
   start)
      echo $$>  /var/run/virtuoso/virtuoso_$2.pid;
      exec 2>&1 /virtuoso/bin/virtuoso-t -df -c 
/virtuoso/var/lib/virtuoso/$2/virtuoso.ini
      ;;
   stop)
      kill "cat /var/run/virtuoso/virtuoso_$2.pid" ;;
   *)
      echo "usage: virtuoso {start|stop}" ;;
esac
exit 0


monit -v
---------
monit: Debug: Adding net allow '129.26.132.0/24'.
monit: Debug: Adding net allow '129.26.131.0/24'.
monit: Debug: Adding host allow 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Adding credentials for user 'admin'.
monit: Debug: Adding credentials for user 'bio'.
Runtime constants:
Control file       = /usr/local/monit-5.5/monitrc
Log file           = /var/log/monit/monit.log
Pid file           = /home/chaupt/.monit.pid
Id file            = /home/chaupt/.monit.id
Debug              = True
Log                = True
Use syslog         = False
Is Daemon          = True
Use process engine = True
Poll time          = 60 seconds with start delay 0 seconds
Expect buffer      = 256 bytes
Mail server(s)     = ksi.scai.fraunhofer.de:25 with timeout 30 seconds
Mail from          = address@hidden
Mail subject       = monit alert --  $EVENT $SERVICE
Mail message       = $EVENT Service $SERV..(truncated)
Start monit httpd  = True
httpd bind address = 129.26.128.81
httpd portnumber   = 2812
httpd signature    = True
Use ssl encryption = False
httpd auth. style  = Basic Authentication and Host/Net allow list
Alert mail to      = address@hidden
   Alert on         = All events

The service list contains the following entries:

System Name           = scai-virtuoso.scai.fraunhofer.de
Monitoring mode      = active
Swap usage limit     = if greater than 50.0% 1 times within 1 cycle(s) then 
alert else if succeeded 1 times within 1 cycle(s) then alert
Memory usage limit   = if greater than 85.0% 1 times within 1 cycle(s) then 
alert else if succeeded 1 times within 1 cycle(s) then alert
Load avg. (5min)     = if greater than 2.0 1 times within 1 cycle(s) then alert 
else if succeeded 1 times within 1 cycle(s) then alert
Load avg. (1min)     = if greater than 4.0 1 times within 1 cycle(s) then alert 
else if succeeded 1 times within 1 cycle(s) then alert

Filesystem Name       = rootfs
Path                 = /dev/mapper/vg_scaivirtuoso-lv_root
Monitoring mode      = active
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Filesystem flags     = if changed 1 times within 1 cycle(s) then alert
Space usage limit    = if greater than 90.0% 1 times within 1 cycle(s) then 
alert else if succeeded 1 times within 1 cycle(s) then alert

Filesystem Name       = datafs
Path                 = /dev/vdc1
Monitoring mode      = active
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Filesystem flags     = if changed 1 times within 1 cycle(s) then alert
Space usage limit    = if greater than 90.0% 1 times within 1 cycle(s) then 
alert else if succeeded 1 times within 1 cycle(s) then alert

Process Name          = virtuoso_all
Pid file             = /var/run/virtuoso/virtuoso_all.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start all' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop all' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8892 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_astra
Pid file             = /var/run/virtuoso/virtuoso_astra.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start astra' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop astra' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8896 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_chemspider
Pid file             = /var/run/virtuoso/virtuoso_chemspider.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start chemspider' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop chemspider' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8897 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_d10
Pid file             = /var/run/virtuoso/virtuoso_d10.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start d10' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop d10' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8895 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_medline_peregrine
Pid file             = /var/run/virtuoso/virtuoso_medline_peregrine.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start medline_peregrine' 
timeout 30 second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop medline_peregrine' 
timeout 30 second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8894 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_ops_dataslice
Pid file             = /var/run/virtuoso/virtuoso_ops_dataslice.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start ops_dataslice' timeout 
30 second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop ops_dataslice' timeout 
30 second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8891 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_tmtool_eval
Pid file             = /var/run/virtuoso/virtuoso_tmtool_eval.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start tmtool_eval' timeout 
30 second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop tmtool_eval' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8898 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

-------------------------------------------------------------------------------
monit daemon with PID 21735 awakened

On 15.10.2012 14:48, Martin Pala wrote:
Hi,

the configuration looks OK - please run monit in verbose mode (using the -v option) and 
provide the output. Also make sure that the virtuoso_astra PID described by the  
/var/run/virtuoso/virtuoso_astra.pid is not running already ("ps -ef | grep `cat  
/var/run/virtuoso/virtuoso_astra.pid`").

Regards,
Martin


On Oct 15, 2012, at 2:37 PM, Carina Haupt<address@hidden>   wrote:

Hi,

I want to monitor several processes using monit:

check process virtuoso_all with pidfile /var/run/virtuoso/virtuoso_all.pid
       start = "/usr/local/bin/virtuoso.sh start all"
       stop = "/usr/local/bin/virtuoso.sh stop all"
       if failed host scai-virtuoso port 8892 then restart
       if 5 restarts within 5 cycles then alert

check process virtuoso_astra with pidfile /var/run/virtuoso/virtuoso_astra.pid
       start = "/usr/local/bin/virtuoso.sh start astra"
       stop = "/usr/local/bin/virtuoso.sh stop astra"
       if failed host scai-virtuoso port 8896 then restart
       if 5 restarts within 5 cycles then alert

...

If i start monit with -v everything looks good (see below). But only the first 
process is started. The second one does not appear in the front end, neither is 
the shell script given in start executed.

Where is my mistake?

Process Name          = virtuoso_all
Pid file             = /var/run/virtuoso/virtuoso_all.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start all' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop all' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8892 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

Process Name          = virtuoso_astra
Pid file             = /var/run/virtuoso/virtuoso_astra.pid
Monitoring mode      = active
Start program        = '/usr/local/bin/virtuoso.sh start astra' timeout 30 
second(s)
Stop program         = '/usr/local/bin/virtuoso.sh stop astra' timeout 30 
second(s)
Existence            = if does not exist 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Pid                  = if changed 1 times within 1 cycle(s) then alert
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port                 = if failed [scai-virtuoso:8896 [DEFAULT via TCP] with 
timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart 
else if succeeded 1 times within 1 cycle(s) then alert
Timeout              = If restarted 5 times within 5 cycle(s) then alert

...

Carina Haupt

Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven
D-53754 Sankt Augustin

Tel.: +49 - 2241 - 14 - 3480
E-mail: address@hidden
Internet: http://www.scai.fraunhofer.de

and

Bonn-Aachen International Center for Information Technology (B-IT)
Dahlmannstrasse 2
D-53113 Bonn

E-mail: address@hidden
Internet: http://www.b-it-center.de

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--

Carina Haupt

Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven
D-53754 Sankt Augustin

Tel.: +49 - 2241 - 14 - 3480
E-mail: address@hidden
Internet: http://www.scai.fraunhofer.de

and

Bonn-Aachen International Center for Information Technology (B-IT)
Dahlmannstrasse 2
D-53113 Bonn

E-mail: address@hidden
Internet: http://www.b-it-center.de

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--

Carina Haupt

Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven
D-53754 Sankt Augustin

Tel.: +49 - 2241 - 14 - 3480
E-mail: address@hidden
Internet: http://www.scai.fraunhofer.de

and

Bonn-Aachen International Center for Information Technology (B-IT)
Dahlmannstrasse 2
D-53113 Bonn

E-mail: address@hidden
Internet: http://www.b-it-center.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]