Skip to main content

Better Stack uptime operations

v0.1.0

Inspect bounded monitor, incident, heartbeat and status-page state, aggregate availability and response-time metrics, and govern narrow monitor and incident lifecycle controls. Closed projections exclude hidden credentials, URLs and arbitrary content.

10 allowed by default 8 need approval by default
Pack ID
betterstack
Vendor
emisar
OS
linux
Actions
18
Required binaries. Install these binaries on the runner host before using the pack.
bash curl python3

Install

New to emisar? Follow the quickstart to connect your host and AI agent, then install this pack below. Agents can use its actions through the CLI or MCP.

emisar pack install downloads and checks the pack, then compares its content hash with the --hash below before copying it into the runner's packs directory. The hash identifies the exact pack shown on this page. If the download was changed, the command rejects it. It also reloads a running runner, so you do not need to restart it yourself.

on the runner host
sudo emisar pack install betterstack --hash sha256:25d2ccbf94e0efc498f447fae96516dfaf35e54bc5292c2d09be93d413db0d5c

Setup

Uses an inherited Better Stack API credential with HTTPS certificate verification. Requests go only to incidents.betterstack.com:443; credentials enter curl through private stdin, never action arguments or process argv.

Environment

Set these on the runner host, then add each name to execution.inherit_env so the value reaches the action.

  • BETTERSTACK_API_TOKEN

    Create a dedicated team or global API token in Better Stack Incidents → Integrations → API tokens. Grant access only to teams/resources needed by these actions; the same credential must permit any enabled controls. Global tokens require team_name on monitor_create. Allowlist this variable in execution.inherit_env.

  • CURL_CA_BUNDLE

    Optional administrator-managed CA bundle path for verified TLS; the system trust store is used otherwise. Allowlist only when needed.

Notes

  • Install bash, curl 7.76 or newer, and Python 3.9 or newer using the operating-system package manager; Debian/Ubuntu: apt-get install bash curl python3. The embedded Python runs in isolated mode and uses only the standard library. No jq or Python package installation is needed.
  • No sudo, protected host socket or host-service authority is required. This remote API pack has no host detection signal. The provider credential scope and Emisar action approval are separate boundaries.
  • Every action uses a fixed HTTPS origin, no redirects or credential-bearing URL input, a 15-second curl deadline, an independent 17-second client deadline and 4 MiB response cap. Output is bounded to 8 KiB. No automatic retries, automatic paging or raw provider errors.
  • Collection pages contain at most six rows; pass next_page back with unchanged selectors. Only a validated next-page number is returned, never the response-supplied URL. IDs remain exact decimal strings. Missing optional fields remain null; malformed types and unsupported enums fail explicitly.
  • Monitor URLs, names, auth, headers, bodies, scripts and proxy settings; heartbeat pulse URLs; incident causes and response bodies; and custom status-page content are never output. There are no application payload, heartbeat pulse, arbitrary HTTP or status-page write actions.
  • Monitor creation uses a new unauthenticated HTTP status check. Existing monitor URL changes are intentionally unavailable because hidden auth could otherwise be forwarded to a new host. Timing updates send only selected fields and use no atomic revision precondition.
  • Terraform-managed resources can revert runtime edits during the next apply; reconcile approved changes in their source owner. A successful mutation receipt confirms the returned provider state, not service recovery or alert delivery.

Verify it works

Runs betterstack.monitors_list, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify betterstack

Install and configure a pack walks through the whole sequence on a host.

Actions 18 total

