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-elastic

v0.0.1

Published

Elastic Watcher + Kibana Rules alert provider for alerthq

Readme

@alerthq/provider-elastic

Elastic Watcher + Kibana Rules alert provider for alerthq.

Supported Alert Types

| Alert Type | API Source | Notes | |------------|-----------|-------| | Elasticsearch Watchers | POST /_watcher/_query/watches via @elastic/elasticsearch | All watcher types (compare, script, array_compare, always, never) | | Kibana Alerting Rules | GET /api/alerting/rules/_find via Kibana REST API | All rule types (metrics, logs, uptime, APM, etc.) |

Kibana rules are only fetched when kibanaUrl is configured.

Authentication

Two authentication models are supported:

  • Basic auth — username and password
  • API key — a base64-encoded API key

The same credentials are used for both Elasticsearch and Kibana (if configured).

Configuration

Add to your alerthq.yaml:

providers:
  elastic:
    enabled: true
    url: https://my-cluster.es.example.com:9200
    kibanaUrl: https://my-cluster.kb.example.com:5601  # optional
    auth:
      type: basic
      username: elastic
      password: changeme
    # Or use API key auth:
    # auth:
    #   type: apiKey
    #   apiKey: base64encodedkey

| Field | Type | Required | Default | Description | |-------|------|----------|---------|-------------| | url | string | Yes | — | Elasticsearch cluster URL | | kibanaUrl | string | No | — | Kibana URL (enables Kibana rule fetching) | | auth.type | 'basic' \| 'apiKey' | Yes | — | Authentication type | | auth.username | string | If basic | — | Elasticsearch username | | auth.password | string | If basic | — | Elasticsearch password | | auth.apiKey | string | If apiKey | — | Base64-encoded API key | | watcherPageSize | number | No | 100 | Page size for watcher queries | | kibanaPageSize | number | No | 100 | Page size for Kibana rule queries |

Required Permissions

Elasticsearch: The user/API key needs the manage_watcher or monitor_watcher cluster privilege to query watches.

Kibana: The user/API key needs the read privilege for the Alerting feature in the relevant Kibana space(s).

Field Mapping

Watchers

| AlertDefinition Field | Source | |-----------------------|--------| | id | generateAlertId('elastic-watcher', _id) | | source | 'elastic-watcher' | | sourceId | _id (watch ID) | | name | _id (watches have no separate name field) | | description | Empty string | | enabled | status.state.active | | severity | 'unknown' (watchers have no native severity) | | conditionSummary | Built from condition block (compare, script, always, etc.) | | notificationTargets | Extracted from actions (email, webhook, slack, pagerduty, logging, index) | | tags | Empty (watchers have no native tags) | | lastModifiedAt | null (not available from watcher API) |

Kibana Rules

| AlertDefinition Field | Source | |-----------------------|--------| | id | generateAlertId('elastic-kibana', id) | | source | 'elastic-kibana' | | sourceId | id (Kibana rule UUID) | | name | name | | enabled | enabled | | severity | 'unknown' (Kibana rules have no unified severity field) | | conditionSummary | Built from rule_type_id + params (criteria, threshold, index) | | notificationTargets | Extracted from actions by actionTypeId (email, slack, pagerduty, webhook, server-log) | | tags | Kibana tags converted to { tagName: 'true' } record | | lastModifiedAt | updatedAt |

Limitations

  • Watcher severity is always 'unknown' — Elasticsearch watchers have no native severity concept.
  • Watcher names use the _id field since watchers have no dedicated name.
  • Watcher lastModifiedAt is not available from the query API.
  • Kibana rules require a separate kibanaUrl and do not use the Elasticsearch SDK.

License

MIT