Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Using LogDNA with IBM Blockchain Platform

Using LogDNA to access logs from an IBP Kubernetes cluster can help troubleshoot problems.

Here’s how!

You will need

Make sure you’re logged in using ibmcloud login -a cloud.ibm.com (you may need to use the --sso option)

Set up the LogDNA service

Start by finding the LogDNA service you just created:

ibmcloud resource service-instances

Use the LogDNA service name to create an environment for the ingestion key which we’ll use later:

export LOGDNA_KEY=$(ibmcloud resource service-keys --instance-name "IBM Log Analysis with LogDNA-demo" --output json | jq -r '.[0].credentials.ingestion_key')

Configure the IBP Kubernetes cluster

Start by finding your IBP Kubernetes cluster:

ibmcloud ks cluster ls

Use the cluster ID to download the Kubernetes configuration files and certificates required for kubectl commands to connect to your IBP cluster:

ibmcloud ks cluster config --cluster bv56eljd05dlt2gm5lng

Verify that the kubeconfig file was updated successfully:

kubectl get nodes

Note: The following commands are also shown on the “Add agents to desired log sources” page of the “IBM Log Analysis with LogDNA” service.

Create a new namespace:

kubectl create namespace ibm-observe

Create a Kubernetes secret to store your LogDNA ingestion key:

kubectl create secret generic logdna-agent-key -n ibm-observe --from-literal=logdna-agent-key=$LOGDNA_KEY

Create a Kubernetes daemon set to deploy the LogDNA agent on every worker node of your Kubernetes cluster:

kubectl create -f https://assets.us-south.logging.cloud.ibm.com/clients/agent-resources.yaml

Verify that the LogDNA agent is deployed successfully

kubectl get pods -n ibm-observe

Now you’re ready to start viewing IBM Blockchain Platform logs!


This is a community resource, it is not an official support statement or recommendation from Hyperledger, IBM or any other organization offering Hyperledger Fabric services