Schedule icon
Get icon
Download icon
Queries icon
Set icon
Log icon
If icon
Loop icon
SlackIncomingWebhook icon

Alert When Wildfires, Storms, Volcanoes or Floods Come Near Your Sites with NASA EONET

Hourly NASA EONET check of wildfires, storms, volcanoes and floods near your sites, with DuckDB distances, KV dedupe and per-site Slack alerts.

Categories
Infrastructure

Operations, facilities and supply-chain teams often learn from the news that a wildfire is 15 km from a distribution centre or that a typhoon is heading for a cable landing station. NASA's Earth Observatory Natural Event Tracker (EONET) already collects those events from IRWIN (US wildfires), JTWC and NOAA NHC (tropical cyclones), GDACS (floods), the Smithsonian volcano program and others into one keyless API. This flow checks it every hour against your own list of sites. DuckDB flattens every event geometry and measures the great-circle distance from each site to the latest position of each event (0 km when the site is inside a flood polygon). Slack gets one message per affected site with distance, compass direction, approaching or receding, magnitude and source links. A KV state keyed on (event id, asset) keeps the same fire from being posted every hour; it is posted again only if it moves closer by a threshold.

How it works

  1. hourly (Schedule) runs at minute 7 of every hour. The assets input is a JSON array of name, lat, lon and radius_km.
  2. previous_state (KV Get, errorOnMissing: false) reads the pairs already alerted and the distance at the time. On the first run there is no state, so every in-radius pair alerts once; the summary says so.
  3. fetch_events (HTTP Download) makes one request to eonet.gsfc.nasa.gov/api/v3/events with status, days and all the selected categories in a single comma-separated category parameter, with a User-Agent and an exponential retry.
  4. proximity (DuckDB Queries, session in UTC) does the geography in SQL. It validates the assets and reports a bad latitude or longitude, a missing radius or name and duplicate names instead of silently dropping them. It drops IRWIN prescribed burns unless include_prescribed_fires is on. It flattens every geometry into vertices (Point, and the outer ring of a Polygon) and repairs GDACS polygons that arrive as [lat, lon]. It keeps the latest fix of each event, computes the haversine distance and bearing to it, runs a ray-casting point-in-polygon test and compares the latest fix with the previous one to label storms APPROACHING or RECEDING. Finally it joins the in-radius pairs to the state as NEW, CLOSER (at least closer_threshold_km nearer than at the last alert) or ALREADY_ALERTED, and writes the proximity CSV, the new state (pairs whose event closed or left the window are pruned) and one alert object per affected site.
  5. save_state (KV Set) stores the new state as JSON.
  6. warn_invalid_assets logs a WARN for skipped assets. alert_by_asset (If) runs only when something is new or closer: log_alerts writes every alert at WARN level and each_asset (Loop) posts one Slack message per site. Otherwise nothing_new logs that all in-radius pairs were already alerted.
  7. summary logs the event, geometry and polygon counts, the alert counts and the nearest event to every site, in radius or not. The flow outputs are the proximity CSV and the summary row.

What you get

  • One Slack message per site with linked event titles, distance and direction, approaching or receding, magnitude (knots, acres) and links to the IRWIN, JTWC, NHC or GDACS report.
  • A CSV of every site/event pair inside a radius: distance, direction, trend, closest approach in the window, alert status, last alert distance, geometry type, magnitude, UTC update time and links.
  • No hourly repeats: a fire or storm is posted once per site, and again only when it gets meaningfully closer.
  • Flood polygons handled properly: a site inside the flooded area is 0 km away, not some distance from a centroid.
  • Bad asset rows surface as a WARN with the row number and the reason.
  • No API key, no database, no container.

Who it's for

  • Site reliability and data centre operations teams with physical facilities.
  • Logistics, supply-chain and fleet teams watching warehouses, ports and terminals.
  • Business continuity, risk and insurance analysts who need an auditable log of natural-event exposure.
  • Energy and telecom operators with pipelines, substations or cable landing stations.

Why orchestrate this with Kestra

  • The schedule, retries and KV state live in one YAML file; there is no cron host or state file to look after.
  • DuckDB inputFiles take the API response, the asset list and the KV state directly, so the whole spatial join is one SQL task you can read and change.
  • If and Loop keep Slack quiet when nothing changed and send one message per site when something did; allowFailure keeps the check running when the webhook is missing or Slack is down.
  • Inputs make the same flow reusable per region or team with a different state_key, and event_status: closed replays past events to tune radii.

Prerequisites

  • Kestra 2.0 with the JDBC DuckDB and Slack plugins (both in the default distribution).
  • Outbound HTTPS to eonet.gsfc.nasa.gov. EONET is public and needs no key or account.
  • Site coordinates in decimal degrees (WGS84). Distances go to the nearest vertex of the latest geometry; for a large polygon the true distance to its edge can be a little shorter, so leave some margin in radius_km.
  • EONET is a curated feed and lags the source agencies by minutes to hours. Use it for awareness, not for life-safety decisions.

Secrets

  • SLACK_WEBHOOK_URL: Slack incoming webhook that receives the per-site alerts (optional; without it the alerts are only in the logs and the CSV).

Quick start

  1. Optionally add the SLACK_WEBHOOK_URL secret.
  2. Import the flow and click Execute with the six default sites. On the first run the sites near active events alert (when tested: a Nevada wildfire 15 km from Reno, a Los Angeles County fire, a Pacific hurricane and a super typhoon near Guam), while Phoenix and Houston show their nearest event outside the radius.
  3. Execute again: the same pairs show as suppressed and nothing_new runs.
  4. Replace assets with your own sites and radii, pick the categories you care about and enable the hourly trigger.
  5. To see polygon handling, run with event_status: closed, categories: [floods] and a separate state_key; sites inside recent GDACS flood areas come back at 0 km.

How to extend

  • Route alerts per site by adding a channel or webhook field to each asset and using it in the Slack task.
  • Add an AI task that summarises the JTWC or NHC advisory linked in the alert.
  • Load the proximity CSV into Postgres, BigQuery or Snowflake for an exposure history, or attach it to a weekly digest.
  • Open an incident in PagerDuty or Opsgenie when distance_km is below a critical radius or the site is inside a polygon.
  • Add earthquakes or landslides to categories, or pass the EONET bbox parameter per region to trim the payload.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.