Exemple #1
0
def home(request):
    plugins, working = get_plugins()

    if working:
        return HttpResponse(loader.render_to_string("health_check/dashboard.html", {'plugins': plugins}))
    else:
        return HttpResponseServerError(loader.render_to_string("health_check/dashboard.html", {'plugins': plugins}))
Exemple #2
0
 def handle(self, *args, **options):
     plugins, working = get_plugins()
     sys.stdout.write("Running Health checks\n")
     for plugin in plugins:
         sys.stdout.write("Running Health check - %s\n" %
                          str(plugin.identifier()))
         sys.stdout.write("Result - %s\n" % str(plugin.pretty_status()))
Exemple #3
0
def yamlhealthcheck(request):
    plugins, working = get_plugins()

    health_check_status = {}
    for plugin in plugins:
            health_check_status[str(plugin.identifier())] = str(plugin.pretty_status())

    health_check_yaml = yaml.dump(health_check_status)
    return HttpResponse(health_check_yaml, content_type='application/x-yaml')
Exemple #4
0
def jsonhealthcheck(request):
    plugins, working = get_plugins()

    health_check_status = {}
    for plugin in plugins:
            health_check_status[str(plugin.identifier())] = str(plugin.pretty_status())

    health_check_json = json.dumps(health_check_status)
    return HttpResponse(health_check_json, content_type='application/json')
Exemple #5
0
def yamlhealthcheck(request):
    plugins, working = get_plugins()

    health_check_status = {}
    for plugin in plugins:
        health_check_status[str(plugin.identifier())] = str(
            plugin.pretty_status())

    health_check_yaml = yaml.dump(health_check_status)
    return HttpResponse(health_check_yaml, content_type='application/x-yaml')
Exemple #6
0
def jsonhealthcheck(request):
    plugins, working = get_plugins()

    health_check_status = {}
    for plugin in plugins:
        health_check_status[str(plugin.identifier())] = str(
            plugin.pretty_status())

    health_check_json = json.dumps(health_check_status)
    return HttpResponse(health_check_json, content_type='application/json')
Exemple #7
0
def home(request):
    plugins, working = get_plugins()

    if working:
        return HttpResponse(
            loader.render_to_string("health_check/dashboard.html",
                                    {'plugins': plugins}))
    else:
        return HttpResponseServerError(
            loader.render_to_string("health_check/dashboard.html",
                                    {'plugins': plugins}))
Exemple #8
0
def texthealthcheck(request):
    plugins, working = get_plugins()

    health_check_statuses = {}
    for plugin in plugins:
            health_check_statuses[str(plugin.identifier())] = str(plugin.pretty_status())

    health_check_status_text = ''
    for health_check_status_key,health_check_status_value  in health_check_statuses.items():
        health_check_status_text+='%s\t%s\n' % (health_check_status_key,health_check_status_value)
    return HttpResponse(health_check_status_text, content_type='text/plain')
Exemple #9
0
def texthealthcheck(request):
    plugins, working = get_plugins()

    health_check_statuses = {}
    for plugin in plugins:
        health_check_statuses[str(plugin.identifier())] = str(
            plugin.pretty_status())

    health_check_status_text = ''
    for health_check_status_key, health_check_status_value in health_check_statuses.items(
    ):
        health_check_status_text += '%s\t%s\n' % (health_check_status_key,
                                                  health_check_status_value)
    return HttpResponse(health_check_status_text, content_type='text/plain')
 def handle(self, *args, **options):
     plugins, working = get_plugins()
     sys.stdout.write("Running Health checks\n")
     for plugin in plugins:
         sys.stdout.write("Running Health check - %s\n" % str(plugin.identifier()))
         sys.stdout.write("Result - %s\n" % str(plugin.pretty_status()))