def summary(svc_name=''):
    ret = {}
    cmd = 'monit summary'
    res = __salt__['cmd.run'](cmd).splitlines()
    for line in res:
        if 'daemon is not running' in line:
            return dict(monit='daemon is not running', result=False)
        elif not line or svc_name not in line or 'The Monit daemon' in line:
            continue
        else:
            parts = line.split('\'')
            if len(parts) == 3:
                resource, name, status_ = (
                    parts[0].strip(), parts[1], parts[2].strip()
                )
                if svc_name != '' and svc_name != name:
                    continue
                if resource not in ret:
                    ret[resource] = {}
                ret[resource][name] = status_
    return ret
[<channel>]
dataset/ETHPy150Open saltstack/salt/salt/modules/monit.py/summary--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Relay/plugin.py/Relay.nicks