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

Posted on 2009-04-07
Last Modified: 2013-11-15
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.
Question by:mhdcommunications
  • 3
  • 2
  • 2
LVL 18

Expert Comment

by:Sanga Collins
ID: 24087982
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


Author Comment

ID: 24088207
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.

LVL 18

Expert Comment

by:Sanga Collins
ID: 24088685
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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.


Author Comment

ID: 24091173
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.
LVL 18

Accepted Solution

Sanga Collins earned 500 total points
ID: 24091299
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
LVL 23

Expert Comment

by:Maciej S
ID: 24091410
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).
LVL 23

Expert Comment

by:Maciej S
ID: 24091440
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...).

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bash file 10 62
How do I setup Wordpress to use Master / Slave MySQL database setup? 4 87
HOw To Install Docker on VMware Workstation 19 296
The better OS Architecture 13 85
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. Once you open the link you will see …
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question