Changeset 6618


Ignore:
Timestamp:
Jan 18, 2009, 5:18:39 AM (16 years ago)
Author:
maarten
Message:

added hostgroup definition on network and location

Location:
trunk/exodus
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/exodus

    • Property svn:ignore
      •  

        old new  
        11*.pyc
         2exodus.db
         3py.conf
  • trunk/exodus/templates/nagios/exodus.cfg

    r6617 r6618  
    11# This configuration is generated on {% now "G:i j-n-Y" %} by exodus
    22# You can fetch the latest config @ exodus under view/nagios
     3
     4###########################
     5# Hostgroup configuration #
     6###########################
     7{% include "nagios/hostgroup.nagios" %}
     8
     9#########################
     10# Objects configuration #
     11#########################
    312{% for node in nodes %}
    4 {% include "nagios/object.nagios" %}{# generate host definition #}
     13{% include "nagios/object.nagios" %}
    514{% include "nagios/services/check_snmp.nagios" %}{# generate service definitions #}
    615{% include "nagios/services/check_dns.nagios" %}
  • trunk/exodus/templates/nagios/object.nagios

    r6617 r6618  
     1{% load location %}
    12define host {
    23    host_name {{ node.name }}
     
    56    address {{ node.masterip }}
    67    check_command check_alive
    7     hostgroups {{ node.network.name }}
     8    hostgroups {{ node.network.name }},{{ node.location.description|getLocationName|slugify }}
    89    notes This configuration is generated on {% now "G:i j-n-Y" %} by exodus
    910    notes_url http://rick.wleiden.net/exodus{% url exodus.views.viewNode node.name %}
  • trunk/exodus/templatetags

    • Property svn:ignore set to
      *.pyc
  • trunk/exodus/views.py

    r6612 r6618  
    88
    99
    10 from exodus.models import Node
     10from exodus.models import Node, Network, Location
    1111
    1212# Views
     
    7777def viewNagios(request):
    7878    nodes = Node.objects.all()
    79     return render_to_response('nagios/exodus.cfg', {'nodes' : nodes}, mimetype='text/plain')
     79    networks = Network.objects.all()
     80    locations = Location.objects.all()
     81    return render_to_response('nagios/exodus.cfg', {'nodes' : nodes, 'networks' : networks, 'locations' : locations}, mimetype='text/plain')
    8082
    8183
Note: See TracChangeset for help on using the changeset viewer.