[root@localhost nagiosxi]# ./E-importnagiosql
httpd starten:
/tmp/nagiosxi/nagiosxi/basedir/scripts /tmp/nagiosxi
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Datenbank ?nagiosxi? existiert nicht in /tmp/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-postgres64.inc.php on line 676
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
IMPORTING CONFIG FILES...Array
(
[0] => nagiosadmin.cfg
)
IMPORTING /usr/local/nagios/etc/import/nagiosadmin.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/nagiosadmin.cfg' -O nagiosql.import.monitoring
--2010-12-01 16:42:17-- http://localhost/nagiosql/admin/import.php
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 302 Found
Platz: http://localhost/nagiosql/index.php [folge]
--2010-12-01 16:42:17-- http://localhost/nagiosql/index.php
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
L?nge: 5259 (5,1K) [text/html]
Speichere nach: ?nagiosql.import.monitoring?
100%[======================================>] 5.259 --.-K/s in 0s
2010-12-01 16:42:17 (502 MB/s) - ?nagiosql.import.monitoring? gespeichert [5259/5259]
SETUID ROOT OK
RESETTING PERMS
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Datenbank ?nagiosxi? existiert nicht in /tmp/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-postgres64.inc.php on line 676
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
--2010-12-01 16:42:18-- http://localhost/nagiosql/admin/verify.php
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 302 Found
Platz: http://localhost/nagiosql/index.php [folge]
--2010-12-01 16:42:18-- http://localhost/nagiosql/index.php
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
L?nge: 5259 (5,1K) [text/html]
Speichere nach: ?nagiosql.export.monitoring?
100%[======================================>] 5.259 --.-K/s in 0s
2010-12-01 16:42:18 (502 MB/s) - ?nagiosql.export.monitoring? gespeichert [5259/5259]
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: Datei oder Verzeichnis nicht gefunden
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi
Some people have experienced the PostgreSQL server not starting up properly on boot. Try issuing this command and then re-running the E-importnagiosql script:
[root@localhost nagiosxi]# service postgresql start
postgresql-Dienst starten:[ OK ]
[root@localhost nagiosxi]# ./E-importnagiosql
httpd starten:
/tmp/nagiosxi/nagiosxi/basedir/scripts /tmp/nagiosxi
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Datenbank ?nagiosxi? existiert nicht in /tmp/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-postgres64.inc.php on line 676
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
IMPORTING CONFIG FILES...Array
(
[0] => nagiosadmin.cfg
)
IMPORTING /usr/local/nagios/etc/import/nagiosadmin.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/nagiosadmin.cfg' -O nagiosql.import.monitoring
--2010-12-01 17:10:41-- http://localhost/nagiosql/admin/import.php
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 302 Found
Platz: http://localhost/nagiosql/index.php [folge]
--2010-12-01 17:10:41-- http://localhost/nagiosql/index.php
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
L?nge: 5259 (5,1K) [text/html]
Speichere nach: ?nagiosql.import.monitoring?
100%[======================================>] 5.259 --.-K/s in 0s
2010-12-01 17:10:41 (502 MB/s) - ?nagiosql.import.monitoring? gespeichert [5259/5259]
SETUID ROOT OK
RESETTING PERMS
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Datenbank ?nagiosxi? existiert nicht in /tmp/nagiosxi/nagiosxi/basedir/html/db/adodb/drivers/adodb-postgres64.inc.php on line 676
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
--2010-12-01 17:10:41-- http://localhost/nagiosql/admin/verify.php
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 302 Found
Platz: http://localhost/nagiosql/index.php [folge]
--2010-12-01 17:10:41-- http://localhost/nagiosql/index.php
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
L?nge: 5259 (5,1K) [text/html]
Speichere nach: ?nagiosql.export.monitoring?
100%[======================================>] 5.259 --.-K/s in 0s
2010-12-01 17:10:41 (502 MB/s) - ?nagiosql.export.monitoring? gespeichert [5259/5259]
--2010-12-01 17:10:41-- http://localhost/nagiosql/admin/verify.php
Aufl?sen des Rechnernamens ?localhost?.... 127.0.0.1
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 302 Found
Platz: http://localhost/nagiosql/index.php [folge]
--2010-12-01 17:10:41-- http://localhost/nagiosql/index.php
Verbindungsaufbau mit localhost[127.0.0.1]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
L?nge: 5259 (5,1K) [text/html]
Speichere nach: ?nagiosql.export.additional?
100%[======================================>] 5.259 --.-K/s in 0s
2010-12-01 17:10:41 (418 MB/s) - ?nagiosql.export.additional? gespeichert [5259/5259]
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: Datei oder Verzeichnis nicht gefunden
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi
[root@localhost nagiosxi]# psql template1 postgres
Dies ist psql 8.1.22, das interaktive PostgreSQL-Terminal.
Geben Sie ein: \copyright f?r Urheberrechtsinformationen
\h f?r Hilfe ?ber SQL-Anweisungen
\? f?r Hilfe ?ber interne Anweisungen
\g oder Semikolon, um eine Anfrage auszuf?hren
\q um zu beenden
template1=#
Okay, good. So PostgreSQL is running and accepting connections, but the nagiosxi database didn't get created apparently (or has permissions issues). From the postgres prompt, what's the output of