Sure. Some values have been removed for privacy. Here is a JSON document from the cluster where the cloned data are routed.
{
"_index": "logstash-2018.11.14",
"_type": "vger_logs",
"_id": "F236CE3FBA7C45FE9CF181F7A8C90B83",
"_version": 1,
"_score": null,
"_source": {
"msg": "proslic: P_TH_HVIC 2011mW VBAT_IRQ_TH 33V",
"process": "kernel",
"type": "vger_logs",
"svr": "err",
"message_size": 43,
"rsyshost": "rsyslog-proxy-5",
"@timestamp": "2018-11-14T14:05:16.484Z",
"port": 38852,
"host": <VALUE REMOVED>,
"@version": "1",
"tag": "kernel",
"original_message_size": 98
},
"fields": {
"@timestamp": [
1542204316484
]
},
"sort": [
1542204316484
]
}
For comparison, here's a JSON doc from an uncloned event:
{
"_index": "logstash-2018.11.14",
"_type": "logs",
"_id": "646529A051614473A1FE5FBADFCD2D39",
"_version": 1,
"_score": null,
"_source": {
"msg": "proslic: P_TH_HVIC 2011mW VBAT_IRQ_TH 4V",
"rsyshost": "rsyslog-proxy-15",
"process": "kernel",
"@timestamp": "2018-11-14T14:09:33.346Z",
"port": 37334,
"host": <VALUE REMOVED>,
"@version": "1",
"tag": "kernel",
"original_message_size": 97,
"svr": "err",
"message_size": 42
},
"fields": {
"@timestamp": [
1542204573346
]
},
"sort": [
1542204573346
]
}
And here is the relevant Logstash clone filter:
filter {
if [@metadata][clone] != "true" {
clone {
clones => ["vger_logs"]
add_field => { "[@metadata][clone]" => "true" }
id => "cortana-relay-clone"
}
}
}
The version of Logstash is 6.4.2. The Elasticsearch cluster receiving the original event is 5.4.0, and the cluster receiving the clone is version 5.5.2. These are going to be upgraded to 6.4.2 in the near future but I doubt the Elasticsearch version makes much difference. On the other hand, maybe the type and _type fields are stripped with the most recent version during ingestion? I dunno.
Also I suppose if the type field gets added I could use that field's value in the clone filter in the "if" statement rather than the metadata field I add to clones, but I wasn't expecting the type field even to exist.