diff --git a/output_redis.go b/output_redis.go index 135f9cb0f59f..6181af5a59f6 100644 --- a/output_redis.go +++ b/output_redis.go @@ -78,7 +78,7 @@ func (out *RedisOutputType) Init(config tomlMothership) error { } INFO("[RedisOutput] Redis connection timeout %s", out.Timeout) INFO("[RedisOutput] Redis reconnect interval %s", out.ReconnectInterval) - INFO("[RedisOutput] Using index pattern [%s-]YYYY.MM.DD", out.Index) + INFO("[RedisOutput] Using index pattern %s", out.Index) INFO("[RedisOutput] Topology expires after %s", out.TopologyExpire) INFO("[RedisOutput] Using db %d for storing events", out.Db) INFO("[RedisOutput] Using db %d for storing topology", out.DbTopology) @@ -212,15 +212,13 @@ func (out *RedisOutputType) UpdateLocalTopologyMap(client *redis.Client) { func (out *RedisOutputType) PublishEvent(event *Event) error { - index := fmt.Sprintf("%s-%d.%02d.%02d", out.Index, event.Timestamp.Year(), event.Timestamp.Month(), event.Timestamp.Day()) - json_event, err := json.Marshal(event) if err != nil { ERR("Fail to convert the event to JSON: %s", err) return err } - out.sendingQueue <- RedisQueueMsg{index: index, msg: string(json_event)} + out.sendingQueue <- RedisQueueMsg{index: out.Index, msg: string(json_event)} DEBUG("output_redis", "Publish event") return nil diff --git a/packetbeat.conf b/packetbeat.conf index d16bb9505bcb..609ee4874484 100644 --- a/packetbeat.conf +++ b/packetbeat.conf @@ -28,8 +28,10 @@ # Uncomment this option if you want to store the topology in Elasticsearch. By default is false. # save_topology = true - # Optional index name and HTTP path + # Optional index name. By default is packetbeat and generates [packetbeat-]YYYY.MM.DD keys. # index = "packetbeat" + + # Optional HTTP Path # path = "/elasticsearch" @@ -44,8 +46,7 @@ # Comment out this option if you want to store the topology in Redis. By default is false. save_topology = true - # Optional index name. By default is packetbeat and generates - # keys of type [packetbeat-]YYYY.MM.DD. + # Optional index name. By default is packetbeat and generates packetbeat keys. # index = "packetbeat" # Optional Redis database number where the events are stored