Changeset 6610


Ignore:
Timestamp:
Jan 16, 2009, 3:22:29 AM (16 years ago)
Author:
maarten
Message:

First implementation nagios config with host and service definitions. also with service dependencies on interfaces and SNMP.
beware of typo's...srry blind coded ;)

Location:
trunk/exodus
Files:
12 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/exodus/urls.py

    r6525 r6610  
    1414    (r'^view/nodelist/$', 'exodus.views.viewNodelist'),
    1515    (r'^view/node/(?P<node>.+)/$', 'exodus.views.viewNode'),
    16     (r'^nagios/$', 'exodus.views.nagios'),
    1716
    1817    # Content views
     
    2625    # config urls
    2726    (r'^config/(?P<version>.+)/(?P<node>.+)/(?P<file>.+)$', 'exodus.views.configFile'),
    28 
     27   
     28    # Nagios configuration
     29    url(r'^view/nagios/$', 'exodus.urls.direct_to_template', {'template': 'viewNagios.html'}, "csvIndex"),
     30    (r'^view/nagios/exodus.cfg$', 'exodus.views.viewNagios'),
     31   
    2932    # 3th party/embedded database browser
    3033    (r'^databrowse/(.*)', databrowse.site.root),
  • trunk/exodus/views.py

    r6525 r6610  
    6767    node = Node.objects.get(name=node)
    6868   
    69     # Extra statictics information for use of generation
     69    # Extra statistics information for use of generation
    7070    server = {}
    7171    server['host'] = gethostname()
     
    7575            mimetype='text/plain')
    7676
    77 def nagios(request):
     77def viewNagios(request, file):
    7878    nodes = Node.objects.all()
    79     return render_to_response('nagios.txt', {'nodes' : nodes},
    80             mimetype='text/plain')
     79    interfaces = Interface.objects.all()
     80    return render_to_response('nagios/exodus.cfg', {'nodes' : nodes}, mimetype='text/plain')
    8181
     82
Note: See TracChangeset for help on using the changeset viewer.