[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_namevirtual-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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]> Home of DBI-Sala and Protecta Brands. Visit us on the web at www.capitalsafety.com 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___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Adding a CFG file for virtual machines
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 > [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]> > > Home of DBI-Sala and Protecta Brands. Visit us on the web at > www.capitalsafety.com 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@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
Re: [Nagios-users] Adding a CFG file for virtual machines
Hi, > 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: Firstly, your hostgroup does not appear to have any members defined within it ? ie. define hostgroup{ hostgroup_name smtp-servers alias mail servers members smtp1,smtp2 } Secondly, Your 'use' statement should typically be that of an 'unregistered' 'define host' definition and not a hostgroup definition. ie. define host{ namevirtual-host ; The name of this host template - referenced in other host definitions notifications_enabled 1 ; Host notifications are enabled notification_period 24x7 event_handler_enabled 0 ; Host event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information1 ; Retain non-status information across program restarts contact_groups admin,techsupp notification_interval 60 notification_optionsd,u,r check_period24x7 max_check_attempts 3 normal_check_interval 10 passive_checks_enabled 1 obsess_over_host1 register0 ; DONT REGISTER THIS DEFINITION } as the template, and something like :- define host{ use virtual-host host_name smtp1 alias (smtp1) incoming smtp server address ???.???.???.??? check_command check-host-alive } for the actual virtual host. -- bright blessings, Mark - 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@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
Re: [Nagios-users] Adding a CFG file for virtual machines
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Egan Sent: Wednesday, December 05, 2007 12:04 PM To: nagios-users@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_namevirtual-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 [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]> Home of DBI-Sala and Protecta Brands. Visit us on the web at www.capitalsafety.comhttp://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. - 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___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Adding a CFG file for virtual machines
Cipriani, Robert C wrote: > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Egan > Sent: Wednesday, December 05, 2007 12:04 PM > To: nagios-users@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_namevirtual-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. > The file is being included. You just don't have a host template named "virtual-servers". For reference, "host template" != "hostgroup". Go back to the documentation. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - 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 ___ Nagios-users mailing list Nagios-users@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