Nagios startup errors

Hi,

I’ve installed Nagios 1.2 on FreeBSD 4.11 and edited the config files. However I get an error when I start up Nagios:

[root@server nagios]# /usr/local/bin/nagios /usr/local/etc/nagios/nagios.cfg

Nagios 1.2
Copyright © 1999-2004 Ethan Galstad ([email protected])
Last Modified: 02-02-2004
License: GPL

Nagios 1.2 starting… (PID=7260)
Warning: Cannot open log file ‘/var/spool/nagios/nagios.log’ for writing
Error: Could not read program retention data from table programretention

Warning: Cannot open log file ‘/var/spool/nagios/nagios.log’ for writing
Error: Could not read host retention data from table hostretention

Warning: Cannot open log file ‘/var/spool/nagios/nagios.log’ for writing
Error: Could not read service retention data from table serviceretention

Warning: Cannot open log file ‘/var/spool/nagios/nagios.log’ for writing
Error: Could not lock status data tables in database ‘’

The rights on the file nagios.log are okay:
-rw-r–r-- 1 root nagios 141 Oct 25 16:24 nagios.log

Does anyone know what is wrong? Thanks in advance!

check the permissions on you files as by the docs.
it shouldn’t be a file owned by root. the nagios user which runs nagios itself can’t write that file as it is…

Luca

Hi Luca,

Thank you for your reply. I just changed the owner of nagios.log to the user nagios:
-rw-r–r-- 1 nagios nagios 509 Oct 25 17:38 nagios.log

A part of the error I receive had been solved right now, but unfortunately some errors still occur:

[root@server nagios]# /usr/local/bin/nagios /usr/local/etc/nagios/nagios.cfg

Nagios 1.2
Copyright © 1999-2004 Ethan Galstad ([email protected])
Last Modified: 02-02-2004
License: GPL

Nagios 1.2 starting… (PID=7341)
Error: Could not read program retention data from table programretention
Error: Could not read host retention data from table hostretention
Error: Could not read service retention data from table serviceretention
Error: Could not lock status data tables in database ‘’

while configuring before compiling did you define the mysql user? has the nagios user a .my.cnf file? has he access read/write to the databes tables?..

Luca

No. I think this is indeed the problem. I don’t want nagios with MySQL support, but anyway it looks for tables into a mysql databases, which don’t exist. How can I change this so that Nagios uses plain text files?

in the directory with the source files use
./configure --help
that will give you all the options.

Luca
Edited Wed Oct 26 2005, 06:30AM ]

Thanks, I fixed it and nagios is up and running now :slight_smile:

nice to know :smiley:

Ciao, Luca