def METHOD_NAME(self):
    """
    Test redis keyspace metricset
    """
    # At least one event must be inserted so db stats exist
    host, port = self.compose_host().split(":")
    r = redis.StrictRedis(
        host=host,
        port=port,
        db=0)
    r.flushall()
    r.set('foo', 'bar')
    self.render_config_template(modules=[{
        "name": "redis",
        "metricsets": ["keyspace"],
        "hosts": self.get_hosts(),
        "period": "5s"
    }])
    proc = self.start_beat()
    self.wait_until(lambda: self.output_lines() > 0)
    proc.check_kill_and_wait()
    self.assert_no_logged_warnings()
    output = self.read_output_json()
    self.assertEqual(len(output), 1)
    evt = output[0]
    self.assertCountEqual(self.de_dot(REDIS_FIELDS), evt.keys())
    redis_info = evt["redis"]["keyspace"]
    self.assertCountEqual(self.de_dot(REDIS_KEYSPACE_FIELDS), redis_info.keys())
    self.assert_fields_are_documented(evt)