Problem With nagios with mysql

Anthony Costa acosta at vdov.net
Tue Jul 27 21:51:28 CEST 2004


make sure you have mysql installed and running.

then what you want to do here is this ... first extract the table setup
into mysql using
	zcat /usr/share/doc/nagios-mysql/create_mysql.sql.gz | mysql
	-u root -p nagios

(the above file may be in a different place on your system, but a
then create your locks for the mysql user
	GRANT LOCK TABLES ON nagios.* TO nagios at localhost IDENTIFIED
	BY 'password';
	GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON nagios.* TO
	nagios at localhost;

then you're gonna need to edit your resource.cfg and cgi.cfg such that
each one of the database fields correspond to machine=localhost,
user=nagios, passwd=password specified above.

reboot and pray!
ac;

On Jul 27, 2004, at 7:11 PM, Manuel Alejandro Peña Sánchez wrote:

> I compiled nagios with suport of mysql, this are my parameters of 
> configure:
>
>  
>
> ./configure --prefix=/usr/local/nagios --with-cgiurl=/cgi-bin 
> --with-htmurl=/nagios --with-nagios-user=nagios 
> --with-nagios-grp=nagios --with-mysql-lib=/usr/lib 
> --with-mysql-inc=/usr/include/mysql --with-mysql-status  
> --with-mysql-comments  --with-mysql-extinfo  --with-mysql-retention  
> --with-mysql-downtime --with-mysql-xdata 
> --libexecdir=/usr/local/nagios/libexec
>
>  
>
> The version of my nagios is 1.2
>
>  
>
> And the problem that I have is that nagios.log sends me this output:
>
>  
>
> [1090941392] Nagios 1.2 starting... (PID=18906)
>
> [1090941392] Finished daemonizing... (New PID=18907)
>
> [1090941392] Error: Could not connect to MySQL database '' on host '' 
> using user
>
> name '' and password ''.  Status data will not be saved!
>
> [1090941392] Error: Could not connect to MySQL database '' on host '' 
> using user
>
> name '' and password ''.  Retention data will not be processed or 
> saved!
>
> [1090941392] Error: Could not re-connect to database server on host '' 
> for statu
>
> s data.  I'll keep trying every 60 seconds...
>
> [1090941392] Error: Could not connect to MySQL database '' on host '' 
> using user
>
> name '' and password '' for comment data!
>
> [1090941392] Error: Could not connect to MySQL database '' on host '' 
> using user
>
> name '' and password '' for downtime data!
>
>  
>
> And it starts but when it tries to check a host it doesn’t recognize 
> any check program and sends this output:
>
>   
>
> [1090941492] HOST ALERT: linux1;DOWN;SOFT;9;CRITICAL - Plugin timed 
> out after 10
>
>  Seconds
>
>  
>
> And on some times it sends that nagios doesn’t found a check_xxx 
> plugin, beside I have compiled also the nagios-plugins source.
>
>  
>
> May any one help me, also I want to know if any one have a dump of 
> mysql tables for nagios.
>
>  
>
> Regards
>
>  
>
> Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 6523 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040727/73c24720/attachment.bin>


More information about the Users mailing list