Reactive Endpoints with Quarkus on OpenShift
  • README
  • Setup the IBM Cloud Environment
    • Overview
    • Access the Cluster
    • Access IBM Cloud Shell
  • Setup the sample application
    • Exercise 1 - Deploy the example application via one script
    • YouTube - How to setup the sample application (optional)
  • Build a new version of the Microservice
    • Exercise 1 - Develop reactive Endpoints
    • Exercise 2 - Invoke Endpoints reactively
    • Exercise 3 - Deploy Service to OpenShift
    • Exercise 4 (optional) - Use distributed Logging
  • YouTube Videos related to the Exercises
    • Exercise 1 - Develop reactive Endpoints (optional)
    • Exercise 2 - Invoke Endpoints reactively (optional)
    • Exercise 3 - Deploy Service to OpenShift (optional)
    • Exercise 4 - Use distributed Logging (optional)
  • Additional Resources
    • Blog posts related to reactive
    • Workshop: Reactive Messaging with Quarkus on OpenShift
    • Cloud-Native-Starter project
    • Cloud-Native-Starter project reactive
  • Known Issues
    • Quarkus needs Apache Maven 3.6.2+
Powered by GitBook
On this page
  • Step 1: Create LogDNA Service
  • Step 2: Configure LogDNA
  • Step 3: Use LogDNA

Was this helpful?

  1. Build a new version of the Microservice

Exercise 4 (optional) - Use distributed Logging

PreviousExercise 3 - Deploy Service to OpenShiftNextQuarkus needs Apache Maven 3.6.2+

Last updated 4 years ago

Was this helpful?

Cloud native applications based on microservices contain many parts that create logs. A logging service that is able to collect all distributed logs in one place is a highly recommended tool. There are many logging solutions that you can install directly into your Kubernetes or OpenShift cluster. But then you have an additional application that needs to be maintained and one that needs persistent storage as well to store logs for a period of time.

IBM Cloud offers "Logging as a Service" in the form of . It offers features to filter, search, and tail log data, define alerts, and design custom views to monitor application and system logs. You can test "IBM Log Analysis with LogDNA" for free with somewhat limited capabilities and we will show you in this exercise how to connect your OpenShift cluster to an instance of it.

Official documentation for setting up the LogDNA agent for an OpenShift cluster is .

For the following instructions use the IBM Cloud Shell to enter the commands.

Step 1: Create LogDNA Service

In your browser log in to the . Make sure you are using your own account. From the 'burger menu' in the upper left corner select 'Observability'.

Create an 'IBM Log Analysis with LogDNA' instance by clicking on 'Create new'.

On the 'Create' tab leave all defaults. All you have to do is to create the big blue 'Create' button.

Step 2: Configure LogDNA

Select 'Edit log sources'.

Select the 'OpenShift' tab. Copy, paste, and execute the commands into your IBM Cloud Shell:

In the Cloud Shell check that the logging agent is running.

oc get all -n ibm-observe

Step 3: Use LogDNA

Click 'View LogDNA'.

oc project cloud-native-starter
watch curl -X GET "http://$(oc get route articles-reactive -o jsonpath={.spec.host})/v2/articles?amount=10" -H "accept: application/json"

The "watch" command will constantly (every 2 seconds) request articles information.

Refresh your browser tab with the LogDNA dashboard and insert in the search field "getArticlesReactive".

Note: If you don't see "getArticlesReactive" wait a little longer (with the free/lite version it can take several minutes before data shows up), then refresh the browser tab of the LogDNA dashboard again.

Select 'Unsaved View' and then 'Save as new/alert'.

Give the view a ane and press 'Save View'.

From now the new view is available under 'Views'.

Congratulations! You’ve finished the workshop!

Go back to the . Make sure you are using your own account. From the 'burger menu' in the upper left corner select 'Observability' and then 'Logging'.

In Exercise 1 you have deployed an instance of the 'Articles' service called 'articles-reactive'. We will check LogDNA for output from this instance. Execute the following commands in the Cloud Shell:

IBM Cloud dashboard
Deploying Sample Application
IBM Log Analysis with LogDNA
here
IBM Cloud dashboard
log1
log2
log3
log4
log5
log6
log7
log8
log9
log10
log11
log12