10.8.3. Elasticsearch 配置字段
使用以下配置字段将 Red Hat Quay 与外部 Elasticsearch 服务集成。这可让存储和查询结构化数据,如操作日志、存储库事件和其他内部数据库之外的其他操作记录。
| 字段 | 类型 | 描述 |
|---|---|---|
| LOGS_MODEL_CONFIG.elasticsearch_config.access_key | 字符串 |
Elasticsearch 用户(或 AWS ES 的 IAM 密钥)。 |
| .elasticsearch_config.host | 字符串 |
Elasticsearch 集群端点。 |
| .elasticsearch_config.index_prefix | 字符串 |
Elasticsearch 索引的前缀。 |
| .elasticsearch_config.index_settings | 对象 | Elasticsearch 的索引设置。 |
| LOGS_MODEL_CONFIG.elasticsearch_config.use_ssl | 布尔值 |
是否对 Elasticsearch 使用 SSL。 |
| .elasticsearch_config.secret_key | 字符串 |
Elasticsearch 密码(或 AWS ES 的 IAM secret)。 |
| .elasticsearch_config.aws_region | 字符串 |
AWS 区域。 |
| .elasticsearch_config.port | Number |
Elasticsearch 集群的端口。 |
| .kinesis_stream_config.aws_secret_key | 字符串 |
AWS secret 密钥。 |
| .kinesis_stream_config.stream_name | 字符串 |
AWS Kinesis 流将操作日志发送到。 |
| .kinesis_stream_config.aws_access_key | 字符串 |
AWS 访问密钥。 |
| .kinesis_stream_config.retries | Number |
单个请求尝试的最大重试次数。 |
| .kinesis_stream_config.read_timeout | Number |
读取超时(以秒为单位)。 |
| .kinesis_stream_config.max_pool_connections | Number |
池中连接的最大数量。 |
| .kinesis_stream_config.aws_region | 字符串 |
AWS 区域。 |
| .kinesis_stream_config.connect_timeout | Number |
连接超时(以秒为单位)。 |
| .producer | 字符串 |
日志制作者类型。 |
| .kafka_config.topic | 字符串 |
用于发布日志条目的 Kafka 主题。 |
| .kafka_config.bootstrap_servers | Array | 用于引导客户端的 Kafka 代理列表。 |
| .kafka_config.max_block_seconds | Number |
在 |
Elasticsearch YAML 示例
# ...
FEATURE_LOG_EXPORT: true
LOGS_MODEL: elasticsearch
LOGS_MODEL_CONFIG:
producer: elasticsearch
elasticsearch_config:
access_key: elastic_user
secret_key: elastic_password
host: es.example.com
port: 9200
use_ssl: true
aws_region: us-east-1
index_prefix: logentry_
index_settings:
number_of_shards: 3
number_of_replicas: 1
ALLOW_WITHOUT_STRICT_LOGGING: true
# ...
10.8.3.1. Splunk 配置字段 复制链接链接已复制到粘贴板!
使用以下字段配置 Red Hat Quay,将操作日志导出到 Splunk 端点。此配置允许将审计和事件日志发送到外部 Splunk 服务器,以进行集中分析、搜索和长期存储。
| 字段 | 类型 | 描述 |
|---|---|---|
| producer | 字符串 |
在将 Splunk 配置为 |
| splunk_config | 对象 | Splunk 操作日志或 Splunk 集群配置的日志模型配置。 |
| .host | 字符串 | Splunk 集群端点。 |
| .port | 整数 | Splunk 管理集群端点的端口号。 |
| .bearer_token | 字符串 | 用于通过 Splunk 进行身份验证的 bearer 令牌。 |
| .verify_ssl | 布尔值 |
为 HTTPS 连接启用( |
| .index_prefix | 字符串 | Splunk 使用的索引前缀。 |
| .ssl_ca_path | 字符串 |
到包含用于 SSL 验证的证书颁发机构(CA)的 |
Splunk 配置示例 YAML
# ...
LOGS_MODEL: splunk
LOGS_MODEL_CONFIG:
producer: splunk
splunk_config:
host: http://<user_name>.remote.csb
port: 8089
bearer_token: <bearer_token>
url_scheme: <http/https>
verify_ssl: False
index_prefix: <splunk_log_index_name>
ssl_ca_path: <location_to_ssl-ca-cert.pem>
# ...
10.8.3.1.1. Splunk HEC 配置字段 复制链接链接已复制到粘贴板!
在为 Red Hat Quay 配置 Splunk HTTP 事件收集器(HEC)时,可以使用以下字段。
| 字段 | 类型 | 描述 |
|---|---|---|
| producer | 字符串 |
在配置 Splunk HTTP 事件收集器(HEC)时,必须设置为 mvapich |
| splunk_hec_config | 对象 | Splunk HTTP 事件收集器操作日志的日志模型配置。 |
| .host | 字符串 | Splunk 集群端点。 |
| .port | 整数 | Splunk 管理集群端点端口。 |
| .hec_token | 字符串 | 用于使用 Splunk 进行身份验证的 HEC 令牌。 |
| .url_scheme | 字符串 |
用于访问 Splunk 服务的 URL 方案。如果 Splunk 位于 SSL/TLS 之后,请使用 |
| .verify_ssl | 布尔值 |
为 HTTPS 连接启用( |
| .index | 字符串 | 用于日志存储的 Splunk 索引。 |
| .splunk_host | 字符串 | 要分配给日志记录事件的主机名。 |
| .splunk_sourcetype | 字符串 |
与事件关联的 Splunk |
Splunk HEC 示例 YAML
# ...
LOGS_MODEL: splunk
LOGS_MODEL_CONFIG:
producer: splunk_hec
splunk_hec_config:
host: prd-p-aaaaaq.splunkcloud.com
port: 8088
hec_token: 12345678-1234-1234-1234-1234567890ab
url_scheme: https
verify_ssl: False
index: quay
splunk_host: quay-dev
splunk_sourcetype: quay_logs
# ...