code: def manage_service_check_result_brok(self, b):
          host_name = b.data.get('host_name', None)
          service_description = b.data.get('service_description', None)
          if not host_name or not service_description:
              return
          service_id = host_name+"/"+service_description
          logger.debug("service check result: %s", service_id)
          if not self.ignore_unknown and host_name not in self.hosts_cache:
              logger.warning("received service check result for an unknown host: %s", service_id)
              return
          if service_id not in self.services_cache and not self.ignore_unknown:
              logger.warning("received service check result for an unknown service: %s", service_id)
              return
          metrics = self.get_metrics_from_perfdata(service_description, b.data['perf_data'])
          if not metrics:
              logger.debug("no metrics to send ...")
              return
          if self.ignore_latency_limit >= b.data['latency'] > 0:
              check_time = int(b.data['last_chk']) - int(b.data['latency'])
          else:
              check_time = int(b.data['last_chk'])
          hname = sanitize_name(host_name)
          if host_name in self.hosts_cache:
              if self.hosts_cache[host_name].get('_GRAPHITE_GROUP', None):
                  hname = ".".join((self.hosts_cache[host_name].get('_GRAPHITE_GROUP'), hname))
              if self.hosts_cache[host_name].get('_GRAPHITE_PRE', None):
                  hname = ".".join((self.hosts_cache[host_name].get('_GRAPHITE_PRE'), hname))
          desc = sanitize_name(service_description)
          if service_id in self.services_cache:
              if self.services_cache[service_id].get('_GRAPHITE_POST', None):
                  desc = ".".join((desc, self.services_cache[service_id].get('_GRAPHITE_POST', None)))
          if self.graphite_data_source:
              path = '.'.join((hname, self.graphite_data_source, desc))
          else:
              path = '.'.join((hname, desc))
          if self.realms_prefix and self.hosts_cache[host_name].get('realm_name', None):
              path = '.'.join((self.hosts_cache[host_name].get('realm_name'), path))
          realm_name = None
          if host_name in self.hosts_cache:
              realm_name = self.hosts_cache[host_name].get('realm_name', None)
          self.send_to_tsdb(realm_name, host_name, service_description, metrics, check_time, path)