Adding a CFG file for virtual machines
Tim Palmer
tim at tany.com
Wed Dec 5 18:17:41 CET 2007
Michael Egan wrote:
>
> 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/>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> ------------------------------------------------------------------------
Hi Mike,
Well, the obvious question of course is - have you defined a
"virtual-servers" template anywhere in your "virtual" config file? When
you define the "use" statement in a host definition, there must be a
template of the same name (since thats what the "use" statement means).
Check the Nagios docs on Object Inheritance (under Advanced Topics in
2.x docs, or via links in the Object File configuration section).
tim
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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