[Pkg-nagios-devel] Bug#288705: marked as done (nagios-pgsql: check_nagios_db is incompatible with PostgreSQL)

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


Your message dated Wed, 19 Jan 2005 00:47:13 -0500
with message-id <E1Cr8gT-0003sc-00@newraff.debian.org>
and subject line Bug#288705: 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; 5 Jan 2005 09:22:21 +0000
>From marcus@better.se Wed Jan 05 01:22:21 2005
Return-path: <marcus@better.se>
Received: from mxfep02.bredband.com [195.54.107.73] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cm7My-0004ug-00; Wed, 05 Jan 2005 01:22:20 -0800
Received: from thales.home.better.se ([83.227.74.40] [83.227.74.40])
          by mxfep02.bredband.com with ESMTP
          id <20050105092148.KJM8499.mxfep02.bredband.com@thales.home.better.se>
          for <submit@bugs.debian.org>; Wed, 5 Jan 2005 10:21:48 +0100
Received: from thales.home.better.se (localhost.localdomain [127.0.0.1])
	by thales.home.better.se (8.13.2/8.13.2/Debian-1) with ESMTP id j059Li9Q006575
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <submit@bugs.debian.org>; Wed, 5 Jan 2005 10:21:44 +0100
Received: (from marcus@localhost)
	by thales.home.better.se (8.13.2/8.13.2/Submit) id j059LiZ4006572;
	Wed, 5 Jan 2005 10:21:44 +0100
Date: Wed, 5 Jan 2005 10:21:44 +0100
From: Marcus Better <marcus@better.se>
Message-Id: <200501050921.j059LiZ4006572@thales.home.better.se>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nagios-pgsql: check_nagios_db is incompatible with PostgreSQL
X-Debbugs-CC: Marcus Better <marcus@better.se>
Delivered-To: submit@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=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: nagios-pgsql
Version: 2:1.3-0+pre6
Severity: important

The included check_nagios_db script for MySQL needs to be modified for
PostgreSQL. Without it, the CGI scripts will not detect a running
Nagios and will not allow executing commands.

The attached patch will fix this.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-custom
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)

Versions of packages nagios-pgsql depends on:
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
ii  libgd2-noxpm                2.0.33-1.1   GD Graphics Library version 2 (wit
ii  libjpeg62                   6b-9         The Independent JPEG Group's JPEG 
ii  libpng12-0                  1.2.8rel-1   PNG library - runtime
ii  libpq3                      7.4.6-5      PostgreSQL C client library
ii  nagios-common               2:1.3-0+pre6 A host/service/network monitoring 
ii  zlib1g                      1:1.2.2-3    compression library - runtime

-- no debconf information

===File /etc/nagios/check_nagios_db.patch===================
--- check_nagios_db
+++ check_nagios_db	2005-01-05 10:13:47.000000000 +0100
@@ -11,10 +11,10 @@
 use DBI;
 
 # Change this to Pg if you use postgresql.
-my $driver = "mysql";
+my $driver = "Pg";
 
 my $CFG_DEF = "/etc/nagios/cgi.cfg";
-my $QUERY = "select *, UNIX_TIMESTAMP(last_update) as ut from programstatus;";
+my $QUERY = "select *, extract(epoch from last_update) as ut from programstatus;";
 my $EXPIRE_DEF = 5; ## expressed in minutes
 my $PROCCNT = 0;
 
@@ -51,7 +51,7 @@
 
 # print "($dbhost, $dbport, $dbuser, $dbpass, $dbname)\n";
 
-my $dsn = "DBI:$driver:database=$dbname;host=$dbhost;port=$dbport";
+my $dsn = "DBI:$driver:dbname=$dbname;host=$dbhost";
 my $dbh = DBI->connect($dsn, $dbuser, $dbpass, {'RaiseError' => 1});
 
 my $sth = $dbh->prepare($QUERY);
@@ -92,7 +92,7 @@
 if ( $STAT == OK ) {
         print "Nagios OK: located $PROCCNT processes, program status updated $lastupdated seconds ago\n";
 } else {
-	print "Nagios problem: no processus found";
+	print "Nagios problem: no processes found\n";
 	exit 1;
 }
 
============================================================

---------------------------------------
Received: (at 288705-close) by bugs.debian.org; 19 Jan 2005 05:53:03 +0000
>From katie@ftp-master.debian.org Tue Jan 18 21:53:03 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 1Cr8m6-0005NH-00; Tue, 18 Jan 2005 21:53:03 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1Cr8gT-0003sc-00; Wed, 19 Jan 2005 00:47:13 -0500
From: Sean Finney <seanius@debian.org>
To: 288705-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#288705: fixed in nagios 2:1.3-cvs.20050116-1
Message-Id: <E1Cr8gT-0003sc-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Wed, 19 Jan 2005 00:47:13 -0500
Delivered-To: 288705-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: 6

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 288705@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-----