keephq / keep

The open-source alert management and AIOps platform
https://platform.keephq.dev
MIT License
3.07k stars 200 forks source link

[🔌 Provider] Make PagerDuty provider to fetch incidents retrospectively #1262

Open Matvey-Kuk opened 2 weeks ago

Matvey-Kuk commented 2 weeks ago

Is your feature request related to a problem? Please describe. PagerDuty provider in fetching new Incidents that happened only after it was connected:

Screenshot 2024-06-20 at 18 40 39

Fetched payload is also pretty limited:

{
  "environment": "unknown",
  "service": "Default Service",
  "apiKeyRef": null,
  "message": null,
  "labels": {},
  "fingerprint": "ea614d4639cd2ca3e5857adc6189b26b1a73b45858605ed64045615e4d8f6429",
  "dismissUntil": null,
  "dismissed": false,
  "startedAt": "2024-06-20 15:39:30.550000",
  "isNoisy": false,
  "priority": null,
  "escalation_policy": {
    "id": "PPB6DK3",
    "self": "https://api.pagerduty.com/escalation_policies/PPB6DK3",
    "type": "escalation_policy_reference",
    "summary": "Default",
    "html_url": "https://asdlksa.pagerduty.com/escalation_policies/PPB6DK3"
  },
  "number": 2,
  "type": "incident",
  "resolve_reason": null,
  "alert_hash": "15d56631ceea5f7559ba83041f3768227dbc20dde60dffa1eecb9226fe38dd68",
  "urgency": "high",
  "teams": [],
  "conference_bridge": null,
  "incident_key": "4c7286b70d4946ddaccb2b9cd8de824b"
}

Describe the solution you'd like

  1. We would love to see all past incidents also being fetched.
  2. Important metadata, such as impacted services, notes, etc, should also be fetched to the event metadata.

It will help to query and analyze PD incidents inside Keep.

Matvey-Kuk commented 2 weeks ago

/bounty 20

algora-pbc[bot] commented 2 weeks ago

💎 $20 bounty • Keep (YC W23)

💎 $20 bounty • gabain

Steps to solve:

  1. Start working: Comment /attempt #1262 with your implementation plan
  2. Submit work: Create a pull request including /claim #1262 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to keephq/keep!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @mobley-trent Jun 21, 2024, 4:09:16 AM #1265
🟢 @onyedikachi-david Jun 23, 2024, 12:15:24 AM #1267
mobley-trent commented 2 weeks ago

/attempt #1262

Algora profile Completed bounties Tech Active attempts Options
@mobley-trent    1 keephq bounty
+ 3 bounties from 2 projects
Python, Rust,
Jupyter Notebook
Cancel attempt
algora-pbc[bot] commented 2 weeks ago

💡 @mobley-trent submitted a pull request that claims the bounty. You can visit your bounty board to reward.

onyedikachi-david commented 2 weeks ago

/attempt #1262

Algora profile Completed bounties Tech Active attempts Options
@onyedikachi-david 2 bounties from 1 project
JavaScript, Shell
Cancel attempt
algora-pbc[bot] commented 2 weeks ago

[!NOTE] The user @mobley-trent is already attempting to complete issue #1262 and claim the bounty. We recommend checking in on @mobley-trent's progress, and potentially collaborating, before starting a new solution.

algora-pbc[bot] commented 2 weeks ago

💡 @onyedikachi-david submitted a pull request that claims the bounty. You can visit your bounty board to reward.

mobley-trent commented 2 weeks ago

Hi @onyedikachi-david I appreciate your interest in this issue but I'm already working on a PR for it

onyedikachi-david commented 2 weeks ago

Hi @onyedikachi-david I appreciate your interest in this issue but I'm already working on a PR for it

@mobley-trent I am sorry, since you were not assigned and it was not specified on the algora comment that the contributor needs to be assigned first, I thought it was like others that anyone can compete for. Should I delete my pull request @Matvey-Kuk

Matvey-Kuk commented 1 week ago

@onyedikachi-david I'm sorry, I didn't notice @mobley-trent before I reviewed your PR. We'll continue with @mobley-trent's PR if it will be merged in a few days :)

onyedikachi-david commented 6 days ago

Alright.

On Mon, Jul 1, 2024 at 3:23 PM Matvey Kukuy @.***> wrote:

@onyedikachi-david https://github.com/onyedikachi-david I'm sorry, I didn't notice @mobley-trent https://github.com/mobley-trent before I reviewed your PR. We'll continue with @mobley-trent https://github.com/mobley-trent's PR if it will be merged in a few days :)

— Reply to this email directly, view it on GitHub https://github.com/keephq/keep/issues/1262#issuecomment-2200295206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRXHZJMGZQK43EG3UZPMDZKFQ57AVCNFSM6AAAAABJUHMRJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGI4TKMRQGY . You are receiving this because you were mentioned.Message ID: @.***>