[Nagios-devel] undesirable verification outcome

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] undesirable verification outcome

Post by Guest »

Hi again,
"hostgroup_name" works great with b2 but found a undesirable.
if the hostgroup you specify in a service doesnt exist you get the following
error on verify,
"Error: Could not find hostgroup ', ' specified in service

***> 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 on the main and host config files, as well as the

'Whats New' section to find out what has changed.
"

here is an example of the service that produced the above error.
# Service definition
define service{
use generic-service
hostgroup_name test,production,qa,dumbuser
service_description reboot
is_volatile 0
check_period 24x7
max_check_attempts 5
normal_check_interval 5
retry_check_interval 1
contact_groups Unix-page-alert
notification_interval 10
notification_period workhours
notification_options w,u,c,r
check_command check_reboot
}
where dumbuser doesn't exist as a host group. again this is protecting the
user against himself really, and you cant trap all the errors(and the message
is close enough to allow you to find your problem). but i thought you might
want to know. if the hostgroups does exist, the comma is valid. so if i were
to say "test,production,qa" in the above everything would be fine.(meaning:
yay!!!)


Also a difference i noticed between "Netsaint" and "Nagios" is that Netsaint
allowed multi-grouped hosts. where nagios doesn't this makes total sense if
you are using "hostgroup_name" for a service
and it appears that this is the only time it will spit out an error.
IE: Myserver exist in production and qa using the above example, you get a
"service already defined, for Myserver. wonder why this could be *smile*
this is not an issue with my configuration because i dont want multi-grouped
hosts. but other people might?
*realizes how would the programer determine which hostgroup takes precendence
over the other*

Ethan Galstad wrote:


> Hi Kenneth -
>
> This should be fixed in beta 2, which I will be releasing sometime
> tonight.
>
> On 23 May 2002 at 16:47, kray1 wrote:
>
> > Hi Ethan,
> > found a bug based on the undocumented (hostgroup_name)
> > being used in services.
> > whenever you try to use the variable, regardless of which file you put
> > it in, with respect to a "service" it produces the following result.
> > "
> > tfsndsu4: [root] /apps/nagios/bin> nagios -v /apps/nagios/etc/nagios.cfg
> >
> > Nagios 1.0b1
> > Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org)
> > Last Modified: 05-10-2002
> > License: GPL
> >
> > Reading configuration data...
> >
> > Segmentation Fault(coredump)
> >
> > here is the service in question,
> > # Service definition
> > define service{
> > use generic-service ; Name of service
> > template to use
> >
> > hostgroup_name test
> > service_description reboote
> > is_volatile 0
> > check_period 24x7
> > max_check_attempts 5
> > normal_check_interval 5
> > retry_check_interval 1
> > contact_groups Unix-page-alert
> > notification_interval 10
> > notification_period workhours
> > notification_options w,u,c,r
> > check_command check_reboot
> > }
> >
> > tried it with tabs, tried it with spaces, if i change the
> > "hostgroup_name" to "host_name" and give it a defined host, it works
> > the "test" host group is defined.
> >
> > if you can tell me where to find the coredump ill send that to you too..
> >
> > Sincerly,
> > Kenneth Ray
> >
> >
> >
> >
>
> Ethan Galstad,
> Nagios Developer
> ---
> Email: nagios@nagios.org
> Website: http://www.nagios.or

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: kray1@travelersla.com
Locked