-
Notifications
You must be signed in to change notification settings - Fork 709
Create monitor-alert-pagerduty #22365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @huoyao1125. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary of ChangesHello @huoyao1125, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces new documentation that guides users through the process of integrating TiDB Cloud alert notifications with PagerDuty. The addition of this guide expands the available alert delivery channels, providing users with another critical tool for monitoring their TiDB Cloud clusters and ensuring timely responses to operational issues. The documentation clearly outlines the necessary steps and prerequisites, making it easier for eligible users to configure PagerDuty alerts. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a new documentation page for subscribing to TiDB Cloud alerts via PagerDuty. The overall structure is good and consistent with other alert integration documents.
My review focuses on improving clarity, conciseness, and technical accuracy, following the repository's documentation style guide. The most critical issue is in 'Step 1' for generating the PagerDuty URL, which currently contains incorrect placeholder content copied from the Slack documentation. I have provided a detailed suggestion to replace it with the correct procedure. Other suggestions include minor wording improvements to enhance readability and consistency.
| ### Step 1. Generate a PagerDuty webhook URL ##这部分请思雨帮忙更新 | ||
|
|
||
| 1. [Create a PagerDuty app](https://api.PagerDuty.com/apps/new), if you do not have one already. Click **Create New App**, and choose **From scratch**. Enter a name, choose a workspace to associate your app with, and then click **Create App**. | ||
| 2. Go to the settings page for your app. You can load its settings via your [app's management dashboard](https://api.PagerDuty.com/apps). | ||
| 3. Click the **Incoming Webhooks** tab, and then toggle **Activate Incoming Webhooks** to **ON**. | ||
| 4. Click **Add New Webhook to Workspace**. | ||
| 5. Select a channel that you want to receive alert notifications in, and then select **Authorize**. If you need to add the incoming webhook to a private channel, you must first be in that channel. | ||
|
|
||
| You can see a new entry under the **Webhook URLs for Your Workspace** section in the following format: `https://hooks.PagerDuty.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section contains a placeholder comment and incorrect instructions copied from the Slack integration document. These steps will not work for PagerDuty and will cause user confusion.
I've provided the likely correct steps for integrating with PagerDuty, which involves using the Prometheus integration type to generate a compatible URL. Please verify if this is the intended integration method.
### Step 1. Generate a PagerDuty integration URL
1. In your PagerDuty account, go to **Services** > **Service Directory**.
2. Choose whether to add your integration to a new or existing service:
* **To add to an existing service**: Click the name of the service, select the **Integrations** tab, and then click **Add a new integration**.
* **To create a new service**: Follow the PagerDuty documentation to [create a new service](https://support.pagerduty.com/docs/services-and-integrations#create-a-new-service).
3. On the **Add an Integration** page, search for and select **Prometheus**.
4. Click **Add**.
5. You will be redirected back to the **Integrations** tab. Copy the **Integration URL** that was just generated. You will use this URL in the TiDB Cloud console.
tidb-cloud/monitor-alert-pagerduty
Outdated
|
|
||
| # Subscribe via PagerDuty | ||
|
|
||
| TiDB Cloud provides you with an easy way to subscribe to alert notifications via [Slack](/tidb-cloud/monitor-alert-slack.md), [email](/tidb-cloud/monitor-alert-email.md), [Zoom](/tidb-cloud/monitor-alert-zoom.md), [Flashduty](/tidb-cloud/monitor-alert-flashduty.md) and [PagerDuty](/tidb-cloud/monitor-alert-pagerduty.md). This document describes how to subscribe to alert notifications via PagerDuty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid redundancy, it's best to remove the link that points to the current page itself.
TiDB Cloud provides you with an easy way to subscribe to alert notifications via [Slack](/tidb-cloud/monitor-alert-slack.md), [email](/tidb-cloud/monitor-alert-email.md), [Zoom](/tidb-cloud/monitor-alert-zoom.md), [Flashduty](/tidb-cloud/monitor-alert-flashduty.md), and PagerDuty. This document describes how to subscribe to alert notifications via PagerDuty.
tidb-cloud/monitor-alert-pagerduty
Outdated
|
|
||
| ## Prerequisites | ||
|
|
||
| - The subscribing via PagerDuty feature is only available for organizations that subscribe to the **Enterprise** or **Premium** support plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can be rephrased to be more direct and concise.
- Subscribing to alerts via PagerDuty is only available for organizations that subscribe to the **Enterprise** or **Premium** support plan.
References
- The style guide recommends avoiding unnecessary words and repetition (line 24). (link)
tidb-cloud/monitor-alert-pagerduty
Outdated
|
|
||
| - The subscribing via PagerDuty feature is only available for organizations that subscribe to the **Enterprise** or **Premium** support plan. | ||
|
|
||
| - To subscribe to alert notifications of TiDB Cloud, you must have the `Organization Owner` access to your organization or `Project Owner` access to the target project in TiDB Cloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can be made more concise by removing redundant phrases like "of TiDB Cloud" and "in TiDB Cloud", which improves readability.
- To subscribe to alert notifications, you must have the `Organization Owner` access to your organization or `Project Owner` access to the target project.
References
- The style guide recommends avoiding unnecessary words and repetition (line 24). (link)
| 1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target project using the combo box in the upper-left corner. | ||
| 2. In the left navigation pane, click **Project Settings** > **Alert Subscription**. | ||
| 3. On the **Alert Subscription** page, click **Add Subscriber** in the upper-right corner. | ||
| 4. Select **PagerDuty** from the **Subscriber Type** drop-down list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the suggested changes in 'Step 1', let's use 'integration URL' instead of 'webhook URL'.
5. Enter a name in the **Name** field and your PagerDuty integration URL in the **URL** field.
References
- The style guide requires using consistent terminology (line 25). (link)
tidb-cloud/monitor-alert-pagerduty
Outdated
|
|
||
| ## Unsubscribe from alert notifications | ||
|
|
||
| If you no longer want to receive alert notifications of clusters in your project, take the following steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can be simplified for better readability.
If you no longer want to receive alert notifications for clusters in your project, follow these steps:
References
- The style guide recommends avoiding unnecessary words and repetition (line 24). (link)
tidb-cloud/monitor-alert-pagerduty
Outdated
|
|
||
| 1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target project using the combo box in the upper-left corner. | ||
| 2. In the left navigation pane, click **Project Settings** > **Alert Subscription**. | ||
| 3. On the **Alert Subscription** page, locate the row of your target subscriber to be deleted, and then click **...** > **Unsubscribe**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This instruction can be phrased more directly for better clarity.
3. On the **Alert Subscription** page, find the subscriber that you want to delete, and then click **...** > **Unsubscribe**.
References
- The style guide emphasizes clarity and simplicity (line 14). This change makes the step easier to follow. (link)
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Merged to #22364 |
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?