Skip to content

Latest commit

 

History

History
 
 

exercise07

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Exercise 07: Check Logs

Estimated time

🕓 10 minutes

Exercise description

Before being able to see logs in Kibana, the service application-logs must be bound to the app.

Let's use the CLI to create and bind a service instance to our application.

cf marketplace
cf create-service application-logs lite myapplogs
cf services
cf bind-service cf-nodejs myapplogs
cf restage cf-nodejs

Let's then use the cockpit for checking logs.

  1. In the Application Overview page, choose Logs.

Logs

🎯 Result: The logs for the application appears. For analysis of logs, you can choose Open Log Analysis. You can also download the logs to your local system.

Cockpit_Logs

Let's use the Cloud Foundry command line interface to check resource consumption.

  1. Enter the command cf logs {app_name}. This command generates real-time log streams. Initiate an activity to view logs. To exit real-time stream, use Ctrl+C.

CF Logs

  1. To view the most recent logs, enter the command, cf logs {app_name} --recent.