microsoft / microsoft/pai

API for user related alerts

Open
#5,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pai-dev
Dominant language
JavaScript
Stars
2.7k
Forks
554
Avg merge
20h 42m
Merged PRs (30d)
14

Description

Design

API: GET api/v2/alerts

Response: 200

[
        {
            "labels": {
                "alertname": "NodeFilesystemUsage",
                "severity": "warn"
                ...
            },
            "annotations": {
                "summary": "Free space in /dev/sdc1 from 10.151.40.40:9100 is less than 20% (current value is: 4.967095016467968)"
            },
            "startsAt": "2021-03-16T02:41:46.9532588Z",
            "endsAt": "2021-03-31T03:18:46.9651152Z",
            "generatorURL": "http://...",
            "status": {
                "state": "active",
                "silencedBy": [],
                "inhibitedBy": []
            },
            ...
        }
    ]

Implementation

  • API for all prometheus alerts: /alert-manager/api/v1/alerts?silenced=false
  • if user is admin: return all alerts
  • else: return only the alerts related to the user's jobs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the API entry point for GET api/v2/alerts and the integration with /alert-manager/api/v1/alerts?silenced=false. Verify how administrator access and user jobs are identified. Done means administrators receive all alerts, while other users receive only alerts related to their jobs, with the documented response shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, prometheus
Domain
api, backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.