Monitoring platform health using Kubernetes events

Monitor the health of your API Connect deployment by viewing the Kubernetes events that are generated for every status change in each subsystem CR.

What are the Kubernetes events?

The CR for every subsystem of API Connect has a status condition section, which is regularly updated by the API Connect operator with the current status. The API Connect operator additionally generates a Kubernetes event whenever there is a change in the CR status.

Events are enabled in API Connect operator for the following resources.

  • APIConnectCluster CR
  • ManagementCluster CR
  • GatewayCluster CR
  • AnalyticsCluster CR
  • PortalCluster CR

Two types of events are generated when the CR status changes:

  • Normal - Indicates that the status change is not causing any issues.
  • Warning - Indicates that there a problem that requires your attention.

You can automatically monitor the status condition in your existing alerting system, or by integrating the Kubernetes events into a third-party alerting solution. For more information, see the following blog post: How to use Kubernetes events for effective alerting and monitoring.

Viewing the events

The default retention period of events in Kubernetes is 1 hour (controlled by kube-apiserver). To view the events, complete the following steps:

  1. Run the kubectl describe against the resource you want to monitor; for example:
    kubectl describe APIConnectCluster
  2. In the response, scroll to the end to see the events information, which looks like the following example:
            Name:           10.0.5.3-1
        Reconciled:         10.0.5.3-1
    Events:
      Type    Reason    Age    From                     Message
      ----    ------     ----  ----                     -------
      Normal  Running    10h   ibm-apiconnect-operator  All services ready.
      Normal  Deploying  10h   ibm-apiconnect-operator  Not all services are ready, pending services: management