[Pkg-nagios-devel] Bug#287324: marked as done (nagios_check_db does not work with postgresql)

Debian Bug Tracking System owner@bugs.debian.org
Tue, 18 Jan 2005 22:03:17 -0800


Your message dated Wed, 19 Jan 2005 00:47:13 -0500
with message-id <E1Cr8gT-0003sa-00@newraff.debian.org>
and subject line Bug#287324: fixed in nagios 2:1.3-cvs.20050116-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Dec 2004 23:32:06 +0000
>From Klaus.Schiwinsky@uni-koeln.de Sun Dec 26 15:32:06 2004
Return-path: <Klaus.Schiwinsky@uni-koeln.de>
Received: from mail1.rrz.uni-koeln.de [134.95.100.208] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cihrq-0004iz-00; Sun, 26 Dec 2004 15:32:06 -0800
Received: from [80.141.188.125] (p508DBC7D.dip.t-dialin.net [80.141.188.125])
	(authenticated as user acp61 bits=0)
	by mail1.rrz.Uni-Koeln.DE (8.13.1/8.13.1) with ESMTP id iBQNVunT004180
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT)
	for <submit@bugs.debian.org>; Mon, 27 Dec 2004 00:32:04 +0100 (MET)
Message-ID: <41CF49EB.6070804@uni-koeln.de>
Date: Mon, 27 Dec 2004 00:31:55 +0100
From: Klaus Schiwinsky <Klaus.Schiwinsky@uni-koeln.de>
Reply-To: Klaus.Schiwinsky@uni-koeln.de
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
X-Accept-Language: de, fr, eo, en
MIME-Version: 1.0
To: submit@bugs.debian.org
Subject: nagios_check_db does not work with postgresql
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new
X-Scanned-By: MIMEDefang 2.48 on 134.95.19.44
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: nagios-common
Version: 1.3-0+pre6

Hi,

Has nagios_check_db been tested with postgresql?


    If you set

# Change this to Pg if you use postgresql.
my $driver = "Pg";

    and start nagios you get an error:


rechner:/etc/nagios# /etc/init.d/nagios start
Starting nagios: DBI 
connect('database=nagios;host=localhost;port=5432','nagios',...) failed: 
invalid connection option "database" at 
/usr/lib/nagios/plugins/check_nagios_db line 55
nagios.


    This is due to the fact that DBD::Pg requires "dbname=" instead of
    "database=". (nagios starts anyway.) If you modify the following line


#my $dsn = "DBI:$driver:database=$dbname;host=$dbhost;port=$dbport";
my $dsn = "DBI:$driver:dbname=$dbname;host=$dbhost;port=$dbport";


    you get another error:


rechner:/etc/nagios# /etc/init.d/nagios start
Starting nagios: DBD::Pg::st execute failed: ERROR:  function 
unix_timestamp(timestamp without time zone) does not exist at 
/usr/lib/nagios/plugins/check_nagios_db line 61.
DBD::Pg::st execute failed: ERROR:  function unix_timestamp(timestamp 
without time zone) does not exist at 
/usr/lib/nagios/plugins/check_nagios_db line 61.
nagios.


    This time we have to deal with the fact that postgresql does not
    know unix_timestamp(). The following query will be understood:


#my $QUERY = "select *, EXTRACT(EPOCH FROM last_update) as ut from 
programstatus;";
my $QUERY = "select *, UNIX_TIMESTAMP(last_update) as ut from 
programstatus;";


    With these changes applied /etc/init.d/nagios will run without
    complaining.


Greetings
Klaus Schiwinsky

---------------------------------------
Received: (at 287324-close) by bugs.debian.org; 19 Jan 2005 05:54:58 +0000
>From katie@ftp-master.debian.org Tue Jan 18 21:54:58 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cr8nx-0005qZ-00; Tue, 18 Jan 2005 21:54:58 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1Cr8gT-0003sa-00; Wed, 19 Jan 2005 00:47:13 -0500
From: Sean Finney <seanius@debian.org>
To: 287324-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#287324: fixed in nagios 2:1.3-cvs.20050116-1
Message-Id: <E1Cr8gT-0003sa-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Wed, 19 Jan 2005 00:47:13 -0500
Delivered-To: 287324-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 5

Source: nagios
Source-Version: 2:1.3-cvs.20050116-1

We believe that the bug you reported is fixed in the latest version of
nagios, which is due to be installed in the Debian FTP archive:

nagios-common_1.3-cvs.20050116-1_all.deb
  to pool/main/n/nagios/nagios-common_1.3-cvs.20050116-1_all.deb
nagios-mysql_1.3-cvs.20050116-1_i386.deb
  to pool/main/n/nagios/nagios-mysql_1.3-cvs.20050116-1_i386.deb
nagios-pgsql_1.3-cvs.20050116-1_i386.deb
  to pool/main/n/nagios/nagios-pgsql_1.3-cvs.20050116-1_i386.deb
