This topic describes how to install Simple Log Service Kibana by using Helm charts in multicloud scenarios. On Microsoft Azure, you can install a Helm chart named sls-kibana by using Helm tools to run a log analysis and visualization system, which includes Kibana and related components. This topic describes how to build a log analysis system on Microsoft Azure.
Procedure
If you use an Alibaba Cloud Container Service for Kubernetes (ACK) environment, perform operations by following the instructions provided in Connect to Kibana.
Create and modify the
values.yamlfile. The following sample code shows the content of the file. Change the parameter values based on your business requirements.kibana: serviceType: ClusterIP # The type of the service. Valid values: ClusterIP and LoadBalancer. # serviceAnnotation: # The annotation of the service. # service.beta.kubernetes.io/azure-load-balancer-internal: 'true' # service.beta.kubernetes.io/azure-load-balancer-internal-subnet: "xxx-subnet" ingressClass: nginx # Change the value based on the Ingress controller that you install. If this parameter is left empty, Ingress is not used. ingressDomain: # You can leave this parameter empty. If you want to access Kibana by using a domain name, configure this parameter. ingressPath: /kibana/ # Required. The subpath that is used to access Kibana. # If you configure the ingressDomain parameter, you can set the ingressPath parameter to /. #i18nLocale: en # The language of Kibana. Default value: en. If you want to use Chinese, you can set the value to zh-CN. elasticsearch: password: aStrongPass # Change the password of the Elasticsearch cluster based on your business requirements. You can use the password to log on to the Kibana console. The username that is used to access the Elasticsearch cluster is elastic. diskStorageSize: 16Gi diskStorageClassName: managed-csi # The name of the StorageClass. repository: region: cn-hangzhou # The region where the image resides. If the image resides in a region in the Chinese mainland, set the value to cn-hangzhou. If the image resides in a region outside the Chinese mainland, set the value to ap-southeast-1. The image is pulled over the Internet. sls: - project: k8s-log-c5****** # The Simple Log Service project. endpoint: cn-huhehaote.log.aliyuncs.com # The endpoint of the Simple Log Service project. accessKeyId: The AccessKey ID that is used to access Simple Log Service. accessKeySecret: The AccessKey secret that is used to access Simple Log Service. # alias: etl-logs # Optional. If the name of the Simple Log Service project specified by the project parameter is excessively long in Kibana, you can configure this parameter to specify an alias for the project. # kibanaSpace: default # Optional. The space in which the index pattern is created. If no space exists, a space is automatically created. # logstoreFilters: "*" # Optional. The Logstores that are used to automatically create index patterns. Separate multiple index patterns with commas (,) and enclose index patterns in double quotation marks (""). Example: "access*,error*". # If you want to specify another Simple Log Service project, follow the preceding steps. #- project: etl-dev2 # The Simple Log Service project. # endpoint: cn-huhehaote.log.aliyuncs.com # The endpoint of the Simple Log Service project. # accessKeyId: The AccessKey ID that is used to access Simple Log Service. # accessKeySecret: The AccessKey secret that is used to access Simple Log Service. # alias: etl-logs2 # Optional. If the name of the Simple Log Service project specified by the project parameter is excessively long in Kibana, you can configure this parameter to specify an alias for the project. # kibanaSpace: default # Optional. The space in which the index pattern is created. If no space exists, a space is automatically created. # logstoreFilters: "*" # Optional. The Logstores that are used to automatically create index patterns. Separate multiple index patterns with commas (,) and enclose index patterns in double quotation marks (""). Example: "access*,error*". #kproxy: # maxAllowTimeRangeSeconds: 900 # The time range that is allowed to query data. By default, no limits are imposed on time ranges.Parameter
Description
kibana.ingressClass
Change the value based on the Ingress controller that you installed. For more information about how to view components, see Manage components.
ALB Ingress Controller: Set the value to alb
MSE Ingress Controller: Set the value to mse
NGINX Ingress Controller: Set the value to nginx
kibana.ingressDomain
You can leave this parameter empty. If you want to access Kibana by using a domain name, configure this parameter.
repository.region
The region where the image resides. If the image resides in a region in the Chinese mainland, set the value to
cn-hangzhou. If the image resides in a region outside the Chinese mainland, set the value toap-southeast-1. The image is pulled over the Internet.kibana.ingressPath
The subpath that is used to access Kibana. If you do not leave the ingressDomain parameter empty, you can set the ingressPath parameter to
/.elasticsearch.password
Change the password of the Elasticsearch cluster based on your business requirements. You can use this password to log on to the Kibana console. The username that is used to access the Elasticsearch cluster is
elastic.sls.project
The name of the Simple Log Service project. For more information, see Manage projects.
sls.endpoint
The endpoint of the project. For more information, see Manage projects.
sls.accessKeyId
The AccessKey ID of the RAM user that is specified in the Prerequisites section. The RAM user must have the query permissions on the Logstore. For more information, see RAM authorization.
sls.accessKeySecret
The AccessKey secret of the RAM user that is specified in the Prerequisites section. The RAM user must have the query permissions on the Logstore. For more information, see RAM authorization.
sls.alias
Optional. If the name of the Simple Log Service project specified by the sls.project parameter is excessively long in Kibana, you can configure this parameter to specify an alias for the project.
sls.kibanaSpace
Optional. The space in which the index pattern is created. If no space exists, a space is automatically created.
sls.logstoreFilters
Optional. The Logstores that are used to automatically create index patterns. Separate multiple index patterns with commas (,) and enclose index patterns in double quotation marks (""). Example:
"access*,error*".Create a namespace.
kubectl create namespace sls-kibanaRun the installation command.
helm install sls-kibana \ https://sls-kproxy.oss-cn-hangzhou.aliyuncs.com/sls-kibana-1.5.5.tgz \ -f values.yaml --namespace sls-kibana
FAQ
How do I uninstall a Helm chart?
helm uninstall sls-kibana --namespace sls-kibanaHow do I display high-precision time in Kibana?
Make sure that high-precision time is collected or reported in Simple Log Service. You can configure nanosecond-precision timestamps to support nanosecond-precision timestamps.
After high-precision time is collected, you must add a
__time_ns_part__nanosecond field index of thelongtype to the field indexes. Some queries in Kibana may be converted to SQL for execution. Therefore, high-precision time must be included in the SQL results.
How do I update a Helm chart?
The process of updating a Helm chart is similar to the process of installing a Helm chart. You need to only change the helm install command to the helm upgrade command. You can use the values.yaml file that is used for Helm chart installation in the update process.
helm upgrade sls-kibana https://sls-kproxy.oss-cn-hangzhou.aliyuncs.com/sls-kibana-1.5.5.tgz -f values.yaml --namespace sls-kibana