Problems with installing

Hi,

I’m completely new to nagios so sorry if my question seems kinda stupid.
I’ve installed version 2.0 on my SUSE 10 webserver with apache 2.0. The installation came with no errors.
But I noticed that it had not created the /nagios/etc directory. So I created it myself and placed the nagios.cfg sample file in it.
I was able tot connect to the nagios webpage for my site but when I hit ‘Tactical Overview’ I get an 'Error: Could not read object configuration data!".

The I’ve done the nagios -v procedure on my config file And I get teh following errors:
Error: Cannot open resource file ‘/usr/local/nagios/etc/resource.cfg’ for reading!
Error: Cannot open config file ‘/usr/local/nagios/etc/checkcommands.cfg’ for reading: No such file or directory

I think not everything was installed during installation but I’ve done it just like the documentation told me to do and got no error messages.

Any thought on what I’ve done wrong?

Thanks,
Bert

Did you do the following when installing:

./configure
Make all
Make install
Make install-init
make install-commandmode
make install-config

this shoud give you all directories and sample config files

Install plugins:

Tar –xvzf nagios-plugins-1.4.2.tar.tar

./configure
make
make install

NOTE: If anything goes tits up do “make clean” and you can re-compile

then for WEB Interface apach integration:

Make sure the this line is uncommented in your httpd.conf file

Include conf.d/*.conf

vi /etc/httpd/conf.d/nagios.conf

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin

<Directory “/usr/local/nagios/sbin”>
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user

Alias /nagios /usr/local/nagios/share

<Directory “/usr/local/nagios/share”>
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user

Restart Apache

/etc/init.d/httpd restart

Add users

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios
htpasswd /usr/local/nagios/etc/htpasswd.users lgill

I’ve doen this al and still the same problem.
No resource.cfg or checkcommands.cfg files under /etc.

I’ve also seen that the cgi-bin dir is also missing. I think thats the problem cause all the links are refering to that directory.

When I install the plugins, do I have to do this from the nagios directory? Or can it be a temporary installation dir?

Bert

Looks like your compile hasn’t worked properly - run ./configure again and make sure it is not missing anything. On my box I had to find compile + install the latest gcc, openssl and some other bits during various stages of my Nagios install.

There won’t be a cgi-bin directory. Cgi-bin is an alias that you create in Apache for your /usr/local/nagios/sbin directory, which contains all of your cgi’s.

You say that you’ve run the make install-config command, and stil; there is no resource.cfg and checkcommands.cfg?

Good, there’s not supposed to be.

That command installs resource.cfg-sample, checkcommands.cfg-sample, etc.

Don’t bother with those for now. Just work with minimal.cfg, which should be in your /usr/local/nagios/etc directory if you did everything right. In nagios.cfg, comment out all of the cfg_file parameters except for minimal.cfg (or is that minimal.cfg-sample as well? I can’t remember). That one config file should have all you need to get a very basic setup and start running local checks on the Nagios machine.

[quote=“beerjen”]…
I’ve also seen that the cgi-bin dir is also missing. I think thats the problem cause all the links are refering to that directory…
[/quote]

Bottom line is, you didn’t follow the installation per the nagios docs. Otherwise, you would have known that links to cgi-bin is an alias in httpd.conf.
So please, do yourself a favor and install per the docs and follow each and every step. I just installed nagios2.0 last week and I STILL followed the docs to the letter. I’ve also posted problems with the docs as a sticky in this forum.

Thanks all,

I’ve done the installation from te beginning and I missed some things the previous time. Now it’s up and running.
Thanks again,

Bert