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
- Perform one of the following actions:
- In BMC Helix Operations Management, select Configuration > Monitoring Policies > Create Policy.
- In TrueSight Operations Management, Select Configuration > Infrastructure Policies > Create Policy.
- Click Add Monitoring Configuration.
- From the Monitoring Solution list, select Kubernetes.
- From the Monitor Profile and Monitor Type lists, select Kubernetes.
- In the Kubernetes Monitoring Configuration section, click Add.
The following table lists the fields that are displayed on the Kubernetes Cluster Details page:
Field | Description |
---|---|
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.
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 Type | Select the authentication type to connect to the Kubernetes cluster.
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 the .pfx format. Use to create the .pfx client certificate for Kubernetes monitoring. For example, ./create-certificate.sh <certificate_name> <certificate_password> Where,
Important: 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:
|
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 to create a service account and get the bearer token.For example, ./create-service-account.sh <Service_account_name> <namespace> <cluster_role> Where,
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 Configuration | Select this option to enable communication through a proxy server. |
Server Name | Enter the name or the IP address of the proxy server that is being used to route the HTTP requests. |
Port | Enter the proxy server port number that is being used to connect to the specified proxy server. |
User Name | Enter the username to log in to the proxy server. |
Password | Enter the password to the specified proxy server. |
Object Filtering | |
Namespace Filter Type | Select 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 following name: Example 2 To filter namespaces ProdNamespace and QANamespace, enter the following regular expression: Example 3 To filter all the namespaces that start with the word Test, enter the following regular expression: |
Enable Containers Monitoring | Select this option if you want to monitor containers. The KM discovers the containers below the pod instances. |
Job Monitoring Configuration | |
Enable Job Monitoring | Select the checkbox to enable job monitoring in the Kubernetes environment. |
Job Filter Type | Select whether to Include or Exclude the Kubernetes cluster jobs from monitoring. |
Job Filter | Enter the Kubernetes cluster job name that you want to include or exclude from monitoring. You can enter the exact Kubernetes cluster job name or a regular expression matching multiple job names. To add multiple entries, enter a pipe-separated list of the job names. Filtering examples: Example 1 To filter a single job Job1, enter the following name: Example 2 To filter namespaces Job1 and Job2, enter the following regular expression: Example 3 To filter all the jobs that start with the word Job, enter the following regular expression: |
Enable Monitoring of job pods | Select the checkbox to monitor the pods for the filtered Kubernetes jobs. |
Administration | |
JVM Arguments | Enter the additional Java Virtual Machine arguments for the Java collector. Set the following JVM arguments to use host names instead of IP addresses as identifiers:
|
Enable Logging | Select the checkbox to enable the debug. The log files are located at <PATROL_HOME>/k8s/log on the PATROL Agent server. |
Log Level | Select the debug log level. These levels are used to control the logging output.
FINEST level logs each debug log record. Important: If debug is disabled, the log file contains only warning-level log records. |
Device Mapping |
The KM creates the node device based on the selection. If device mapping is disabled by selecting None, the nodes are displayed as instances in their respective hierarchy under the PATROL Agent device.
Important: 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, 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:
|