def server_status(profile='default'):
    ret = {
        'Scoreboard': {
            '_': 0,
            'S': 0,
            'R': 0,
            'W': 0,
            'K': 0,
            'D': 0,
            'C': 0,
            'L': 0,
            'G': 0,
            'I': 0,
            '.': 0,
        },
    }

    # Get configuration from pillar
    url = __salt__['config.get'](
        'apache.server-status:{0}:url'.format(profile),
        'http://localhost/server-status'
    )
    user = __salt__['config.get'](
        'apache.server-status:{0}:user'.format(profile),
        ''
    )
    passwd = __salt__['config.get'](
        'apache.server-status:{0}:pass'.format(profile),
        ''
    )
    realm = __salt__['config.get'](
        'apache.server-status:{0}:realm'.format(profile),
        ''
    )
    timeout = __salt__['config.get'](
        'apache.server-status:{0}:timeout'.format(profile),
        5
    )

    # create authentication handler if configuration exists
    if user and passwd:
        basic = _HTTPBasicAuthHandler()
        basic.add_password(realm=realm, uri=url, user=user, passwd=passwd)
        digest = _HTTPDigestAuthHandler()
        digest.add_password(realm=realm, uri=url, user=user, passwd=passwd)
        _install_opener(_build_opener(basic, digest))

    # get http data
    url += '?auto'
    try:
        response = _urlopen(url, timeout=timeout).read().splitlines()
    except URLError:
        return 'error'

    # parse the data
    for line in response:
        splt = line.split(':', 1)
        splt[0] = splt[0].strip()
        splt[1] = splt[1].strip()

        if splt[0] == 'Scoreboard':
            for c in splt[1]:
                ret['Scoreboard'][c] += 1
        else:
            if splt[1].isdigit():
                ret[splt[0]] = int(splt[1])
            else:
                ret[splt[0]] = float(splt[1])

    # return the good stuff
    return ret
Get Information from the Apache server-status handler
dataset/ETHPy150Open saltstack/salt/salt/modules/apache.py/server_status