Linux OS
To push Metrics to vMonitor, you need to install the Metric Agent on your server. vMonitor uses the Telegraf Agent to push metrics to the system. Currently, the Telegraf Agent supports the IAM Service Account for authentication and authorization. Follow the steps below to set up the Telegraf Agent to push metrics to the vMonitor Platform.
Chú ý:
Please note that you need to have a Metric Quota. If you do not have one, you need to purchase a Metric Quota here.
Telegraf Agent with Service Account
Creating a Service Account and Attaching policy: the vMonitorMetricPush to Push Metrics to vMonitor.
To create a service account, visit this link.
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 the policy: vMonitorMetricPush, then click Create a Service Account. This policy, created by VNG Cloud, contains the exact permissions needed to push metrics to the system.
After successfully creating the Service Account, save the Client_ID and Secret_Key for the next step.
Thay thế Client_ID, Secret_Key vào câu lệnh bên dưới và chạy trên server để cài đặt
Use the Client_ID and Secret_Key you copied above, replacing them in the corresponding $IAM_CLIENT_ID and $IAM_CLIENT_SECRET fields in the command below. Run this command on the server that needs to be monitored, making sure to execute it with root user privileges (if not, prepend sudo to the command).
After running the command and completing the installation, you will see the server in the Infrastructure List/Host page.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252F0YtcupLxe6eHIxd4hqnZ%252Fimage.png%3Falt%3Dmedia%26token%3D96637101-d2a0-4f92-a56d-c19473c1cdb9&width=768&dpr=4&quality=100&sign=3a8c88f7&sv=1)
Telegraf Agent with API_KEY (deprecated)
Notice:
We do not recommend using this method as our system will soon discontinue support for API Keys.
This is an older method supported by Telegraf with API_Key, which will soon be deprecated.
Visit the Integration/API Key page to create and obtain an API Key.Select Create an API Key, name the API Key, click Create, and then copy the API Key for use.
Replace the copied API Key in the command below and run it on the server:
After running the command and completing the installation, you will see the server in the Infrastructure List/Host page.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FfelyNms0HzqVfzO7vDDL%252Fimage.png%3Falt%3Dmedia%26token%3D21e1cac5-318c-491b-b059-0ca400ff0e01&width=768&dpr=4&quality=100&sign=ad02ab53&sv=1)
Last updated