Re: [Nagios-users] Can templates be cascaded together?

2006-03-01 Thread Jim Perrin
>
> Why would I want to use such an arrangement?  Simple: the "blah" service 
> defines
> generic values I want for ALL service checks (enable_notifications, etc...).
> The "info" service defines generic values for each check type - check_ping for
> example (check_command, service description, etc...).  Of course, "checkit" is
> where I define which service to check on which host.
>
> Would this work?
>
>

Sure. See "inheritance chaining" in the documentation
http://nagios.sourceforge.net/docs/2_0/templaterecursion.html
you did read them right? :-P




--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety''
Benjamin Franklin 1775


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
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] Can templates be cascaded together?

2006-03-01 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Ron Gage
> Sent: Wednesday, March 01, 2006 3:52 PM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Can templates be cascaded together?
> 
> Can we cascade a template as in the following:
> 
> define service{
> name blah
> ...
> register 0
> }
> define service{
> name info
> use blah
> ...
> register 0
> }
> define service{
> name checkit
> use info
> ...
> }

That's almost identical to the example usage in the documentation and
should work as you expect -

http://nagios.sourceforge.net/docs/2_0/templaterecursion.html (see
Inheritance Chainging)

"   define host{
host_name   bighost1
check_command   check-host-alive
notification_optionsd,u,r
max_check_attempts  5
namehosttemplate1
}

define host{
host_name   bighost2
max_check_attempts  3
use hosttemplate1
namehosttemplate2
}

define host{
host_name   bighost3
use hosttemplate2
}
"

The above are chained definitions for real hosts (register 1 assumed)
but it'll work for templates too I'm sure.

--
Marc


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
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


[Nagios-users] Can templates be cascaded together?

2006-03-01 Thread Ron Gage
Can we cascade a template as in the following:

define service{
name blah
...
register 0
}
define service{
name info
use blah
...
register 0
}
define service{
name checkit
use info
...
}

Why would I want to use such an arrangement?  Simple: the "blah" service defines
generic values I want for ALL service checks (enable_notifications, etc...). 
The "info" service defines generic values for each check type - check_ping for
example (check_command, service description, etc...).  Of course, "checkit" is
where I define which service to check on which host.

Would this work?


-- 
Ron Gage
(LPIC1 MCP A+ Net+)
Westland, Michigan


This message was sent using IMP, the Internet Messaging Program.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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