Metrics
You can install vMonitor Platform Metric Agent into your Kubernetes Cluster to collect and push metrics to the vMonitor Platform site, then use the features at vMonitor Platform to centrally manage resources and monitor unusual activity of your Kubernetes Cluster. .
Install Metric Agent using Helm
Preparation steps before installation
1. Check that you have the Metric Quota and that your quota has not reached the limit. If you do not have it, you need to buy the Metric Quota here .
2. Create a Service Account and attach policy: vMonitorMetricPush to have enough rights to push Metric to vMonitor
To create a service account, go here , then perform the following steps:
Select " Create a Service Account ", enter a name for the Service Account and click Next Step to assign permissions to the Service Account
Find and select Policy: vMonitorMetricPush, then click " Create a Service Account " to create a Service Account, Policy: vMonitorMetricPush created by VNG Cloud only contains the correct permission to push metrics to the system.
After successful creation, you need to save the Client_ID and Secret_Key to perform the next step.
Install helm on Debian/Ubuntu server
1. You need to install Helm on a server with kubeconfig containing enough permissions to interact with the Kubernetes Cluster.
Check permissions with kubectl command :
Kube checks permission
If the result of the above commands is YES , then you have enough rights.
2. Proceed to install Helm
Execute the following commands:
Check that Helm has been installed successfully
Install Helm in other operating systems
Refer to the installation instructions here: Install Helm Through Package Managers
3. Some additional notes about Helm: (see details at: helm docs )
Helm will use kubeconfig to interact with the cluster, by default helm will use config in the path: "~/.kube/config"
If we need to change the path to kubeconfig we can use 2 ways:
For each helm command, add the --kubeconfig option: for example, helm install --kubeconfig <path_to_kubeconfig>
Declare environment variable: KUBECONFIG
Install Metric Agent
By default, when installing vMonitor Platform Metric Agent, there will be 2 components:
Deployment Agent kube-state-metrics: collect metrics for each resource of k8s cluster (pod, daemonset, deployment, replicaset, ....)
Daemonset Agent: collect metrics for each k8s cluster node (CPU, Memory usage, ...)
1. Add Helm vMonitor Platform Repo
2. Install charts
Check and delete related resources before installation to avoid conflicts
Install at default namespace (add flag -n <namespace_specified> to install agent at another namespace)
<YOUR_CLIENT_ID_XXXXXXXXXXXXXXXXXXX>, <YOUR_CLIENT_SECRET_XXXXXXXXXXXXXXX>: Service account information created in the preparation step
<CLUSTER_NAME>: This information will be used to filter hosts of k8s cluster in case there are many clusters to monitor
Check that the agent installation was successful
If the pods agent is not in running state, use the corresponding command to check for errors
After the installation is complete, kubernetes tracking metrics have been pushed to the vMonitor Platform site, you can proceed to vMonitor to draw dashboards and widgets.
Uninstall Metric Agent
Execute the following command to delete the installed related k8s resources:
Metric Agent installation does not use kube-state-metrics
Install at default namespace (add flag -n <namespace_specified> to install agent at another namespace)
Last updated