'Check to see if kibana route is up and working.
Raises exception if not.'

def check_kibana_route(self):

    kibana_url = self._get_kibana_url()
    error = self._verify_url_internal(kibana_url)
    if error:
        if ('urlopen    error    [Errno    111]    Connection    refused' in error):
            raise OpenShiftCheckException('FailedToConnectInternal', 'Failed    to    connect    from    this    master    to    Kibana    URL    {url}\nIs    kibana    running,    and    is    at    least    one    router    routing    to    it?'.format(url=kibana_url))
        elif ('urlopen    error    [Errno    -2]    Name    or    service    not    known' in error):
            raise OpenShiftCheckException('FailedToResolveInternal', 'Failed    to    connect    from    this    master    to    Kibana    URL    {url}\nbecause    the    hostname    does    not    resolve.\nIs    DNS    configured    for    the    Kibana    hostname?'.format(url=kibana_url))
        elif ('Status    code    was    not' in error):
            raise OpenShiftCheckException('WrongReturnCodeInternal', 'A    request    from    this    master    to    the    Kibana    URL    {url}\ndid    not    return    the    correct    status    code    (302).\nThis    could    mean    that    Kibana    is    malfunctioning,    the    hostname    is\nresolving    incorrectly,    or    other    network    issues.    The    output    was:\n        {error}'.format(url=kibana_url, error=error))
        raise OpenShiftCheckException('MiscRouteErrorInternal', ('Error    validating    the    logging    Kibana    route    internally:\n' + error))
    if (self.get_var('openshift_check_efk_kibana_external', default='True').lower() != 'true'):
        return
    error = self._verify_url_external(kibana_url)
    if (not error):
        return
    error_fmt = 'Error    validating    the    logging    Kibana    route:\n{error}\nTo    disable    external    Kibana    route    validation,    set    the    variable:\n        openshift_check_efk_kibana_external=False'
    if ('urlopen    error    [Errno    111]    Connection    refused' in error):
        msg = 'Failed    to    connect    from    the    Ansible    control    host    to    Kibana    URL    {url}\nIs    the    router    for    the    Kibana    hostname    exposed    externally?'.format(url=kibana_url)
        raise OpenShiftCheckException('FailedToConnect', error_fmt.format(error=msg))
    elif ('urlopen    error    [Errno    -2]    Name    or    service    not    known' in error):
        msg = 'Failed    to    resolve    the    Kibana    hostname    in    {url}\nfrom    the    Ansible    control    host.\nIs    DNS    configured    to    resolve    this    Kibana    hostname    externally?'.format(url=kibana_url)
        raise OpenShiftCheckException('FailedToResolve', error_fmt.format(error=msg))
    elif ('Expected    success    (200)' in error):
        msg = 'A    request    to    Kibana    at    {url}\nreturned    the    wrong    error    code:\n        {error}\nThis    could    mean    that    Kibana    is    malfunctioning,    the    hostname    is\nresolving    incorrectly,    or    other    network    issues.'.format(url=kibana_url, error=error)
        raise OpenShiftCheckException('WrongReturnCode', error_fmt.format(error=msg))
    raise OpenShiftCheckException('MiscRouteError', ('Error    validating    the    logging    Kibana    route    externally:\n' + error))
