Adding a CFG file for virtual machines

Cipriani, Robert C Robert.Cipriani at mybrighthouse.com
Thu Dec 6 22:04:30 CET 2007


________________________________
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Michael Egan
Sent: Wednesday, December 05, 2007 12:04 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Adding a CFG file for virtual machines

I would like to add a separate group within Nagios for my virtual machines.  I created a file called virtual.cfg and changed the HOST GROUP DEFINITION to the following:
Define hostgroup {
            hostgroup_name            virtual-servers ; the name of the hostgroup
            alias                             Virtual Servers ; long name of the group
}

For each host definition, the 'use' statement is as follows:
Use      virtual-servers ; Inherit default values from a template

In the nagios.cfg file, I have added the following statement:
Cfg_file=/usr/local/nagios/etc/objects/virtual.cfg

When I verify the configuration files, I get the following error:
Error: Template 'virtual-servers' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/virtual.cfg'. starting on line 39

I think I am missing a step or two to include this new cfg file.  Any help would be appreciated.

Thanks,
Mike


Mike Egan
Enterprise Network Engineer
Capital Safety
3833 Sala Way
Red Wing, MN 55066
651-385-6254 Office
651-247-5719 Cell
michaele at capitalsafety.com<blocked::mailto:michaele at capitalsafety.com>

Home of DBI-Sala and Protecta Brands.  Visit us on the web at www.capitalsafety.com<blocked::http://www.capitalsafety.com/>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


If I understand what you are trying to do:

I am putting hosts into hostgroups in the host definitions like this:

#HOST DEFINITION
define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               sparky
        alias                   Oracle RAC
        address                 1.2.4.4
        hostgroups              linux-servers
        }

Note that 'linux-server' is a host template, and 'linux-servers' is a hostgroup.



Robert C. Cipriani
Senior Network Administrator
Tampa Bay Division IT
Bright House Networks
W: (727) 329-2000 x74264
M: (727) 365-1231



________________________________
CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this e-mail, please notify the sender immediately by return e-mail, purge it and do not disseminate or copy it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071206/4960ca1e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list