# 安装 Talend 日志记录模块

Availability-note[已弃用](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-deprecated)

此内容已弃用。

您需要安装 Talend LogServer，其中包括用于收集日志的 Kibana 和 Filebeat。

## 步骤

1. 复制 Talend-LogServer-VA.B.C.zip 压缩包文件并将其提取到您选择的目录中。

   目录名称不得包含空格或非 ASCII 字符。
2. 要启动 Talend LogServer，请运行 start\_logserver.bat 可执行文件。

   不能以 root 用户的身份运行 Elasticsearch。Elasticsearch 是 Talend LogServer 的一部分，因此不能以 root 用户的身份运行可执行文件。
3. 为 Filebeat 配置 LOG\_PATH 和 APP\_NAME 值：
   * 打开位于 Filebeat 目录中的 filebeat.yml 文件，并按以下方式设置 LOG\_PATH 和 APP\_NAME 值：
     ```
       paths:
         - ${LOG_PATH:C:\Talend\8.0.1\tac\apache-tomcat\logs\*}
       fields:
         app_id: ${APP_NAME:TAC}
     ```
   * 或设置 LOG\_PATH 和 APP\_NAME 环境变量：
     ```
     SET LOG_PATH=c:\Talend\8.0.1\tac\apache-tomcat\logs\*
     SET APP_NAME=TAC
     ```
4. 启动 Filebeat：
   ```
   filebeat -e -c filebeat.yml
   ```

## 结果

您可以使用以下 URL 访问 Talend LogServer：http://localhost:5601/app/kibana#/dashboard/Default-Dashboard。

排错： 当您启动 Talend LogServer 时或没有看到 logstash-\*、talendesb-\* 和 talendaudit-\* 索引时，请完成以下步骤：

1. 删除 .kibana 索引。

   ```
   curl -XDELETE 'http://localhost:9200/.kibana'
   ```

   对于 Windows 用户，请使用在 utils\curl-7.50.3-windows-x86.exe 中找到的 curl

2. 停止 Talend LogServer。

3. 启动 Talend LogServer。