Cannot get Nagios 3 on Ubuntu Desktop 8.10 to monitor any hosts

I have installed Ubuntu 8.10 Desktop and all 270MB of updates. I followed the install instructions located here ( Within a few minutes i was using the web-interface to  view the localhost.
I proceeded to the next step; monitoring a Windows host. When i got to the point to edit the windows.cfg file, I noticed the folder /usr/local/nagios does not exist. Instead, all .cfg files were placed in /etc/nagios3/objects. I made all changes necessary to nagios.cfg and windows.cfg according to ( and also verified everything according to ( I checked my spelling and syntax numerous times on the config files but i still get this when i try to verify my configuration:

root@nagios:/etc/nagios3# nagios3 -v nagios.cfg

Nagios 3.0.2
Copyright (c) 1999-2008 Ethan Galstad (
Last Modified: 05-19-2008
License: GPL

Reading configuration data...

Error: Template 'windows-server' specified in host definition could not be not found (config file '/etc/nagios3/objects/windows.cfg', starting on line 25)

***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

I have checked over and over again and cannot find any problems. I have uploaded my templates.cfg, windows.cfg and nagios.cfg.
Also curious to know, from the looks of the windows.cfg,  will each host need it's own windows.cfg? Does each host need a static IP? If not, how do add more windows machines to monitor? I dont think i'm understanding how this software works,  cause creating a seperate .cfg file for each host that needs to be monitored seems a little ridiculous.
Thanks for any help.
Who is Participating?
Sanga CollinsConnect With a Mentor Systems AdminCommented:
using ubuntu 8.10 there is a bug in network manager that prevents you from configuring a static IP from the gui. to get around it i usually configure the static up from the console and remove the network manager completely

apt-get remove network-manager network-manager-gui

as far as the best distro for nagios, i recommend ubuntu because all the third party add-ons have ubuntu documentation readily available. my fav distro is Centos but only becuase of Redhat directory server.

i love nagios and have a pretty complex setup working very well. i dont mind answering any questions you have while trying to get it setup
Sanga CollinsSystems AdminCommented:
the ubuntu quickstart from the nagios website works better since it uses all the standard locations for the nagios install

since you went a different way i would try using the cfg_dir directive instead and use the cfg_file directive sparingly. below is what i have setup on my nagios. i used the /usr/local/nagios/ as my install, but im sure you can modify to reflect your environment

# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.

# You can specify individual object config files as shown below:

# Definitions for monitoring the local (Linux) host

# Definitions for monitoring a Windows machine

# Definitions for monitoring a router/switch

# Definitions for monitoring a network printer

# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:

This is where is point to all my hosts that are being monitored. since the hosts directory has almost 150 different defenition files its much easier than referencing each host to monitor sperately

mhdcommunicationsAuthor Commented:
The Ubuntu quickstart guide did not work. I spent 3 days using 6.1 desktop and server editions, 7.1 desktop and server editions, and 8.1 desktop and server editions. ALL failed at the same point (make install-webconf *command not found or something of that nature) I tried every variation of the command, and it never worked. Every time i tried, i reloaded the OS from scratch and installed all updates before starting the install of Nagios 3. I finally found the one for 8.1 that used the repositories for the install, and i was up monitoring locally in 3-5 minutes.
I will try the config above and post later. Thanks.

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Sanga CollinsSystems AdminCommented:
the command make install-webconf simply adds a few lines to your apache sever so that the nagios page works correctly. i dont remeber the lines off top, but they can safely be added manually at a later stage
mhdcommunicationsAuthor Commented:
I have grown extremely frustrated with Nagios. I got past the original error listed, but got a new one - something in regards to a Duplicate host. I remarked ALL config files in the nagios.cfg except a host.cfg that only had one host entered on the entire document, and still got the same erro. I am in the process of starting from scratch. There seems to be something else wrong with my systems as every time i reboot, my NIC changes from a 'Manual' IP to DHCP.
I will be using Ubuntu 8.10 Desktop again and will follow the instructions listed on Nagio's site. Do you suggest any other distro? I would cinsider myself a linux beginner. Although i used Ubuntu for almost 2 years as my only OS, i stopped using it about 2 years ago and have forgotten almost everything, and am teaching myself again. Thanks.
Maciej SsysadminCommented:
Wait a minute - are these files which you attached to your post - are your currently used configuration files?
If so - in nagios.cfg (attached as .txt), you should uncomment (by deleting '#' character) line 33 (#cfg_file=/etc/nagios3/objects/templates.cfg).
Maciej SsysadminCommented:
As for multiple configuration files - you may have just one config file with all your hosts, services, commands, contacs, contact groups, escalations, etc... Having it in separate files is just easier to maintain (especially if you have a lot of hosts/services/etc...).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.