本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
在 Atlas OpenSearch sian 服务中使用采集管道
你可以使用 Atlassian Jira 和 Confluence 源插件将来自 Atlassian 服务的数据提取到你的摄取管道中。 OpenSearch 这些集成使您能够通过同步完整的 Jira 项目和 Confluence 空间来创建统一的可搜索知识库,同时通过持续监控和自动同步更新来保持实时相关性。
主题
先决条件
在创建 OpenSearch 摄取管道之前,请完成以下步骤:
-
选择以下选项之一,为您的 Jira 网站准备证书。 OpenSearch 摄取只需要对内容进行
ReadOnly
授权。-
选项 1:API 密钥 — 登录您的 Atlassian 账户并使用以下主题中的信息生成您的 API 密钥:
-
选项 2: OAuth2— 登录您的 Atlassian 帐户并使用中的信息。使用 2.0 将 Amazon OpenSearch Ingestion 管道连接到 Atlassian Jira 或 Confluence OAuth
-
-
在中创建密钥 Amazon Secrets Manager以存储在上一步中创建的证书。按照步骤进行操作时,请做出以下选择:
-
对于密钥类型,请选择其他密钥类型。
-
对于密钥/值对,根据您选择的授权类型创建以下对:
创建密钥后,复制密钥的 Amazon 资源名称 (ARN)。您将把它包含在管道角色权限策略中。
-
配置管道角色
在管道中传递的角色必须附加以下策略才能读取和写入在先决条件部分中创建的密钥。
该角色还应附有访问和写入您选择的接收器的策略。例如,如果您选择 OpenSearch 作为接收器,则策略将类似于以下内容:
Jira 连接器管道配置
您可以使用预配置的 Atlassian Jira 蓝图来创建此管道。有关更多信息,请参阅 使用蓝图。
将 placeholder values
替换为您自己的信息。
version: "2" extension: aws: secrets: jira-account-credentials: secret_id: "
secret-arn
" region: "secret-region
" sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
" atlassian-jira-pipeline: source: jira: # We only support one host url for now hosts: ["jira-host-url
"] acknowledgments: true authentication: # Provide one of the authentication method to use. Supported methods are 'basic' and 'oauth2'. # For basic authentication, password is the API key that you generate using your jira account basic: username: ${{aws_secrets:jira-account-credentials:username}} password: ${{aws_secrets:jira-account-credentials:password}} # For OAuth2 based authentication, we require the following 4 key values stored in the secret # Follow atlassian instructions at the below link to generate these keys. # https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/ # If you are using OAuth2 authentication, we also require, write permission to your Amazon secret to # be able to write the renewed tokens back into the secret. # oauth2: # client_id: ${{aws_secrets:jira-account-credentials:clientId}} # client_secret: ${{aws_secrets:jira-account-credentials:clientSecret}} # access_token: ${{aws_secrets:jira-account-credentials:accessToken}} # refresh_token: ${{aws_secrets:jira-account-credentials:refreshToken}} filter: project: key: include: # This is not project name. # It is an alphanumeric project key that you can find under project details in Jira. - "project-key
" - "project-key
" # exclude: # - "project-key
" # - "project-key
" issue_type: include: - "issue-type
" # - "Story" # - "Bug" # - "Task" # exclude: # - "Epic" status: include: - "ticket-status
" # - "To Do" # - "In Progress" # - "Done" # exclude: # - "Backlog" sink: - opensearch: # Provide an Amazon OpenSearch Service domain endpoint hosts: [ "https://search-mydomain-1a2a3a4a5a6a7a8a9a0a9a8a7a.us-east-1.es.amazonaws.com
" ] index: "index_${getMetadata(\"project\")}" # Ensure adding unique document id which is the unique ticket id in this case document_id: '${/id}' aws: # Provide a Role ARN with access to the domain. This role should have a trust relationship with osis-pipelines.amazonaws.com sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
" # Provide the region of the domain. region: "us-east-1
" # Enable the 'serverless' flag if the sink is an Amazon OpenSearch Serverless collection serverless: false # serverless_options: # Specify a name here to create or update network policy for the serverless collection # network_policy_name: "network-policy-name" # Enable the 'distribution_version' setting if the Amazon OpenSearch Service domain is of version Elasticsearch 6.x # distribution_version: "es6" # Enable and switch the 'enable_request_compression' flag if the default compression setting is changed in the domain. # See 在 Amazon Service OpenSearch 中压缩 HTTP 请求 # enable_request_compression: true/false # Optional: Enable the S3 DLQ to capture any failed requests in an S3 bucket. Delete this entire block if you don't want a DLQ. dlq: s3: # Provide an S3 bucket bucket: "your-dlq-bucket-name
" # Provide a key path prefix for the failed requests # key_path_prefix: "kinesis-pipeline/logs/dlq" # Provide the region of the bucket. region: "us-east-1
" # Provide a Role ARN with access to the bucket. This role should have a trust relationship with osis-pipelines.amazonaws.com sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
"
Jira 源代码中属性的关键:
-
主机:您的 Jira 云或本地 URL。一般来说,它看起来像
https://
。your-domain-name
.atlassian.net/ -
致谢:保证数据一直传送到接收器。
-
身份验证:描述您希望管道如何访问您的 Jira 实例。选择
Basic
或OAuth2
并指定引用密钥中密钥的相应密钥属性。 Amazon -
过滤器:此部分可帮助您选择要提取和同步的 Jira 数据的哪一部分。
-
p roject:在该
include
部分中列出您要同步的项目密钥。否则,请在该exclude
部分下方列出要排除的项目。在任何给定时间仅提供一个包含或排除选项。 -
issue_type:你要同步的特定问题类型。遵循适合您需求的类似
include
或exclude
模式。请注意,附件将显示为指向原始附件的锚链接,但不会提取附件内容。 -
状态:您要为数据提取查询应用的特定状态筛选器。如果您指定
include
,则只有具有这些状态的票证才会被同步。如果您指定exclude
,则将同步除列出的已排除状态的门票以外的所有门票。
-
Confluence 连接器管道配置
您可以使用预配置的 Atlassian Confluence 蓝图来创建此管道。有关更多信息,请参阅 使用蓝图。
version: "2" extension: aws: secrets: confluence-account-credentials: secret_id: "
secret-arn
" region: "secret-region
" sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
" atlassian-confluence-pipeline: source: confluence: # We currently support only one host URL. hosts: ["confluence-host-url
"] acknowledgments: true authentication: # Provide one of the authentication method to use. Supported methods are 'basic' and 'oauth2'. # For basic authentication, password is the API key that you generate using your Confluence account basic: username: ${{aws_secrets:confluence-account-credentials:confluenceId}} password: ${{aws_secrets:confluence-account-credentials:confluenceCredential}} # For OAuth2 based authentication, we require the following 4 key values stored in the secret # Follow atlassian instructions at the following link to generate these keys: # https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/ # If you are using OAuth2 authentication, we also require write permission to your Amazon secret to # be able to write the renewed tokens back into the secret. # oauth2: # client_id: ${{aws_secrets:confluence-account-credentials:clientId}} # client_secret: ${{aws_secrets:confluence-account-credentials:clientSecret}} # access_token: ${{aws_secrets:confluence-account-credentials:accessToken}} # refresh_token: ${{aws_secrets:confluence-account-credentials:refreshToken}} filter: space: key: include: # This is not space name. # It is a space key that you can find under space details in Confluence. - "space key
" - "space key
" # exclude: # - "space key
" # - "space key
" page_type: include: - "content type
" # - "page" # - "blogpost" # - "comment" # exclude: # - "attachment" sink: - opensearch: # Provide an Amazon OpenSearch Service domain endpoint hosts: [ "https://search-mydomain-1a2a3a4a5a6a7a8a9a0a9a8a7a.us-east-1.es.amazonaws.com
" ] index: "index_${getMetadata(\"space\")}" # Ensure adding unique document id which is the unique ticket ID in this case. document_id: '${/id}' aws: # Provide the Amazon Resource Name (ARN) for a role with access to the domain. This role should have a trust relationship with osis-pipelines.amazonaws.com. sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
" # Provide the Region of the domain. region: "us-east-1
" # Enable the 'serverless' flag if the sink is an Amazon OpenSearch Serverless collection serverless: false # serverless_options: # Specify a name here to create or update network policy for the serverless collection. # network_policy_name: "network-policy-name" # Enable the 'distribution_version' setting if the Amazon OpenSearch Service domain is of version Elasticsearch 6.x # distribution_version: "es6" # Enable and switch the 'enable_request_compression' flag if the default compression setting is changed in the domain. # For more information, see 在 Amazon Service OpenSearch 中压缩 HTTP 请求. # enable_request_compression: true/false # Optional: Enable the S3 DLQ to capture any failed requests in an S3 bucket. Delete this entire block if you don't want a DLQ. dlq: s3: # Provide an S3 bucket bucket: "your-dlq-bucket-name
" # Provide a key path prefix for the failed requests # key_path_prefix: "kinesis-pipeline/logs/dlq" # Provide the Rregion of the bucket. region: "us-east-1
" # Provide the Amazon Resource Name (ARN) for a role with access to the bucket. This role should have a trust relationship with osis-pipelines.amazonaws.com sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role
"
Confluence 源中的关键属性:
-
主机:您的 Confluence 云或本地网址。一般来说,它看起来像
https://
your-domain-name
.atlassian.net/ -
致谢:保证数据一直传送到接收器。
-
身份验证:描述您希望管道如何访问您的 Confluence 实例。选择
Basic
或OAuth2
并指定引用密钥中密钥的相应密钥属性。 Amazon -
过滤器:此部分可帮助您选择要提取和同步的 Confluence 数据的哪一部分。
-
空间:在该
include
部分中列出要同步的空格键。否则,请在该exclude
部分下方列出要排除的空格。在任何给定时间仅提供一个包含或排除选项。 -
page_typ e:您要同步的特定页面类型(如页面、博客文章或附件)。遵循适合您需求的类似
include
或exclude
模式。请注意,附件将显示为指向原始附件的锚链接,但不会提取附件内容。
-
数据一致性
根据管道 YAML 中指定的过滤器,选定的项目(或空间)将被提取一次,并完全同步到目标接收器。然后,持续的变更监控将在变更发生时捕捉变化并更新接收器中的数据。一个例外情况是,变更监控仅同步update
操作create
,而不是delete
操作。
限制
-
用户删除操作不会同步。数据一旦记录在接收器中,将保留在接收器中。如果在接收器设置中指定了 ID 映射,则更新将使用新的更改覆盖现有内容。
-
使用不支持以下内容的旧版 Atlassian 软件的本地实例与该来源 APIs 不兼容:
-
Jira Search API 版本 3
-
rest/api/3/search
-
rest/api/3/issue
-
-
Confluence
-
wiki/rest/api/content/search
-
wiki/rest/api/content
-
wiki/rest/api/settings/systemInfo
-
-
Atlass CloudWatch ian 连接器的指标
类型:Jira 连接器指标
来源 | 指标 | 指标类型 |
---|---|---|
acknowledgementSetSuccesses。count | 计数器 | 如果启用了确认功能,则此指标将提供成功同步的票证数量。 |
acknowledgementSetFailures。count | 计数器 | 如果启用了确认功能,则此指标将提供同步失败的票证数量。 |
crawlingTime.avg | 计时器 | 浏览所有新更改所花费的时间。 |
ticketFetchLatency.avg | 计时器 | 取票 API 延迟的平均值。 |
ticketFetchLatency.max | 计时器 | 工单获取 API 延迟的最大值。 |
已申请门票。COUNT | 计数器 | 发出的取票请求数。 |
ticketRequestedFailed。count | 计数器 | 失败的取票请求数。 |
ticketRequestedSuccess。count | 计数器 | 成功获取票证的请求数。 |
searchCallLatency.avg | 计时器 | 搜索 API 调用延迟平均值。 |
searchCallLatency.max | 计时器 | 搜索 API 调用延迟时间上限。 |
searchResultsFound。count | 计数器 | 在给定搜索调用中找到的项目数。 |
searchRequestFailed。count | 计数器 | 搜索 API 调用失败次数。 |
authfailures.count | 计数器 | 身份验证失败计数。 |
类型:Confluence 连接器指标
来源 | 指标 | 指标类型 |
---|---|---|
acknowledgementSetSuccesses。count | 计数器 | 如果启用了确认功能,则此指标将提供成功同步的页数。 |
acknowledgementSetFailures。count | 计数器 | 如果启用了确认功能,则此指标将提供同步失败的页数。 |
crawlingTime.avg | 计时器 | 浏览所有新更改所花费的时间。 |
pageFetchLatency.avg | 计时器 | 内容提取 API 延迟(平均值)。 |
pageFetchLatency.max | 计时器 | 内容提取 API 延迟(最大)。 |
请求的页面数。计数 | 计数器 | 内容获取 API 的调用次数。 |
pageRequestFailed。count | 计数器 | 内容提取 API 的失败请求数。 |
pageRequestedSuccess。count | 计数器 | 成功请求内容获取 API 的次数。 |
searchCallLatency.avg | 计时器 | 搜索 API 调用延迟平均值。 |
searchCallLatency.max | 计时器 | 搜索 API 调用延迟上限 |
searchResultsFound。count | 计数器 | 在给定搜索调用中找到的项目数。 |
searchRequestsFailed。count | 计数器 | 搜索 API 调用失败次数。 |
authfailures.count | 计数器 | 身份验证失败计数。 |