Results 1 to 5 of 5

Thread: More than 1 template?

  1. #1
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    More than 1 template?

    Hi
    It's possible to use more than one template within a host or service?
    I'm trying to do it in order to have a structured feature set.....but i'm not sure it is working..

    thank you

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: More than 1 template?

    Yes it will works

    The properties will be take from the first template that got this property.
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    Re: More than 1 template?

    Hi
    then i'm not using it at right way ;D
    at "templates.cfg" file I defined several items with one feature used or not used by the services, planning to use within service definition

    define service{
    name svc-with-pnp
    use t-generic-service
    process_perf_data 1
    action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$......etc etc.
    register 0 }

    and the opposite without action_url and perfdata 0 (named svc-without-pnp)
    another 2 templates with only check and notification period commands, one with timeperiod 24x7 and other with time-office-hours

    define service{
    name svc-time-critical
    use t-generic-service
    notification_period time-24x7
    register 0 }

    define service{
    name svc-time-nocriti
    use t-generic-service
    notification_period time-office
    register 0 }

    and then use then at services

    define service {
    name critical-server
    use svc-with-pnp
    use svc -teme-critical
    use .... ; here more templates with or without one feature...
    use....
    check....

    register 1}

    define service {
    name normal-server
    use svc-with-pnp
    use svc-time-nocriti
    use .... ; here more templates with or without one feature...
    use....
    check....

    register 1}

    this way is correct?

    thanks

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: More than 1 template?

    No indeed ;D

    you must put all in teh same line, with , separation, that's all
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Junior Member
    Join Date
    Feb 2018
    Posts
    1
    For the installation and the configuration you can register onthis blog and get the template for your work. You can buy a dissertation and get the password for your work here. Start posting your work in the positive way for the best deals.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •