0
votes

Is there any possibility in PCF to disable all PCF related logs and send only Application logs to log-analyzer tool. This would really help.

All the RTR logs are summing up the log sizes in GBs and we would like to see only Application related logs

1
Doesn't solve your problem, but might be helpful for viewing the logs... from here: forum.predix.io/questions/17097/cf-logs-problem.html You may try filtering like it shows in CF docs docs.cloudfoundry.org/devguide/deploy-apps/… $ cf logs spring-music --recent | grep -v RTR also added this feature request to stratos ui github project github.com/cloudfoundry-incubator/stratos/issues/3571 - Datum Geek

1 Answers

1
votes

If you are using a syslog drain to send logs for a specific app to a log aggregator then the short answer is no. You can't stop the Gorouter from logging access entries.

I would go so far as to say that you don't want to either. These logs provides valuable details about the client that is requesting access to your app (IP, user agent, request) & request processing time. This is all critical information to understand if there is a problem you're troubleshooting or worse, if someone is trying to hack your app.

Having said that, I understand that access logs can be a lot of data to process and store. What you can do is to change the rules on your log storage provide. If you really don't want this information and accept the risk of not retaining it, you can drop the entries all together. Otherwise, you can change the retention policy to hold them for a shorter period of time.

If you don't want to/can't filter these on your log aggregator, you could consider implementing a filtering firehose nozzle. This would listen to the firehose and receive log envelopes. Ss @K.AJ mentions, you can do pretty much whatever you want in the nozzle. Your nozzle can filter and drop messages from the Gorouter and/or other services. It's more work than a log drain though. You need to implement the code to send logs off to your log aggregator as well.

There's some details on nozzles and an example here.

Hope that helps!