Unix Technical Forum

Semi OT - Anyone monitoring PostgreSQL with nagios

This is a discussion on Semi OT - Anyone monitoring PostgreSQL with nagios within the pgsql Admins forums, part of the PostgreSQL category; --> Is anyone using Nagios to monitor PostgreSQL? If so, is there any way to check for more than just ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:26 AM
Chris Hoover
 
Posts: n/a
Default Semi OT - Anyone monitoring PostgreSQL with nagios

Is anyone using Nagios to monitor PostgreSQL?

If so, is there any way to check for more than just your PostgreSQL instance
being up?

This weekend, we had an issue where a database shutdown failed due to a
rogue query that would not die w/o a kill -9 being done on it. The database
remained up and accepted connections only to tell the connection to go away
because the database was shutting down.

This up and accepting connections caused our Nagios instance to not report
the database being down.

Any ideas on how to get around this?

Thanks,

Chris

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:26 AM
Jim C. Nasby
 
Posts: n/a
Default Re: Semi OT - Anyone monitoring PostgreSQL with nagios

I'm not familiar with Nagios, but you should be able to do something
like

psql -tc 'select 1' database

to see if it's alive and accepting queries.

On Mon, Nov 07, 2005 at 04:18:55PM -0500, Chris Hoover wrote:
> Is anyone using Nagios to monitor PostgreSQL?
>
> If so, is there any way to check for more than just your PostgreSQL instance
> being up?
>
> This weekend, we had an issue where a database shutdown failed due to a
> rogue query that would not die w/o a kill -9 being done on it. The database
> remained up and accepted connections only to tell the connection to go away
> because the database was shutting down.
>
> This up and accepting connections caused our Nagios instance to not report
> the database being down.
>
> Any ideas on how to get around this?
>
> Thanks,
>
> Chris


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:26 AM
Lane Van Ingen
 
Posts: n/a
Default Re: Semi OT - Anyone monitoring PostgreSQL with nagios

What does the 'c' part of the -tc command do? It is not documented in
any information I have.

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailtogsql-admin-owner@postgresql.org]On Behalf Of Jim C. Nasby
Sent: Monday, November 07, 2005 5:38 PM
To: Chris Hoover
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Semi OT - Anyone monitoring PostgreSQL with nagios


I'm not familiar with Nagios, but you should be able to do something
like

psql -tc 'select 1' database

to see if it's alive and accepting queries.

On Mon, Nov 07, 2005 at 04:18:55PM -0500, Chris Hoover wrote:
> Is anyone using Nagios to monitor PostgreSQL?
>
> If so, is there any way to check for more than just your PostgreSQL

instance
> being up?
>
> This weekend, we had an issue where a database shutdown failed due to a
> rogue query that would not die w/o a kill -9 being done on it. The

database
> remained up and accepted connections only to tell the connection to go

away
> because the database was shutting down.
>
> This up and accepting connections caused our Nagios instance to not report
> the database being down.
>
> Any ideas on how to get around this?
>
> Thanks,
>
> Chris


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:26 AM
Jim C. Nasby
 
Posts: n/a
Default Re: Semi OT - Anyone monitoring PostgreSQL with nagios

Same as -t -c...

On Tue, Nov 08, 2005 at 08:10:28AM -0500, Lane Van Ingen wrote:
> What does the 'c' part of the -tc command do? It is not documented in
> any information I have.
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailtogsql-admin-owner@postgresql.org]On Behalf Of Jim C. Nasby
> Sent: Monday, November 07, 2005 5:38 PM
> To: Chris Hoover
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Semi OT - Anyone monitoring PostgreSQL with nagios
>
>
> I'm not familiar with Nagios, but you should be able to do something
> like
>
> psql -tc 'select 1' database
>
> to see if it's alive and accepting queries.
>
> On Mon, Nov 07, 2005 at 04:18:55PM -0500, Chris Hoover wrote:
> > Is anyone using Nagios to monitor PostgreSQL?
> >
> > If so, is there any way to check for more than just your PostgreSQL

> instance
> > being up?
> >
> > This weekend, we had an issue where a database shutdown failed due to a
> > rogue query that would not die w/o a kill -9 being done on it. The

> database
> > remained up and accepted connections only to tell the connection to go

> away
> > because the database was shutting down.
> >
> > This up and accepting connections caused our Nagios instance to not report
> > the database being down.
> >
> > Any ideas on how to get around this?
> >
> > Thanks,
> >
> > Chris

>
> --
> Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
> Pervasive Software http://pervasive.com work: 512-231-6117
> vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 06:26 AM
Eric Faulhaber
 
Posts: n/a
Default Re: Semi OT - Anyone monitoring PostgreSQL with nagios

psql -c COMMAND DATABASE

executes COMMAND using DATABASE and displays the results without
starting psql interactively.

Regards,
Eric Faulhaber


Lane Van Ingen wrote:
> What does the 'c' part of the -tc command do? It is not documented in
> any information I have.
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailtogsql-admin-owner@postgresql.org]On Behalf Of Jim C. Nasby
> Sent: Monday, November 07, 2005 5:38 PM
> To: Chris Hoover
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Semi OT - Anyone monitoring PostgreSQL with nagios
>
>
> I'm not familiar with Nagios, but you should be able to do something
> like
>
> psql -tc 'select 1' database
>
> to see if it's alive and accepting queries.
>
> On Mon, Nov 07, 2005 at 04:18:55PM -0500, Chris Hoover wrote:
>
>>Is anyone using Nagios to monitor PostgreSQL?
>>
>>If so, is there any way to check for more than just your PostgreSQL

>
> instance
>
>>being up?
>>
>>This weekend, we had an issue where a database shutdown failed due to a
>>rogue query that would not die w/o a kill -9 being done on it. The

>
> database
>
>>remained up and accepted connections only to tell the connection to go

>
> away
>
>>because the database was shutting down.
>>
>>This up and accepting connections caused our Nagios instance to not report
>>the database being down.
>>
>>Any ideas on how to get around this?
>>
>>Thanks,
>>
>>Chris

>
>
> --
> Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
> Pervasive Software http://pervasive.com work: 512-231-6117
> vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 06:26 AM
Steve Crawford
 
Posts: n/a
Default Re: Semi OT - Anyone monitoring PostgreSQL with nagios

On Tuesday 08 November 2005 05:10, Lane Van Ingen wrote:
> What does the 'c' part of the -tc command do? It is not documented
> in any information I have.


Show tuples only (per psql --help)

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:49 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com