Router log parse failure when disable_log_source_ip = true
When the gorouter is configured to not log source IPs, the source IP field in the router logs is replaced with -, rather than the usual host-port pair. Logsearch-for-cloudfoundry is currently unable to parse these logs, which result in them being tagged with fail/cloudfoundry/app-rtr/grok and the rest of the fields not being extracted properly.
This PR replaces the source IP log parsing code for cf 252+ from:
Hi Logsearch-for-cloudfoundry team,
This PR fixes two issues:
Router log parse failure when disable_log_source_ip = true
When the gorouter is configured to not log source IPs, the source IP field in the router logs is replaced with
-
, rather than the usual host-port pair. Logsearch-for-cloudfoundry is currently unable to parse these logs, which result in them being tagged withfail/cloudfoundry/app-rtr/grok
and the rest of the fields not being extracted properly.This PR replaces the source IP log parsing code for cf 252+ from:
to:
Supporting logs where source IP logging is disabled.
Router log parse failure for routing API logs
Routing API logs have the following format:
For the routing API logs, app_index is
-
, not an integer so the parsing rule fails.This PR replaces the app_index log parsing code for cf 252+ from:
to:
Supporting logs where app index is
-
.We have tested this manually by editing the log parsing code on an ingestor, restarting and verifying that the router logs are parsed correctly.
kind regards,
Pete