Re: [Nagios-devel] Possible bug or update for Core documentation

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

Re: [Nagios-devel] Possible bug or update for Core documentation

Post by Guest »

Hello Robert,
thanks for anwering. Now it's more clear to me. I didn't read Object
Inheritance carefully.

Thank you for developing Nagios! Your proud Nagios user.

--
Hezky den / Have a nice day
Libor JEL=C3=8DNEK

VIRTAGE SOFTWARE // software - design - web
Lucni 542 // 285 04 Uhlirske Janovice // Czech Republic
support: +420 315 555 488 // cell: +420 777 205 142
email/jabber: [email protected] // web: www.virtage.com



2011/2/2 Robert Marxreiter :
> Hello Libor,
>
> when you define a host template, you have to tell Nagios not to register
> the host entry (register 0). Otherwise it will assume
> "server-host-template" is a real host and complain about missing
> parameters. See comment:
>
> define host {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0name =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
server-host-template
> =C2=A0 =C2=A0 =C2=A0 =C2=A0check_interval =C2=A01
> =C2=A0 =C2=A0 =C2=A0 =C2=A0register =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =
=C2=A0 =C2=A0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST
> A TEMPLATE!
> }
>
> Regards
> - Robert
>
> On 02/01/2011 12:27 PM, Libor Jelinek wrote:
>> Hello dear Nagios developers,
>> I am verry sorry if this is not right place to file a bug but I didn't
>> found any your bugzilla or something like this.
>>
>> During configuring my Nagios I observed possible bug OR at least need
>> of updating manual page
>> http://nagios.sourceforge.net/docs/3_0/ ... tions.html.
>>
>> ERROR:
>> During start, restart or nagios -v sequence following error messages:
>> Error: Invalid max_check_attempts value for host 'vlm-srv-ad'
>> Error: Could not register host (config file
>> '/etc/nagios3/conf.d/ae/o-servers.cfg', starting on line 39)
>> =C2=A0 =C2=A0Error processing object config files!
>>
>> CAUSE:
>> Missing max_check_attempts for host object if check_interval for host
>> object is used.
>>
>> I think that this behavior is bug or is not docummented that you also
>> have to set max_check_attempts.
>>
>> HOW TO REPRODUCE:
>> 1) I created new .cnf file for my servers named servers.cnf
>> 2) Define new hostgroup:
>> define hostgroup {
>> =C2=A0 =C2=A0 =C2=A0hostgroup_name =C2=A0 =C2=A0 servers
>> =C2=A0 =C2=A0 =C2=A0alias =C2=A0 =C2=A0 =C2=A0My server
>> }
>> 3) Define a new host "template" (a parent for object definition
>> inheritance) and decrease check_interval from default 5 to 1 minute
>> (default from /etc/nagios3/conf.d/generic-host_nagios2.cfg)
>> define host {
>> =C2=A0 =C2=A0 =C2=A0name =C2=A0 =C2=A0 =C2=A0server-host-template
>> =C2=A0 =C2=A0 =C2=A0check_interval =C2=A0 =C2=A0 1
>> }
>> 4) Define host for my first server:
>> define host {
>> =C2=A0 =C2=A0 use server-host-template
>> =C2=A0 =C2=A0 host_name =C2=A0 =C2=A0MyFirstServer
>> =C2=A0 =C2=A0 address =C2=A0 10.0.0.1
>> =C2=A0 =C2=A0 hostgroups =C2=A0 =C2=A0servers
>> }
>> 5) Now $ nagios3 -v /etc/nagios3/nagios.cfg will produce errors from abo=
ve.
>> 6) Not documented is that I have to set also max_check_attempts. So
>> template will looke like:
>> define host {
>> =C2=A0 =C2=A0 =C2=A0name =C2=A0 =C2=A0 =C2=A0server-host-template
>> =C2=A0 =C2=A0 =C2=A0check_interval =C2=A0 =C2=A0 1
>> =C2=A0 =C2=A0 =C2=A0max_check_attempts =C2=A0 =C2=A0 5
>> }
>>
>> ENVIRONMENT:
>> Ubuntu 10.04 32bit (Lucid)
>> Nagios3 (Version 3.2.0, August 12, 2009) from Ubuntu Lucid deb package
>>
>> --
>> Hezky den / Have a nice day
>> Libor JEL=C3=8DNEK
>>
>> VIRTAGE SOFTWARE // software - design - web
>> Lucni 542 // 285 04 Uhlirske Janovice // Czech Republic
>> support: +420 315 555 488 // cell: +420 777 205 142
>> email/jabber: [email protected] // web: www.virtage.com
>>
>> ------------------------------------------------------------------------=
------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-f=
ree!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked