but, now we have a new problem - if for some reason the event does NOT have the remote_ip field - the event fails to be sent to ES ....
I just tried to send an event:
{
"event_uuid":"m_id_1025_8",
"logstash_id":"m_id_1025_8",
"cid":"12345",
"event_timestamp_millis":"1666707272000",
"activity_date":"2022-10-25",
"user_agent":"Mozilla/5.0 (X11; CrOS aarch64 13421.102.0) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/86.0.4240.199 Safari/537.36",
"referer":"https://www.my.site1.com/",
"ref_param":"https://www.nyt.com",
"request_status":"500",
"request_method":"POST",
"request_size":"52",
"response_size":"124",
"latency":"1.3"
}
and see this error:
(status=400): {"type":"illegal_argument_exception","reason":"field [remote_ip] not present as part of path [message.remote_ip]"}, dropping event!"
in filebeat logs:
{"log.level":"info","@timestamp":"2022-10-25T16:52:34.011-0400","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/client_worker.go","file.line":147},"message":"Connection to backoff(elasticsearch(http://localhost:9200)) established","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2022-10-25T16:57:18.934-0400","log.logger":"elasticsearch","log.origin":{"file.name":"elasticsearch/client.go","file.line":429},"message":"Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Date(2022, time.October, 25, 20, 57, 17, 585000000, time.UTC), Meta:{\"_id\":\"m_id_1025_8\",\"pipeline\":\"geoip-no-missing\"}, Fields:{\"agent\":{\"ephemeral_id\":\"83c397dd-ec26-4570-bad6-7a7600671487\",\"id\":\"e0b4f8e6-d0c6-4c38-a62d-ac6ff81a555a\",\"name\":\"dhcp-10-250-50-96.harvard.edu\",\"type\":\"filebeat\",\"version\":\"8.4.3\"},\"ecs\":{\"version\":\"8.0.0\"},\"event\":{\"created\":\"2022-10-25T20:57:17.761Z\",\"id\":\"59279bf715-5532496295095422\"},\"host\":{\"architecture\":\"x86_64\",\"hostname\":\"dhcp-10-250-50-96.harvard.edu\",\"id\":\"xxx443\",\"ip\":[\"fe80::aede:48ff:fe00:1122\",\"fe8022\"],\"name\":\"dhcp-10-250-50-96.harvard.edu\",\"os\":{\"build\":\"21E258\",\"family\":\"darwin\",\"kernel\":\"21.4.0\",\"name\":\"macOS\",\"platform\":\"darwin\",\"type\":\"macos\",\"version\":\"12.3.1\"}},\"input\":{\"type\":\"gcp-pubsub\"},\"message\":{\"activity_date\":\"2022-10-25\",\"cid\":\"12345\",\"event_timestamp_millis\":\"1666707272000\",\"latency\":\"1.3\",\"logstash_id\":\"m_id_1025_8\",\"ref_param\":\"https://www.nyt.com\",\"referer\":\"https://www.my.site1.com/\",\"request_method\":\"POST\",\"request_size\":\"52\",\"request_status\":\"500\",\"response_size\":\"124\",\"user_agent\":\"Mozilla/5.0 (X11; CrOS aarch64 13421.102.0) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/86.0.4240.199 Safari/537.36\"}}, Private:(*pubsub.Message)(0xc0003d21c0), TimeSeries:false}, Flags:0x1, Cache:publisher.EventCache{m:mapstr.M(nil)}} (status=400): {\"type\":\"illegal_argument_exception\",\"reason\":\"field [remote_ip] not present as part of path [message.remote_ip]\"}, dropping event!","service.name":"filebeat","ecs.version":"1.6.0"}