ClickHouse databases support multiple metrics. You can collect metrics from ClickHouse databases and send the collected metrics to the Full-stack Monitoring application. This way, you can monitor the metrics in a visualized manner.
- Log on to the Log Service console.
- In the Log Application section, click Full-stack Monitoring.
- On the Full-stack Monitoring page, click the instance.
- On the Data Import page, enable ClickHouse.
If this is your first time to create a Logtail configuration for host monitoring, turn on the switch to go to the configuration page. If you have created a Logtail configuration, click the icon to go to the configuration page.
- Create a machine group.
Important Make sure that the server on which you want to install Logtail can connect to the ClickHouse database whose monitoring data you want to collect.
- If a machine group is available, click Use Existing Machine Groups.
- If no machine groups are available, perform the following steps to create a machine
group. In this example, an Elastic Compute Service (ECS) instance is used.
- On the ECS Instances tab, select Manually Select Instances. Then, select the ECS instance that you want
to use and click Execute Now.
For more information, see Install Logtail on ECS instances.Note If you want to install Logtail on a self-managed Linux server or a Linux server from a third-party cloud, you must manually install Logtail V0.16.48 or later on the server. For more information, see Install Logtail on a Linux server. After you manually install Logtail, you must configure a user identifier on the server. For more information, see Configure a user identifier.
- After Logtail is installed, click Complete Installation.
- In the Create Machine Group step, configure Name and click Next.
Log Service allows you to create IP address-based machine groups and custom identifier-based machine groups. For more information, see Create an IP address-based machine group and Create a custom identifier-based machine group.
- On the ECS Instances tab, select Manually Select Instances. Then, select the ECS instance that you want to use and click Execute Now.
- In the Machine Group Settings step, select the machine group that you create in the Source Server Groups section and move the machine group to the Applied Server Groups section. Then, click Next. Important If you immediately apply a machine group after it is created, the heartbeat status of the machine group may be FAIL. This issue occurs because the machine group is not connected to Log Service. In this case, you can click Automatic Retry. If the issue persists, see What do I do if no heartbeat connections are detected on Logtail?
- In the Specify Data Source step, configure the following parameters and click Complete.
Parameter Description Configuration Name The name of the Logtail configuration. You can enter a custom name. Cluster Name The name of the ClickHouse cluster. You can enter a custom name.
After you configure this parameter, Log Service adds a cluster=Cluster name tag to the ClickHouse monitoring data that is collected by using the Logtail configuration.Important Make sure that the cluster name is unique. Otherwise, data conflicts may occur.
Username The username of the account that you use to connect to the ClickHouse database. Password The password of the account that you use to connect to the ClickHouse database. Server List The information about the ClickHouse database. The information includes the following configuration items:
- Address: the address of the ClickHouse database.
- Port: the port number of the ClickHouse database. Default value: 8123.
You can add information about multiple ClickHouse databases based on your business requirements.
Custom Tags The custom tags that are added to the collected ClickHouse monitoring data. The tags are key-value pairs.
After you configure this parameter, Log Service adds the custom tags to the ClickHouse monitoring data that is collected by using the Logtail configuration.
After you complete the configurations, Log Service automatically creates assets such as Metricstores. For more information, see Assets.
What to do next
After ClickHouse monitoring data is collected and sent to the Full-stack Monitoring application, the application automatically creates dedicated dashboards for the monitoring data. You can use the dashboards to analyze the monitoring data. For more information, see View dashboards.