code: def mon_status_check(conn, logger, hostname, args):
      
      asok_path = paths.mon.asok(args.cluster, hostname)
  
      out, err, code = remoto.process.check(
          conn,
          [
              'ceph',
              '--cluster={cluster}'.format(cluster=args.cluster),
              '--admin-daemon',
              asok_path,
              'mon_status',
          ],
      )
  
      for line in err:
          logger.error(line)
  
      try:
          return json.loads(b''.join(out).decode('utf-8'))
      except ValueError:
          return {}
docs: A direct check for JSON output on the monitor status.
  
      For newer versions of Ceph (dumpling and newer) a new mon_status command
      was added ( `ceph daemon mon mon_status` ) and should be revisited if the
      output changes as this check depends on that availability.