nagios-text_1.3-cvs.20050116-1_i386.deb
  to pool/main/n/nagios/nagios-text_1.3-cvs.20050116-1_i386.deb
nagios_1.3-cvs.20050116-1.diff.gz
  to pool/main/n/nagios/nagios_1.3-cvs.20050116-1.diff.gz
nagios_1.3-cvs.20050116-1.dsc
  to pool/main/n/nagios/nagios_1.3-cvs.20050116-1.dsc
nagios_1.3-cvs.20050116.orig.tar.gz
  to pool/main/n/nagios/nagios_1.3-cvs.20050116.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 287324@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sean Finney <seanius@debian.org> (supplier of updated nagios package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 10 Jan 2005 15:13:21 -0800
Source: nagios
Binary: nagios-pgsql nagios-text nagios-mysql nagios-common
Architecture: source i386 all
Version: 2:1.3-cvs.20050116-1
Distribution: unstable
Urgency: low
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
Changed-By: Sean Finney <seanius@debian.org>
Description: 
 nagios-common - A host/service/network monitoring and management system
 nagios-mysql - A host/service/network monitoring and management system
 nagios-pgsql - A host/service/network monitoring and management system
 nagios-text - A host/service/network monitoring and management system
Closes: 275009 282132 283778 285550 287324 288705 289109 289404 290319 290681 290739
Changes: 
 nagios (2:1.3-cvs.20050116-1) unstable; urgency=low
 .
   * Sean Finney:
     - built against a new upstream cvs snapshot, removed dpatch patches
       that previously incorporated these post 1.2 changes.  this also
       brings in updated upstream documentation (closes: #282132).
     - nagios-pgsql now recommends libdbd-pg-perl, and likewise for
       nagios-mysql.  thanks to raphaŽl 'SurcouF' Bordet <surcouf@debianfr.net>
       for pointing this out with nagios-pgsql (closes: #285550).
     - the postinst for nagios-common no longer fails if update-nagios
       returns an error (which can be caused by nagios failing to reload)
       thanks to Olivier Berger <olivier.berger@int-evry.fr> and
       Petter Reinholdtsen <pere@hungry.com> (closes: #283778).
     - now build against libmysqlclient14.  thanks to
       Greg Cox <ratness@hotmail.com> for pointing out that we were
       still building against 3.23 versioned libraries.
     - updated german debconf translation.  thanks for this one go to
       Erik Schanze <schanzi_usenet@gmx.de> (closes: #289404).
     - updated danish debconf translation.  thanks for this one go to
       Claus Hindsgaul <claus_h@image.dk> (closes: #290739).
     - don't disclose the database password in the error logs.  thanks to
       Mikael Magnusson <mikma@users.sourceforge.net> for pointing this
       out (closes: #290319).
     - fixes to calling configure in debian/rules.  among other things this
       should resolve issues with nagios packages not accessing hostextinfo
       as they should.  thanks to Roy Bonser <rbonser@spyder-monkey.com>
       for pointing out these symptoms (closes: #290681).
     - now include a README.pgsql, which was provided by
       Ricky Ng-Adam <rngadam@yahoo.com>.  this should clear up many
       issues that postgresql users were having with lacking documentation.
       thanks also to Marcus Better and Klaus Schiwinsky for their reports
       (closes: #287324, #288705).
     - now start with as a S30 script instead of S20, to make sure we
       give a potential mysql/postgresql server a bit more time to
       start up.  not the perfect solution, but should work for most
       cases.  thanks to Marcus Better <marcus@better.se> for pointing
       this out (closes: #289109).
     - patch the sample cgi.cfg to tell the local admin how to use
       extinfo based on which package they're using--as opposed to
       telling them exactly a method not supported in any package,
       which is what it was previously doing (closes: #275009).
Files: 
 500c99b69039f7b27b09d45d646503e4 1021 net optional nagios_1.3-cvs.20050116-1.dsc
 fcc6cad4a46fdb10cba7882cf3953383 1621903 net optional nagios_1.3-cvs.20050116.orig.tar.gz
 34e9b588e76db38c11fc9e96369e69f2 74391 net optional nagios_1.3-cvs.20050116-1.diff.gz
 3fda012378696053b32d338c1959da74 901240 net optional nagios-text_1.3-cvs.20050116-1_i386.deb
 4df1f6b06651cb7f25f365511757c070 906494 net optional nagios-mysql_1.3-cvs.20050116-1_i386.deb
 d5b47e80dfe75933e35dd07f86a9661a 917018 net optional nagios-pgsql_1.3-cvs.20050116-1_i386.deb
 658a99b57732957520d7154d45dab2f0 1214006 net optional nagios-common_1.3-cvs.20050116-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB7e35ynjLPm522B0RArvBAJ9WGyXlkvkjyfVZY62+fbdNZUfpZwCfaA8k
vE5m3XcHv7jtna9WeaWnQ7g=
=ObUj
-----END PGP SIGNATURE-----