Changeset 6615


Ignore:
Timestamp:
Jan 16, 2009, 5:47:29 PM (17 years ago)
Author:
maarten
Message:

-cleanup main nagios config template -split up interface check config in multi template

Location:
trunk/exodus/templates/nagios
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/exodus/templates/nagios/exodus.cfg

    r6612 r6615  
    1 {#
    2 Main template for nagios configuration.
    3 Nagios object templates can be identified with the .nagios extension
    4 
    5 todo:
    6 for parent child relations (as far as possible in nagios) detect them
    7 and make use of the 'parents' directive in the object.cfg.
    8 ? possibly inserted in template with template tags ?
    9 #}
     1{# Main template for nagios configuration.                               #}
     2{# Nagios object templates can be identified with the .nagios extension  #}
     3{#                                                                       #}
     4{# TODO:                                                                 #}
     5{# for parent child relations (as far as possible in nagios) detect them #}
     6{# and make use of the 'parents' directive in the object.cfg.            #}
     7{# ? possibly inserted in template with template tags ?                  #}
    108
    119{% for node in nodes %}
     10    {# generate host definition #}
    1211    {% include "nagios/object.nagios" %}
     12   
     13    {# generate service definitions #}
    1314    {% include "nagios/services/check_snmp.nagios" %}
    1415    {% include "nagios/services/check_dns.nagios" %}
    1516    {% include "nagios/services/check_pen.nagios" %}
    1617    {% include "nagios/services/check_version.nagios" %}
    17     {% include "nagios/services/check_if.nagios" %} 
     18   
     19    {# generate interface services and dependencies #}
     20    {% include "nagios/interface.nagios" %} 
    1821{% endfor %}
  • trunk/exodus/templates/nagios/object.nagios

    r6612 r6615  
    11define host {
    22    host_name       {{ node.name }}
    3 {#    alias           {{ node.name + '.' + node.network.name }} #}
    4     alias           {{ node.name }}
     3    alias           {{ node.name }}.{{ node.network.name }}
    54    use             nodes
    65    address         {{ node.masterip }}
  • trunk/exodus/templates/nagios/services/check_if.nagios

    r6612 r6615  
    1 {% for nic in node.interface_set.all %}
    21define service {
    32    host_name           {{ node.name }}
     
    76    servicegroups       all_interfaces
    87}
    9     {% ifnotequal nic nic.link %}
    10 define servicedependency{
    11     host_name       {{ node.name }}
    12     service_description     Check interface {{ nic.iface }}
    13     dependent_host_name     {{ nic.link.node }}
    14     dependent_service_description   Check interface {{ nic.link.iface }}
    15     execution_failure_criteria  w,u,c
    16 }
    17     {% endifnotequal %}
    18 {% endfor %}
Note: See TracChangeset for help on using the changeset viewer.