monit-general
[Top][All Lists]
Advanced

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

RE: restart after cycles


From: Mark Olliver
Subject: RE: restart after cycles
Date: Wed, 5 Oct 2011 16:22:31 +0100

 

Well it would appear I am partly getting what I want but I am not sure if the webpage is reporting correctly as it is saying alert on lines 2 & 4 but they should be restarts not alert, Is that a display bug or a config error?

 

Also I don’t want to alert on all events including pid or ppid changes so do I just need to include a NOALERT global setting?

 

Port

If failed [localhost:5432 [PGSQL via TCP] with timeout 5 seconds and retry 0 time(s)] 3 times within 3 cycle(s) then alert else if succeeded 1 times within 1 cycle(s) then alert

Port

If failed [localhost:5432 [PGSQL via TCP] with timeout 5 seconds and retry 2 time(s)] 2 times within 2 cycle(s) then restart else if succeeded 1 times within 1 cycle(s) then alert

Unix Socket

If failed [/var/run/postgresql/.s.PGSQL.5432 [PGSQL] with timeout 5s and retry 0 time(s)] 3 times within 3 cycle(s) then alert else if succeeded 1 times within 1 cycle(s) then alert

Unix Socket

If failed [/var/run/postgresql/.s.PGSQL.5432 [PGSQL] with timeout 5s and retry 2 time(s)] 2 times within 2 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

Alert mail to

address@hidden

Alert on

All events

 

 

check process postgresql with pidfile /var/run/postgresql/8.4-main.pid

    start program = "/etc/init.d/postgresql-8.4 start"

    stop  program = "/etc/init.d/postgresql-8.4 stop"

    if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql retry 2 2 cycles then restart

    if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql 3 cycles then alert

    if failed host localhost port 5432 protocol pgsql retry 2 2 cycles then restart

    if failed host localhost port 5432 protocol pgsql 3 cycles then alert

    alert address@hidden

    group database

 

 

Thanks

 

Mark


reply via email to

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