Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2009-04-07
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.


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 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.:
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

688 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