MySQL and Nagios (Newbie Here)

Paul Strange pauls at sellingsource.com
Thu May 20 05:31:13 CEST 2004


List:
I have having a problem with MySQL and Nagios.  I have successfully installed 
Nagios with MySQL support:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  yes, with caching
        Install ${prefix}:  /usr/nagios
                Lock file:  /var/nagios/nagios.lock
           Init directory:  /etc/init.d

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost/nagios/
                  CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):

 External Data Routines:
 ------------------------
              Status data:  Database (MySQL)
              Object data:  Template-based (text file)
             Comment data:  Database (MySQL)
            Downtime data:  Database (MySQL)
           Retention data:  Database (MySQL)
          Peformance data:  Default (external commands)
       Extended info data:  Database (MySQL)

I have mysql fully functional:
# mysql -h localhost -u nagios -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43308 to server version: 4.0.18

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I have modified both the cgi.cfg and the resources.cfg file to contain the 
mysql data: (sample below is representative of all)
xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=nagios
xcddb_password=XXXXX

However, when I try to start nagios, I get the following set of errors:
Nagios 1.1 starting... (PID=11005)
Warning: Contact group 'dbadmins' is not used in any hostgroup/service 
definitions or host/hostgroup/service escalations!
Finished daemonizing... (New PID=11006)
Error: Could not connect to MySQL database '' on host '' using username '' and 
password ''.  Status data will not be saved!
Error: Could not connect to MySQL database '' on host '' using username '' and 
password ''.  Retention data will not be processed or saved!
Error: Could not re-connect to database server on host '' for status data.  
I'll keep trying every 60 seconds...
Error: Could not connect to MySQL database '' on host '' using username '' and 
password '' for comment data!
Error: Could not connect to MySQL database '' on host '' using username '' and 
password '' for downtime data!


It looks to me that the data in the config files is not being read by Nagios.  
I have scoured the archives for this problem and cannot find it.  (Found 
several examples of mysql and nagios not liking to compile on rh9, that was 
about it)  The documents are not clear on which file should be modified to 
handle the db connection information.  I have tried changing localhost to IP 
address and FQDN in config file to no avail.

I am desperate to get monitoring up and functional.  Any help you could 
provide would be greatly appreciated. 

Thank You.
-- 
Paul Strange


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list