Getting Started with Predix Logging

Creating Predix Logging Service Instance

Create a Predix Logging service instance to collect and mange log files.

About This Task

Use this process to determine if Predix Logging is available in the Cloud Foundry Marketplace, and to create your Predix Logging service instance.

Procedure

  1. To retrieve the name of the Logging service, list the services in the Cloud Foundry marketplace.
    cf marketplace

    The service plans are listed:

    '
    service                  plans                                     description
    predix-logging           Dedicated-1-L20*, Dedicated-3HA-L40*                 Logging service for the Predix Platform
  2. Creating a Predix Logging service instance and binding an App is all it takes to start using this service.
    $ cf create-service predix-logging <plan-name> <your-service-instance-name>
    Note: This step takes about 3 to 9 mins. Check status of service creation using cf services command.

    For example:

    $ cf services
    Getting services in org xxx / space yyy as [email protected]...
    OK
    
    name             service             plan          bound apps   last operation
    my-log-service   predix-logging      Dedicated-1-L20*                 create succeeded
  3. Bind the Predix Logging service instance to your application.
    cf bind-service <your-app-name> <your-service-instance-name>
  4. Restage your application.
    cf restage <your-app-name>

Setting up the Predix Logging Kibana Interface

View the application environment to retrieve the Kibana connection information for the Predix Logging service.

About This Task

Procedure

  1. View the application environment to get kibana connection information.
    $ cf env <your-app-name>
  2. Point a browser to the kibana_url and log in with the username/password from the previous step. Here is an example ENV:
    "kibana_url": "https://kibana-8c667b6c.run.aws.ice.predix.io",
    "password": "sample_password",
    "username": "sample_user"
    
    Note:

    When you access Kibana for the first time, you will be required to "Configure an index pattern". Follow these guidelines to define the index:

    • Index contains time-based events - checked (default)
    • Use event times to create index names [DEPRECATED] - unchecked (default)
    • Index name or pattern: logstash-* - (default)
    • Index name or pattern: logstash-* - (default)
    • Time-field name - select @timestamp
      • If @timestamp is not available as an option then it means there are no logs flowing into the service instance
      • Bind an app to the new service instance and refresh Kibana to see if @timestamp is available in this drop-down menu
      • Fewer than than 5 minutes will pass from the time an app is bound to Kibana seeing @timestamp in the Time-field name drop-down menu
    • Click on Create