Thread: mail alert

mail alert

From
Jan Verheyden
Date:

Hi All,

 

I was looking in what way it’s possible to alert via mail when some conditions are true in a database.

 

Thanks in advance!

 

Jan

Re: mail alert

From
John R Pierce
Date:
Jan Verheyden wrote:
>
> Hi All,
>
> I was looking in what way it’s possible to alert via mail when some
> conditions are true in a database.
>

a probe script that runs periodically (from crontab?) and checks said
conditions, would probably be the best way. this could be tied into a
Nagios style monitoring system if you have a requirement for multiple
different sorts of monitors like that. Nagios would handle little things
like not flooding you with repeated emails if that condition remained true.







Re: mail alert

From
Christophe Pettus
Date:
On Aug 11, 2009, at 12:19 AM, Jan Verheyden wrote:
> I was looking in what way it’s possible to alert via mail when some
> conditions are true in a database.

An external script that connects to the database, checks for the
condition, and sends the email if it exists is probably your best
solution.  You might want to take a look at check_postgres:

    http://bucardo.org/check_postgres/

--
-- Christophe Pettus
    xof@thebuild.com


Re: mail alert

From
"Ow Mun Heng"
Date:
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Christophe Pettus

>On Aug 11, 2009, at 12:19 AM, Jan Verheyden wrote:
>> I was looking in what way it's possible to alert via mail when some
>> conditions are true in a database.

>An external script that connects to the database, checks for the
>condition, and sends the email if it exists is probably your best
>solution.  You might want to take a look at check_postgres:

>    http://bucardo.org/check_postgres/

I would look forward to having such a feature in Postgres actually. Right
now, I'm using cron to do those checks.



Re: mail alert

From
Sam Mason
Date:
On Fri, Aug 14, 2009 at 09:52:02AM +0800, Ow Mun Heng wrote:
> Christophe Pettus wrote:
> >On Aug 11, 2009, at 12:19 AM, Jan Verheyden wrote:
> >> I was looking in what way it's possible to alert via mail when some
> >> conditions are true in a database.
>
> >An external script that connects to the database, checks for the
> >condition, and sends the email if it exists is probably your best
> >solution.  You might want to take a look at check_postgres:
>
> >    http://bucardo.org/check_postgres/
>
> I would look forward to having such a feature in Postgres actually. Right
> now, I'm using cron to do those checks.

You could use one of the embedded languages (plperl or plpython) to do
the sending of emails if you want.  You'd still need something "outside"
the database to actually start the function running though.

--
  Sam  http://samason.me.uk/