Skip to main content

Airport Weather Monitoring Agent

Easily collect and visualize comprehensive weather data from airports worldwide in Grafana with Telemetry Harbor.

Repo Link: https://github.com/TelemetryHarbor/harbor-airport-weather

Features

  • Collect comprehensive weather data from airports worldwide including temperature, pressure, wind, humidity, UV index, air quality, and visibility
  • Support for multiple airports with customizable names
  • Configurable sampling rates from 1 minute to 1 hour
  • Automatic service installation with systemd integration
  • Interactive installation with color-coded interface
  • Pre-built Grafana dashboard
  • Real-time weather data from aviation weather services and OpenWeatherMap API

Prerequisites

Before starting, ensure you have:

  • A Linux system with root/sudo access
  • curl installed for API communication
  • A working internet connection to fetch weather data and send to Telemetry Harbor
  • OpenWeatherMap API key (free tier available at https://openweathermap.org/api)
  • Basic knowledge of Linux terminal commands

Available Metrics

The enhanced airport weather agent collects the following metrics for each airport:

MetricDescriptionUnits
Temperature_FahrenheitCurrent temperature°F
Feels_Like_FApparent temperature°F
Humidity_PercentRelative humidity%
Pressure_hPaAtmospheric pressurehPa
Wind_Speed_MPHWind speedmph
Wind_Gust_MPHWind gust speedmph
Wind_Direction_DegreesWind directiondegrees
UV_IndexUV radiation levelindex
Visibility_MetersAtmospheric visibilitymeters
Cloud_Cover_PercentCloud coverage%
PM2_5_ugm3PM2.5 particlesμg/m³
PM10_ugm3PM10 particlesμg/m³

Setup

1. Create a Telemetry Harbor Account

  1. Sign up at Telemetry Harbor
  2. Verify your email and log in
  3. Create a Harbor:
    • Click Create Harbor on your dashboard
    • Choose a name and select General as the type
    • Select the Free plan (or upgrade for more data capacity)
    • Click Create
  4. Retrieve your credentials:
    • After creation, go to View Details
    • Note down:
      • API Batch Endpoint
      • API Key
      • Grafana Endpoint
      • Grafana Username
      • Grafana Password

2. Get OpenWeatherMap API Key

  1. Sign up at OpenWeatherMap
  2. Subscribe to the Free plan (1,000 calls/day)
  3. Copy your API Key from the dashboard

3. Install the Airport Weather Agent

  1. Download the installation script:
curl -sSL -o install-airport-weather.sh https://raw.githubusercontent.com/TelemetryHarbor/harbor-airport-weather/refs/heads/main/install.sh
  1. Make it executable:
chmod +x install-airport-weather.sh
  1. Run the installation script with root privileges:
sudo ./install-airport-weather.sh

4. Configuration During Installation

During installation, you'll be prompted to:

  1. Enter your Telemetry Harbor API details:

    • API Batch Endpoint URL
    • API Key
  2. Enter your OpenWeatherMap API key

  3. Select airports to monitor:

    • Enter airport codes and names in the format ICAO:Airport Name
    • Choose from sample airports around the world
    • Add as many airports as you need
  4. Select a sampling rate for how often weather data is collected:

    • Every 1 minute
    • Every 5 minutes (recommended)
    • Every 15 minutes
    • Every 30 minutes
    • Every 1 hour

Sample Airports

The installation script includes sample airports from around the world:

ICAO CodeAirport Name
KJFKJohn F. Kennedy International Airport (New York, USA)
EGLLHeathrow Airport (London, UK)
RJTTTokyo Haneda Airport (Tokyo, Japan)
YSSYSydney Airport (Sydney, Australia)
FACTCape Town International Airport (Cape Town, South Africa)
SBGRSão Paulo–Guarulhos International Airport (São Paulo, Brazil)
LTBAIstanbul Atatürk Airport (Istanbul, Turkey)
OMDBDubai International Airport (Dubai, UAE)
VIDPIndira Gandhi International Airport (Delhi, India)
ZBAABeijing Capital International Airport (Beijing, China)

Pre-built Grafana Dashboard

Import the Ready-to-Use Dashboard

  1. Download the dashboard JSON:
curl -sSL -o airport-weather-dashboard.json https://raw.githubusercontent.com/TelemetryHarbor/harbor-airport-weather/main/airport-weather-dashboard.json
  1. Import into Grafana:
    • Log in to your Grafana instance
    • Go to DashboardsImport
    • Click Upload JSON file and select airport-weather-dashboard.json
    • Configure the PostgreSQL datasource
    • Click Import

Dashboard Features

  • Current Weather Conditions: Real-time summary table with color-coded values
  • Temperature & Feels Like: Historical temperature trends
  • Humidity: Relative humidity monitoring
  • Pressure: Barometric pressure tracking
  • Wind Speed & Gusts: Wind condition analysis
  • UV Index: Solar radiation levels with safety thresholds
  • Air Quality: PM2.5 and PM10 particulate matter monitoring
  • Airport Filter: Multi-select airport monitoring
  • Auto-refresh: Real-time data updates every 30 seconds

Managing the Service

After installation, the airport weather service runs automatically. You can manage it using:

# Check service status
systemctl status harbor-airport

# View logs
journalctl -u harbor-airport -f

# Stop the service
systemctl stop harbor-airport

# Start the service
systemctl start harbor-airport

# Disable automatic startup
systemctl disable harbor-airport

# Enable automatic startup
systemctl enable harbor-airport

Troubleshooting

Common Issues

Error: Failed to send test data point

  • Verify your API endpoint and key are correct
  • Check your internet connection
  • Ensure your firewall allows outbound connections

Error: Invalid OpenWeatherMap API key

  • Verify your API key is correct
  • Ensure your API key is activated (may take a few minutes after signup)
  • Check you haven't exceeded the free tier limits

Service starts but no data appears in Grafana

  • Check the service logs: journalctl -u harbor-airport -f
  • Verify the airports you selected are valid ICAO codes
  • Ensure your Telemetry Harbor account is active

Missing or incomplete weather data

  • Some airports may not report all weather metrics consistently
  • Try adding more airports to ensure consistent data collection
  • Check if the weather services are experiencing issues

Uninstalling

To uninstall the airport weather agent:

  1. Run the installation script again:
sudo ./install-airport-weather.sh
  1. Select the "Uninstall Airport Weather Collector" option from the menu.

Alternatively, use the uninstall flag:

sudo ./install-airport-weather.sh --uninstall

Data Applications

The comprehensive airport weather data can be used for:

  • Professional weather monitoring and analysis
  • Climate pattern tracking across different regions
  • Air quality monitoring for health and safety
  • Aviation weather decision support
  • Historical weather database creation
  • Educational purposes and research
  • Correlating weather with other operational metrics