Configuring Kubernetes monitoring profile

Monitor the performance and metrics of your Kubernetes cluster, namespaces, and workloads. For details about what attributes are collected in monitoring, see Monitor types and attributes.

To configure Kubernetes cluster monitoring

  1. Perform one of the following actions:
    1. In BMC Helix Operations Managementclick Configuration > Monitoring Policies > Create Policy.
    2. In TrueSight Operations Management, click Configuration > Infrastructure Policies > Create Policy.
  2. Click Add Monitoring Configuration.
  3. From the Monitoring Solution list, select Kubernetes.
  4. From the Monitor Profile and Monitor Type lists, select Kubernetes.

    The following table lists the fields that are displayed on the Kubernetes Cluster Details page.

    FieldDescription

    Kubernetes Cluster Details

    Master Node

    Enter the hostname or the IP address of the Kubernetes master node or load balancer. To get the master hostname (API server) or IP address, run the kubectl cluster-info command on the cluster.

    If you are using Helix Monitor Agent, you can specify any name to identify the cluster. The cluster instance will be created by the specified name.

    If you are using Helix Monitor Agent and you want to use a single policy to monitor multiple clusters, you have to define the environment variable BMC_K8S_KM_CLUSTER_NAME.

    For example, BMC_K8S_KM_CLUSTER_NAME = Prod_Cluster

    Port Number

    Enter the port number to connect to the Kubernetes master node. The default port number is 6443.

    To get the master node port, run the kubectl cluster-info command on the cluster.

    Authentication TypeSelect the authentication type to connect to the Kubernetes cluster.
    • Certificate based

    • Token based

    If you are using Helix Monitor Agent, use Token based.

    Client Certificate File Path (.pfx)

    (For certificate-based authentication)

    Enter the absolute path of the client certificate file on the PATROL Agent server. The certificate file must be in .pfx format.

    Use this sample script to create the .pfx client certificate for Kubernetes monitoring.

    Note: The client certificate file must reside on the host where the PATROL Agent is running.

    BMC PATROL default account must have read permission for the client certificate file.

    For example:

    • C:\cert\client-cert.pfx

    • /opt/bmc/cert/client-cert.pfx

    Client Certificate Password

    (For certificate-based authentication)

    Enter the password to access the client certificate file.

    Authentication Token

    (For token-based authentication)

    Enter the bearer token to connect to the Kubernetes cluster. Use this sample script to create a service account and get the bearer token.

    If you are using Helix Monitor Agent and want to auto-discover cluster entities, keep this field blank. For auto discovery, make sure the service account has the required permissions.

    Proxy Server Configuration

    Use Proxy ConfigurationSelect this option to enable communication through a proxy server.
    Server NameEnter the name or the IP address of the proxy server that is being used to route the HTTP requests.
    PortEnter the proxy server port number that is being used to connect to the specified proxy server.
    User NameEnter the username to log in to the proxy server.
    PasswordEnter the password to the specified proxy server.

    Object Filtering

    Namespace Filter TypeSelect whether to Include or Exclude the Kubernetes cluster namespaces from monitoring.
    Namespace Filter

    Enter the Kubernetes cluster namespace name that you want to include or exclude from monitoring.

    You can enter the exact Kubernetes cluster namespace name or a regular expression matching multiple namespaces. To add multiple entries, enter a pipe-separated list of the namespaces.

    Filtering examples:

    Example 1

    To filter a single namespace MyNamespace, enter the name as MyNamespace

    Example 2

    To filter namespaces ProdNamespace and QANamespace enter the regular expression as ProdNamespace|QANamespace

    Example 3

    To filter all the namespaces that start with the word Test, enter the regular expression as Test.*

    Enable Containers MonitoringSelect this option if you want to monitor containers. The KM discovers the containers below the pod instances.

    Administration

    JVM ArgumentsEnter the additional Java Virtual Machine arguments for the Java collector. For example: for java memory settings: -Xms256m -Xmx1024m.
    Enable LoggingSelect this option to enable the debug. The log files are located at <PATROL_HOME>/k8s/log location on the PATROL Agent server.
    Log LevelSelect the debug log level. These levels are used to control the logging output.
    • FINE

    • FINER

    • FINEST

    FINEST level logs each debug log record.

    Note: If debug is disabled, the log file contains only warning level log records.

    Device Mapping
    • Node - Select one of the following options to enable device mapping of nodes. The KM creates the node device based on the selection. If device mapping is disabled by selecting None, then the nodes are displayed as instances in their respective hierarchy below the PATROL Agent device.

      • Node name: Name of the node set in Kubernetes Cluster.

      • Host name: Name of the host returned by the API.

      • Reverse DNS lookup: FQDN by resolving the DNS from its IP address.

      • None: Disable Node device mapping.
         

    • Pod - Select this option to enable device mapping of pods. The KM creates the device by using the name and the IP address of the pod. If device mapping is disabled for pods, the pods are displayed as instances in TrueSight in their respective hierarchy below the PATROL Agent device.

    • Container - Select this option to enable device mapping of containers. The KM creates the container device by concatenating pod and container names. For example: <pod-name>-<container-name>. If device mapping is disabled for containers, the containers are displayed as instances in TrueSight in their respective hierarchy below the PATROL Agent device.

    Note: If you modify this field, restart the PATROL Agent to apply the changes.

    JAVA Home

    Enter the path to the JRE directory on the PATROL Agent server.

    For example, if the JAVA location on the PATROL Agent server is /usr/java/jdk1.8.0_45/jre/bin/java path, specify /usr/java/jdk1.8.0_45/jre as the value in this field.

     If the specified path does not exist or if this field is left blank, the KM searches for the JRE in the following order:

    1.  <PATROL_HOME>/openjdk directory
    2. <PATROL_HOME>/jre64 directory

    In the Kubernetes Monitoring Configuration section, click Add.
    The following table lists the fields that are displayed on the Kubernetes Cluster Details page.


Was this page helpful? Yes No Submitting... Thank you

Comments