def monit_status(summary, service):
 for line in summary.split('\n'):
  if (service in line):
   return ' '.join(line.split()[2:])
 raise ServiceException('Unable to find Monit entry for {}'.format(service))

def monit_status ( summary , service ) : for line in summary . split ( '\n' ) : if ( service in line ) : return ' ' . join ( line . split ( ) [ 2 : ] ) raise ServiceException ( 'Unable to find Monit entry for {}' . format ( service ) )
retrieves the status of a monit service .