- 概述
- 要求
- 安装
- 先决条件检查
- 下载安装包
- uipathctl cluster
- uipathctl 集群维护
- uipathctl cluster maintenance disable
- uipathctl cluster maintenance enable
- uipathctl cluster maintenance is-enabled
- uipathctl cluster migration
- uipathctl cluster migration export
- uipathctl cluster migration import
- uipathctl cluster migration run
- uipathctl 集群升级
- uipathctl 配置
- uipathctl config add-host-admin
- uipathctl config additional-ca-certificates
- uipathctl config additional-ca-certificates get
- uipathctl config additional-ca-certificates update
- uipathctl 配置警示
- uipathctl configalerts add-email
- uipathctl config alerts remove-email
- uipathctl config alerts update-email
- uipathctl config argocd
- uipathctl config argocd ca-certificates
- uipathctl config argocd ca-certificates get
- uipathctl config argocd ca-certificates update
- uipathctl config argocd generate-dex-config
- uipathctl config argocd generate-rbac
- uipathctl config argocd registry
- uipathctl config argocd registry get
- uipathctl config argocd registry update
- uipathctl config enable-basic-auth
- uipathctl config Orchestrator
- uipathctl config Orchestrator get-config
- uipathctl config orchestrator update-config
- uipathctl config saml-certificates get
- uipathctl config saml-certificates rotate
- uipathctl config saml-certificates update
- uipathctl config tls-certificates
- uipathctl config tls-certificates get
- uipathctl config tls-certificates update
- uipathctl config token-signing-certificates
- uipathctl config token-signing-certificates get
- uipathctl config token-signing-certificates rotate
- uipathctl config token-signing-certificates update
- uipathctl 运行状况
- uipathctl 运行状况捆绑包
- uipathctl 运行状况检查
- uipathctl health diagnose
- uipathctl health test
- uipathctl 清单
- uipathctl manifest apply
- uipathctl manifest diff
- uipathctl manifest get
- uipathctl manifest get-revision
- uipathctl manifest list-applications
- uipathctl manifest list-revisions
- uipathctl manifest render
- uipathctl 先决条件
- uipathctl prereq create
- uipathctl prereq run
- uipathctl 资源
- uipathctl 资源报告
- uipathctl 快照
- uipathctl 快照备份
- uipathctl snapshot backup create
- uipathctl snapshot backup disable
- uipathctl snapshot backup enable
- uipathctl snapshot delete
- uipathctl snapshot list
- uipathctl snapshot restore
- uipathctl snapshot restore create
- uipathctl snapshot restore delete
- uipathctl snapshot restore history
- uipathctl snapshot restore logs
- uipathctl 版本
- 安装后
- 访问 Automation Suite
- 管理证书
- 在 ArgoCD 中管理集群
- 管理产品
- 将机器人日志保存到 Elasticsearch
- 更新凭据
- 迁移和升级
- 监控和警示
- 集群管理
- 特定于产品的配置
- 故障排除
将机器人日志保存到 Elasticsearch
Orchestrator 默认设置为将机器人日志存储在数据库中。 但是,如果您想将此存储切换到 Elasticsearch,则可以使用基本配置流程:只需提供所需的 URL、用户名和密码。 此设置足以满足大多数用例。 要进一步自定义,您可以在基本设置的基础上利用高级配置机制。
如果选择此配置,则允许将机器人日志写入 Elasticsearch 目标而不是数据库,并设置 Orchestrator 以从 Elasticsearch 检索日志。
input.json
文件将机器人日志配置为保存到 Elasticsearch 服务器。
基本配置支持 Elasticsearch 版本 7.x。 对于 Elasticsearch 8.x,您需要使用高级配置。
orchestrator.orchestrator_robot_logs_elastic
参数:
参数 |
描述 |
---|---|
|
Elasticsearch 部分配置。 这包含以下属性:
uri 、 username 、 password 。
|
|
应使用的 Elasticsearch 实例的地址。应以 URI 的形式提供。如已提供,则还需要用户名和密码。 |
|
用于身份验证的 Elasticsearch 用户名。 |
|
用于身份验证的 Elasticsearch 密码。 |
input.json
以在 orchestrator
下添加 orchestrator_robot_logs_elastic
部分。
{
...
"orchestrator": {
...
"orchestrator_robot_logs_elastic": {
"elastic_uri": "uri",
"elastic_auth_username": "user",
"elastic_auth_password": "pass"
}
...
}
...
}
{
...
"orchestrator": {
...
"orchestrator_robot_logs_elastic": {
"elastic_uri": "uri",
"elastic_auth_username": "user",
"elastic_auth_password": "pass"
}
...
}
...
}
uipathctl
安装程序以应用配置,请使用以下命令:
uipathctl manifest apply input.json --only orchestrator --versions versions.json
uipathctl manifest apply input.json --only orchestrator --versions versions.json
要访问高级配置设置,您必须先完成基本配置。此流程允许您自定义与 Elasticsearch 通信的 NLog 目标的属性。但是,重定向机器人日志需要其他设置。这些必要的调整会由基本配置执行。
按照以下步骤进行的任何更改都可能对整个系统的功能和稳定性产生负面影响。 建议您仅在了解更改后果的情况下进行更改。
高级配置允许您完全自定义 NLog.config 目标:
-
请遵循 基本配置 步骤。
-
编辑
nlog.json
示例参数,以使用所需的配置更新robotElasticBuffer
目标。 有关nlog.json
的示例,请参阅以下部分。 -
更新
nlog.json
参数:uipathctl config orchestrator update-config --nlog-config nlog.json
uipathctl config orchestrator update-config --nlog-config nlog.json
robotElasticBuffer
。 您可以使用自定义 nlog.json
文件修改此目标的任何属性。 无需提供完整的目标配置;而是仅添加或更新所需的值。
Elasticsearch 7.x 配置示例
uri
、 requireAuth
、 username
和 password
字段的配置,因为它们已经在基本配置步骤中设置好了。
{
"Nlog": {
"targets": {
"robotElasticBuffer": {
"flushTimeout": 1000,
"bufferSize": 1000,
"slidingTimeout": false,
"target": {
"uri": "https://elastic.example.com:9200",
"requireAuth": true,
"username": "elastic-user",
"password": "elastic-password",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "logEvent",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
}
}
}
}
{
"Nlog": {
"targets": {
"robotElasticBuffer": {
"flushTimeout": 1000,
"bufferSize": 1000,
"slidingTimeout": false,
"target": {
"uri": "https://elastic.example.com:9200",
"requireAuth": true,
"username": "elastic-user",
"password": "elastic-password",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "logEvent",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
}
}
}
}
Elasticsearch 8.x 配置示例
uri
、 requireAuth
、 username
和 password
字段的配置,因为它们已经在基本配置步骤中设置好了。
{
"Nlog": {
"targets": {
"robotElasticBuffer": {
"flushTimeout": 1000,
"bufferSize": 1000,
"slidingTimeout": false,
"target": {
"uri": "https://elastic.example.com:9200",
"requireAuth": true,
"username": "elastic-user",
"password": "elastic-password",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
}
}
}
}
{
"Nlog": {
"targets": {
"robotElasticBuffer": {
"flushTimeout": 1000,
"bufferSize": 1000,
"slidingTimeout": false,
"target": {
"uri": "https://elastic.example.com:9200",
"requireAuth": true,
"username": "elastic-user",
"password": "elastic-password",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
}
}
}
}
本节提供有关如何向 Orchestrator 提供自定义配置的其他信息。
uipathctl config orchestrator
。
Orchestrator 配置
appsettings
或 NLog 的 Orchestrator 配置是从依次加载的多个配置文件中加载的。 每个新加载的文件都会覆盖以前的密钥。 文件的加载顺序为:
-
Orchestrator 映像中的内置配置文件
-
orchestrator
配置映射 -
orchestrator
密码 -
orchestrator-customconfig
配置映射
appsettings
文件将 Orchestrator 配置为在需要显示机器人日志时从此目标读取机器人日志。 NLog 内置配置文件还包含 robotElasticBuffer
目标,该目标已部分配置且未使用。
orchestrator
配置映射和密码由 ArgoCD 通过 Helm 图表管理。 每次 ArgoCD 同步应用程序时,都会使用 orchestrator
ArgoCD 应用程序的当前参数和值重新生成这些配置。
orchestrator
配置映射和密码,以提供启用 robotElasticBuffer
所需的最终配置。
orchestrator-customconfig
配置映射中添加覆盖。 每个新值或修改的值都会合并到现有配置中,但无法删除值(可以将它们设置为空,但不要完全删除)。
NLog 默认配置
robotElasticBuffer
目标。
{
"NLog": {
"targets": {
"robotElasticBuffer": {
"type": "BufferingWrapper",
"flushTimeout": 5000,
"target": {
"type": "ElasticSearch",
"name": "robotElastic",
"requireAuth": false,
"uri": "",
"username": "",
"password": "",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "logEvent",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
},
}
}
}
{
"NLog": {
"targets": {
"robotElasticBuffer": {
"type": "BufferingWrapper",
"flushTimeout": 5000,
"target": {
"type": "ElasticSearch",
"name": "robotElastic",
"requireAuth": false,
"uri": "",
"username": "",
"password": "",
"index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
"documentType": "logEvent",
"includeAllProperties": true,
"layout": "${message}",
"excludedProperties": "agentSessionId,tenantId,indexName"
}
},
}
}
}
通过 uipathctl 自定义配置
要查看有关更新 Orchestrator 自定义配置的更多信息,请运行以下命令:
uipathctl config orchestrator --help
uipathctl config orchestrator --help
输出:
Configure orchestrator custom config
Usage:
uipathctl config orchestrator [command]
Available Commands:
get-config Get the current orchestrator custom config
update-config Update orchestrator config
Flags:
-h, --help help for orchestrator
Global Flags:
--context string name of the kubeconfig context to use
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "error")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default 1h0m0s)
Configure orchestrator custom config
Usage:
uipathctl config orchestrator [command]
Available Commands:
get-config Get the current orchestrator custom config
update-config Update orchestrator config
Flags:
-h, --help help for orchestrator
Global Flags:
--context string name of the kubeconfig context to use
--kubeconfig string kubectl configuration file (default: ~/.kube/config)
--log-format string log format. one of [text,json] (default "text")
--log-level string set log level. one of [trace,debug,info,error] (default "error")
-q, --quiet suppress all output except for errors and warnings
--timeout duration timeout of the command (default 1h0m0s)