Hi,Raj. I suspect monit is actually using pgsql test. Bellow are would-be list of possibility.
* Are TEST type names case insensitive and `port' optional? Try this (I am not sure...) if failed port 5432 protocol pgsql then ... * PGSQL TEST was written for front-end protocol version 3.0 which had been implemented since PostgreSQL 7.4. If you are using pre-7.4 PostgreSQL server, the TEST may not work properly. * Does your PostgreSQL allow root to connect to `root' DB you have created? Ensure pg_hba.conf has something like; host root root 127.0.0.1/32 trust local root root ident sameuser (Note that this pg_hba.conf format is based on PostgreSQL 8.x. It varies on 7.4.x) The second line is needed for pgsql TEST through UNIX Socket and unnecessarry for TCP. But I personally recommend using UNIX Socket unless you REALLY need to examine PostgreSQL availability through TCP. In that case, monit definition should be; if failed unixsocket /tmp/.s.PGSQL.5432 protocol pgsql then ... Best regards. Tatsuya Nonogaki >Hi, > > I've just downloaded monit and have been playing around with it to start >monitoring our Apache/Tomcat/Postgresql based web application. > > (Since the application went down for a few hours this weekend, we've been >looking for an automated re-start solution, and are glad to have found >monit.) > > When checking for Postgresql I've been using the PGSQL entry like this: > > check process postgresql with pidfile /var/run/postmaster.5432.pid > start program = "/etc/init.d/postgresql start" > stop program = "/etc/init.d/postgresql stop" > if failed protocol PGSQL then restart > if 5 restarts within 5 cycles then timeout > > I've also added the user root and database root to avoid having spurious >messages in my pglog file complaining about user root and database root. > > I still keep getting errors in the PGLOG file like: > > LOG: incomplete startup packet > > Can someone suggest a way to not get these errors. Since I am monitoring >every 2 minutes this will create too many messages in our log file and I am >worried we might miss some other critical messages. > >Raj > > -- > Raj Gupta [EMAIL PROTECTED] > 1684 Nightingale Avenue Suite 201 > Sunnyvale, CA 94087 408-733-2737(fax) > > http://www.zeemaps.com > > > > >-- >To unsubscribe: >http://lists.nongnu.org/mailman/listinfo/monit-general -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
