npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alerthq/provider-grafana

v0.0.1

Published

Grafana alert provider for alerthq

Readme

@alerthq/provider-grafana

Grafana alert provider for alerthq.

Supported Alert Types

| Alert Type | API Source | Notes | |------------|-----------|-------| | Grafana-managed alert rules | GET /api/v1/provisioning/alert-rules | Unified alerting (Grafana 9+) |

Authentication

Three authentication modes are supported:

  • API key / Service account token — sent as Authorization: Bearer <token>
  • Basic auth — sent as Authorization: Basic base64(username:password)
  • No auth — for unauthenticated local Grafana instances

Configuration

Add to your alerthq.yaml:

providers:
  grafana:
    enabled: true
    url: https://grafana.example.com
    apiKey: glsa_xxxxxxxxxxxxxxxxxxxx
    # Or use basic auth:
    # basicAuth:
    #   username: admin
    #   password: changeme

| Field | Type | Required | Default | Description | |-------|------|----------|---------|-------------| | url | string | Yes | — | Grafana instance base URL | | apiKey | string | No | — | API key or service account token | | basicAuth.username | string | No | — | Basic auth username | | basicAuth.password | string | No | — | Basic auth password |

Required Permissions

The API key or service account needs the alert.rules:read RBAC scope to fetch alert rule definitions.

For contact point resolution, alert.notifications:read is also recommended.

Field Mapping

| AlertDefinition Field | Source | |-----------------------|--------| | id | generateAlertId('grafana', uid) | | source | 'grafana' | | sourceId | uid | | name | title | | description | annotations.description (fallback: annotations.summary) | | enabled | !isPaused | | severity | labels.severity (critical/warning/info, fallback: unknown) | | conditionSummary | Built from condition + data + for duration | | notificationTargets | notification_settings.receiver | | tags | labels | | owner | Empty string (not available from Grafana API) | | lastModifiedAt | updated |

Limitations

  • Only fetches Grafana-managed alert rules. Data source-managed rules (Mimir/Loki/Cortex ruler rules) are not included.
  • No creator information — the Grafana provisioning API does not expose who created or last modified a rule, so owner is always empty.
  • Severity is inferred from labels — Grafana has no native severity field; the provider looks for a severity label and maps known values (critical, warning, info), defaulting to unknown.
  • No pagination — the provisioning API returns all rules in a single response; very large rule sets may be slow.

License

MIT