Nagios installation problem


#1

gud day to all,

i just installed nagios using ubuntu (breezy) using apt-get for the first time.
i did not do any ./make or ./config

there no problem there… i follow the intructions on the manual carefully…
after all the installations procedures…

i run the
sudo nagios -v /etc/nagios/nagios.cfg

below are the messages i received

Nagios 1.3
Copyright © 1999-2004 Ethan Galstad ([email protected])
Last Modified: 10-24-2004
License: GPL

Reading configuration data…

Running pre-flight check on configuration data…

Checking services…
Checked 1 services.
Checking hosts…
Checked 1 hosts.
Checking host groups…
Checked 1 host groups.
Checking contacts…
Checked 1 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 1 service escalations.
Checking host group escalations…
Checked 0 host group escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 98 commands.
Checking time periods…
Checked 4 time periods.
Checking for circular paths between hosts…
Checking for circular service execution dependencies…
Checking global event handlers…
Checking obsessive compulsive service processor command…
Checking misc settings…

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

so then i run the
sudo nagios /etc/nagios/nagios.cfg

below are the messages.

Nagios 1.3
Copyright © 1999-2004 Ethan Galstad ([email protected])
Last Modified: 10-24-2004
License: GPL

Nagios 1.3 starting… (PID=9139)
Error: Could not connect to MySQL database ‘’ on host ‘’ using username ‘’ and password ‘XXXXXX’. Status data will not be saved!
Error: Could not connect to MySQL database ‘’ on host ‘’ using username ‘’ and password ‘XXXXXX’. 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 ‘XXXXXX’ for comment data!
Error: Could not connect to MySQL database ‘’ on host ‘’ using username ‘’ and password ‘XXXXXX’ for downtime data!

is there any guru here that encountered this message…

do i need to install something or do i need to configure some .cfg file?

i really appreciate any help …

thanks.

:wink:


#2

First, nagios is not supposed to be ran as user root, so sudo is not the proper way to start it.

Second, remove the rpm install, and follow the source code install.

Your problem is resolved here:
nagios.sourceforge.net/docs/1_0/xdata-db.html


#3

I really appreciate ur help.

But I’m using Ubuntu(breezy), it is using the .deb file…

I installed it using the apt-get command like the yum command in redhat /fedora

So i did not compile any thing.

Are u saying that I should remove the nagios and install it again manually?

Or is there any way that is much more easier…

tnx…

:wink:


#4

Yes, remove your rpm install.
Installing from source is quite simple really. Just follow the docs and any tips you might find as stickies in this forum.

./configure --with-command-group=nagcmd --enable-embedded-perl --with-perlcache
fix anything that is missing, like your gd libs, iconv, etc.
make all
make install
and the rest of the make arguments.
Now, you have nagios installed and must configure all of the config files. Start by making just one hose with ONE service check.