hi all.
a few hours ago i downloaded and installed nagios2.04b on FreeBSD5.4
but although i read the documentation, i still have some problems need to be cleared
its the first time i am trying to use nagios. so i think it will be very hard to make it work beautifully.
installed nagios and plugins through ports.
but when i type nagios -v nagios.cfg some errors shown due to missing files below :
Look for the sample configurations files, at my place they are at /usr/local/nagios/etc/*.cfg-sample
Adjust nagios.cfg to the samples or copy/rename them.
I guess maybe when you were configuring nagios using ./configure you did not specify the --prefix=/dir/for/nagios if you did the u should locate the e.g. hosts.cfg-sample in the /dir/where/nagios/is/installed/etc then you create a folder inside that directory and make a copy of the *.cfg-sample (just in case ) then use the
mv hosts.cfg-sample hosts.cfg command to create the *.cfg files
i didn’t use any ./configure option cos i downloaded nagios from ports on FreeBSD. all packages were downloaded & installed & cleaned.
so i think files u mentioned are in correct folders i think ?
The error is just as it’s stated, you have no .cfg files.
When you install from source, all of the config files are there, but they are named with a -sample at the end. These files are then meant to be copied to the above named files like contacts.cfg, etc. and modify there contents to be specific to your wishes.
In other words, ditch the “ports” and install from source, since we have no idea what your “ports” of nagios contain or don’t contain. Hopefully this is clear. So once more in case it isn’t. We don’t know anything about your “ports” of nagios. Install from source and follow the nagios installation documentation step by step.
Other than that, contact the “port” maker and ask for installation instructions if you won’t install from source code. Edited Thu Nov 10 2005, 07:54AM ]
The .cfg files are pretty essential for nagios to run. Without them, Nagios, won’t be able to monitor anything at all. Period. The hosts.cfg file identifies the network hosts you are attempting to monitor, the services.cfg file sets up the services to be monitored on each of the hosts…
There are sample .cfg files that come with Nagios, as I know has already been pointed out. I’m not familiar at all with FreeBSD (or even what FreeBSD is), so I can’t help you with that, but perhaps you can try compiling and installing nagios per the online documentation, using the commands given?