Skip to content

Monitoring

Greenlight provides Prometheus metrics to monitor the status of your healthchecks.

Metrics are available on a per-zone basis.

Right now, up/down status for boolean Functions is available. More metrics will be added over time.

NameDescription
greenlightd_engine_check_uprepresents whether a healthcheck/boolean functions is up (value 1) or down (value 0)
greenlightd_engine_earliest_cert_expiryfor TLS-enabled connections, returns unixtime in seconds of when the next certificate in the certificate chain will expire

Authentication is required to access your metrics.

When you’re logged in to Greenlight’s web interface, you will be able to view them there at your Zone’s overview page (click on your Zones at /ui/zones).

To actually monitor your metrics from a monitoring system like Prometheus, VictoriaMetrics, or similar, you’ll want to use a Bearer token.

To do that:

  1. Create an API token at your dashboard. Note the token that gets shown to you.

  2. Configure your monitoring system to monitor your zone with the token. For example, for Prometheus:

    scrape_configs:
    - job_name: "your_zone"
    metrics_path: /metrics/zones/<your zone>
    scheme: https
    static_configs:
    - targets: ["www.greenlightedns.net"]
    # http_config section
    # https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_config
    authorization:
    type: "Bearer:"
    credentials: <your API token>
    # credentials_file: