Service-Specific Instructions for Streaming Application Logs

Page last updated: July 15, 2015

This topic provides instructions for configuring some third-party log management services.

Once you have configured a service, refer to the Third-Party Log Management Services topic for instructions on binding your application to the service.

Papertrail

From your Papertrail account:

  1. Click Add System.

  2. Click the Alternatives link.

  3. Select I use Heroku, enter a name, and click Save.

  4. Record the URL with port that is displayed after creating the system.

  5. Create the log drain service in Cloud Foundry.

    $ cf cups my-logs -l syslog://logs.papertrailapp.com:PORT

  6. Bind the service to an app. Restage or push the app using either the cf restage APPLICATION-NAME or cf push APPLICATION-NAME command. After a short delay, logs begin to flow automatically.

  7. Once Papertrail starts receiving log entries, the view automatically updates to the logs viewing page.

Splunk

See Streaming Application Logs to Splunk for details.

Splunk Storm

From your Splunk Storm account:

  1. Click Add project.

  2. Enter the project details.

  3. Create a new input for Network data.

  4. Manually enter the external IP addresses your Cloud Foundry administrator assigns to outbound traffic. If you are using Pivotal Web Services, refer to the Externally Visible IP Addresses topic.

  5. Note the host and port provided for TCP input.

  6. Create the log drain service in Cloud Foundry using the displayed TCP host and port.

    $ cf cups my-logs -l syslog://HOST:PORT

  7. Bind the service to an app. Restage or push the app using either the cf restage APPLICATION-NAME or cf push APPLICATION-NAME command. After a short delay, logs begin to flow automatically.

  8. Wait for some events to appear, then click Data Summary.

  9. Click the loggregator link to view all incoming log entries from Cloud Foundry.

SumoLogic

Note: SumoLogic uses HTTPS for communication. HTTPS is supported in Cloud Foundry v158 and above.

From your SumoLogic account:

  1. Click the Add Collector link.

  2. Choose Hosted Collector and fill in the details.

  3. In the new collector’s row of the collectors view, click the Add Source link.

  4. Select HTTP source and fill in the details.

  5. Once the source is created, a URL should be displayed. You can also view the URL by clicking the Show URL link beside the created source.

  6. Create the log drain service in Cloud Foundry using the displayed URL.

    $ cf cups my-logs -l HTTP-SOURCE-URL

  7. Bind the service to an app. Restage or push the app using either the cf restage APPLICATION-NAME or cf push APPLICATION-NAME command. After a short delay, logs begin to flow automatically.

  8. In the SumoLogic dashboard, click Manage, then click Status to see a view of log messages received over time.

  9. In the SumoLogic dashboard, click on Search. Place the cursor in the search box, then press Enter to submit an empty search query.

Logentries is Not Supported

Cloud Foundry distributes log messages over multiple servers in order to handle load. Currently, we do not recommend using Logentries as it does not support multiple syslog sources.