code: def stats(self, details=False):
          
          if details is not False:
              details = bool(details)
          res = self.identity()
          res.update(self.app.get_daemon_stats(details=details))
          return res
docs: Get statistics and information from the daemon
  
          Returns an object with the daemon identity, the daemon start_time
          and some extra properties depending upon the daemon type.
  
          All daemons provide these ones:
          - program_start: the Alignak start timestamp
          - spare: to indicate if the daemon is a spare one
          - load: the daemon load
          - modules: the daemon modules information
          - counters: the specific daemon counters
  
          :param details: Details are required (different from 0)
          :type details str
  
          :return: daemon stats
          :rtype: dict