Review File Locations
There are a number of files that you should review, both their location and their content. It is important that you review these because if you change a file location you may have to modify a number of additional files that depend on that location.
Log File
An archives directory is created in /var/log/nagios3 and the main log is here:
/var/log/nagios3/nagios.log
Resource File
/etc/nagios3/resource.cfg
Apache2 File
The apache file contains the settings necessary for the web interface. The stylesheets provides css files that can be used to modify the settings for the web interface. These are found in /etc/nagios3/stylesheets. The password database the web interface will look for is htpasswd.users be sure to update the apache file if you change the name of that file.
# apache configuration for nagios 3.x
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
Alias /nagios3 /usr/share/nagios3/htdocs
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3)>
Options FollowSymLinks
DirectoryIndex index.html
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
require valid-user
</DirectoryMatch>
Authorization File
The cgi.cfg file contains the information used for authentication to the web interface. Note that the user who can view all of the information is “nagiosadmin”. Be sure create that user in your database(htpasswd.users) or change the user to meet your needs.
Configuration Directory
The directory /etc/nagios3/conf.d contains much of the information needed for modify objects.
contacts_nagios2.cfg
generic-service_nagios2.cfg
localhost_nagios2.cfg
extinfo_nagios2.cfg
host-gateway_nagios3.cfg
services_nagios2.cfg
generic-host_nagios2.cfg
hostgroups_nagios2.cfg
timeperiods_nagios2.cfg
Review the contents of each of these files. If you change the name of any you will need to make changes to at least the nagios.cfg, possibly others.
Commands
The commands.cfg includes some of the basic commands. However, Ubuntu places most of the definitions in a separate directory which you see listed. Many of the commands that you will want to use are located here and when you open each cfg up you will see specific examples of pre-created commands.
/usr/share/nagios-plugins/templates-basic/
apt.cfg
disk.cfg
ftp.cfg
load.cfg
news.cfg
ping.cfg
real.cfg
tcp_udp.cfg
users.cfg
dhcp.cfg
dummy.cfg
http.cfg
mail.cfg
ntp.cfg
procs.cfg
ssh.cfg
telnet.cfg
/usr/share/nagios-plugins/templates-standard/
breeze.cfg
flexlm.cfg
ldap.cfg
netware.cfg
radius.cfg
vsz.cfg
disk-smb.cfg
hppjd.cfg
mrtg.cfg
nt.cfg
rpc-nfs.cfg
dns.cfg
ifstatus.cfg
mysql.cfg
pgsql.cfg
snmp.cfg
That covers the basic file locations, be sure to review these as they will be very important for your system development.