View on GitHub
  • betterstack.heartbeat_details script low Low: read-only or trivially reversible

    Show a Better Stack heartbeat

    Show one heartbeat using a closed projection of exact IDs, state, timestamps and typed operational settings. URLs, names, private authentication, request content, incident causes and page HTML are excluded. Missing optional values remain null; malformed present values fail.

    Arguments
    Name Type Required
    heartbeat_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.heartbeat_update script high High: can disrupt service

    Update Better Stack heartbeat timing

    Update only selected period, grace or paused settings on one heartbeat. Minus one preserves a numeric setting and empty preserves pause state. Pausing suppresses missed-heartbeat alerts; resuming can page responders. Names, pulse URLs, routing and hidden data remain unchanged. This does not send a heartbeat pulse. Reconcile runtime changes with Terraform.

    Arguments
    Name Type Required
    heartbeat_id string Yes
    period integer No
    grace integer No
    paused string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.heartbeats_list script low Low: read-only or trivially reversible

    List Better Stack heartbeats

    List one bounded page of selected heartbeat IDs, state and typed operational settings. Omit names, URLs, hidden credentials, arbitrary content and raw provider errors. Continue with next_page and unchanged selectors; unsupported pagination fails explicitly.

    Arguments
    Name Type Required
    page integer No
    per_page integer No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.incident_acknowledge script high High: can disrupt service

    Acknowledge a Better Stack incident

    Acknowledge one incident with the fixed actor label Emisar. Acknowledgment prevents further escalation and does not repair the service. A conflict fails explicitly; inspect incident_details before treating an already changed state as success. The response must confirm a lifecycle timestamp.

    Arguments
    Name Type Required
    incident_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.incident_details script low Low: read-only or trivially reversible

    Show a Better Stack incident

    Show one incident using a closed projection of exact IDs, state, timestamps and typed operational settings. URLs, names, private authentication, request content, incident causes and page HTML are excluded. Missing optional values remain null; malformed present values fail.

    Arguments
    Name Type Required
    incident_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.incident_resolve script high High: can disrupt service

    Resolve a Better Stack incident

    Resolve one incident with the fixed actor label Emisar. Resolution records the incident state and is not proof of underlying service recovery. A conflict fails explicitly; inspect incident_details before treating an already changed state as success. The response must confirm a lifecycle timestamp.

    Arguments
    Name Type Required
    incident_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.incidents_list script low Low: read-only or trivially reversible

    List Better Stack incidents

    List one bounded page of selected incident IDs, state and typed operational settings. Omit names, URLs, hidden credentials, arbitrary content and raw provider errors. Continue with next_page and unchanged selectors; unsupported pagination fails explicitly.

    Arguments
    Name Type Required
    page integer No
    per_page integer No
    monitor_id string No
    heartbeat_id string No
    resolved string No
    acknowledged string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_availability script low Low: read-only or trivially reversible

    Show monitor availability

    Show finite availability percentage and downtime/incident aggregates for an explicit window of at most 31 inclusive calendar days. Missing metrics fail instead of becoming zero. This is a client work budget, not a provider retention limit.

    Arguments
    Name Type Required
    monitor_id string Yes
    from_date string Yes
    to_date string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_create script high High: can disrupt service

    Create an HTTP status monitor

    Create a new HTTP status monitor for a public credential-free URL, using GET or HEAD and verified SSL. Reject URL credentials, query strings, fragments and nonpublic IP literals. DNS names are syntax-validated without resolving them locally. Provider defaults determine notification routing, so creation may generate alerts. No custom headers, authentication, body or scripts are sent. Runtime changes must be reconciled with Terraform when it owns this resource.

    Arguments
    Name Type Required
    url string Yes
    http_method string No
    check_frequency integer No
    request_timeout integer No
    confirmation_period integer No
    recovery_period integer No
    team_name string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_delete script high High: can disrupt service

    Delete a Better Stack monitor

    Delete one monitor permanently, ending its future checks and notifications. The provider may remove associated monitoring history; this does not repair the service. A successful empty HTTP 204 is the deletion receipt. Terraform may recreate an owned monitor on a later apply.

    Arguments
    Name Type Required
    monitor_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_details script low Low: read-only or trivially reversible

    Show a Better Stack monitor

    Show one monitor using a closed projection of exact IDs, state, timestamps and typed operational settings. URLs, names, private authentication, request content, incident causes and page HTML are excluded. Missing optional values remain null; malformed present values fail.

    Arguments
    Name Type Required
    monitor_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_pause script high High: can disrupt service

    Pause a Better Stack monitor

    Pause checks and suppress new downtime notifications until monitor_resume. Existing incidents are not repaired or resolved. Send only the fixed paused boolean. Reconcile runtime changes with Terraform.

    Arguments
    Name Type Required
    monitor_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_response_times script low Low: read-only or trivially reversible

    Summarize monitor response times

    Show counts, minimum, mean, maximum and latest response time in seconds for the provider last-24-hour window, grouped by at most four fixed regions. Raw samples and request content are excluded. Empty region samples produce null metrics; missing or invalid samples fail. A response over 4 MiB fails explicitly rather than silently dropping data.

    Arguments
    Name Type Required
    monitor_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_resume script high High: can disrupt service

    Resume a Better Stack monitor

    Resume checks for one monitor; failures can create incidents and page responders. Send only the fixed paused boolean. Reconcile runtime changes with Terraform.

    Arguments
    Name Type Required
    monitor_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitor_update script high High: can disrupt service

    Update HTTP monitor timing

    Update only selected frequency, timeout, confirmation and recovery settings on one HTTP monitor. A prior read validates the HTTP type and combined timeout/frequency; server and Playwright checks use different timeout contracts and are refused. Omitted settings and all hidden auth, headers, bodies and URLs remain unchanged. There is no atomic revision precondition; concurrent edits may race. Reconcile runtime changes with Terraform.

    Arguments
    Name Type Required
    monitor_id string Yes
    check_frequency integer No
    request_timeout integer No
    confirmation_period integer No
    recovery_period integer No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.monitors_list script low Low: read-only or trivially reversible

    List Better Stack monitors

    List one bounded page of selected monitor IDs, state and typed operational settings. Omit names, URLs, hidden credentials, arbitrary content and raw provider errors. Continue with next_page and unchanged selectors; unsupported pagination fails explicitly.

    Arguments
    Name Type Required
    page integer No
    per_page integer No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.status_page_details script low Low: read-only or trivially reversible

    Show a Better Stack status page

    Show one status page using a closed projection of exact IDs, state, timestamps and typed operational settings. URLs, names, private authentication, request content, incident causes and page HTML are excluded. Missing optional values remain null; malformed present values fail.

    Arguments
    Name Type Required
    status_page_id string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • betterstack.status_pages_list script low Low: read-only or trivially reversible

    List Better Stack status pages

    List one bounded page of selected status page IDs, state and typed operational settings. Omit names, URLs, hidden credentials, arbitrary content and raw provider errors. Continue with next_page and unchanged selectors; unsupported pagination fails explicitly.

    Arguments
    Name Type Required
    page integer No
    per_page integer No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub