code: def _metric_to_riemann_event(self, metric):
          
          # Riemann has a separate "host" field, so remove from the path.
          path = '%s.%s.%s' % (
              metric.getPathPrefix(),
              metric.getCollectorPath(),
              metric.getMetricPath()
          )
  
          return self.client.create_event({
              'host': metric.host,
              'service': path,
              'time': metric.timestamp,
              'metric_f': float(metric.value),
              'ttl': metric.ttl,
          })
docs: Convert a metric to a dictionary representing a Riemann event.