Log Query and Analysis
The VKube log hosting service is primarily used to capture and host container logs in VKube clusters in the cloud. It does not provide a web interface for querying logs. Users can use self-hosted Grafana or Grafana's official free web platform to query logs hosted in the VKube system. In this document, we use the official Grafana online web platform as an example.
Adding Data Source
Go to the data source page https://<your-grafana-account>.grafana.net/connections/add-new-connection and select the Loki data source option, then enter the page to configure the data source connection information

Configuring Data Source Connection
Data Source Address
Name the data source (in this case we set it as vkube-log) and set the data source url. This url is VKube's query entry point for the log hosting service, currently supporting query operations. The url information can be found on the management interface of the Log Host service on the VKube web page.

Authentication
Querying the VKube log hosting service requires using VKube's authentication token, used in the same way as container services. The token can be obtained from the My Service page on the VKube web page. So the following configuration needs to be completed on the Grafana web page: 1. Set Authentication method to No Authentication. 2. In HTTP headers click the Add another header button to add a new header field Secret, with the header field value being the authentication token of the Log Host service.

Test and Save
After completing the above configuration, go to the bottom of the configuration page and click the Save & test button to test whether the connection address and authentication token are valid. If successful, connection success information will be displayed above the button. The data source has been successfully configured and stored in the Grafana system.

Querying Logs
After logging into the Grafana web page, go to the data source connection list page https://<your-grafana-account>.grafana.net/connections/datasources. select the data source vkube-log that was just configured and click the Explore page to reach the log query page
On the log query page, you can query corresponding logs through log labels. Supported log labels include: node, region, app (container service ID), container (container to which the log belongs), tenant (log hosting service ID, query all logs when set as query condition). It also supports other operations such as querying logs that contain or do not contain certain content, logs that satisfy a certain regular expression, etc.
