def show_services(service_name):
    """ list of services that match a service name, this will show the same
    service across a number of servers. """
    extra_filters = gather_filters(request)

    service_list = query.get_services(service_name, 
    columns='host_name description state last_check last_state_change plugin_output acknowledged host_acknowledged current_attempt max_check_attempts',
    extra_filter=extra_filters)

    service_stats = query.service_stats(
    extra_filter="description = %(service_name)s" % locals())
    return render_template('service_list.template', service_list=service_list,
    service_stats=service_stats, settings=settings )
def service_detail(host_name, service_name):
    """ Find details of a service for a host and a service_name """
    extra_filters = gather_filters(request)
    extra_filters.append('host_name = %(host_name)s' % locals())
    #cols = [ 'description','host_name','notification_period',
    #'host_plugin_output','action_url','notes_url','state','acknowledged',
    #'last_check','check_type','next_check','last_state_change',
    #'last_notification', 'plugin_output','last_notification',
    #next_notification','host_num_services_ok' ]
    service = query.get_services(service_name, columns=None,
    extra_filter=extra_filters)
    service = service[0]

    return render_template('service_detail.template', service=service, 
    settings=settings )