aethercert
Dokumentation
Monitoring

Monitoring API

The Prometheus-format metrics endpoint: issuing a key, every metric it exposes, and pointing CheckMK, Prometheus, Grafana or Zabbix at it.

GET /api/monitoring/metrics returns your fleet's current state in Prometheus exposition format. It is the pull half of Monitoring > Integrations, and it is the whole machine-readable API surface aethercert exposes to your own tooling.

Requires the Pro plan or an MSP tier.

Issuing a key

Create a key under Monitoring > Integrations. It is shown once, in the form <key-id>.<secret>, and is sent as a bearer token:

curl -H "Authorization: Bearer <key-id>.<secret>" \
  https://api.aethercert.com/api/monitoring/metrics

A key is scoped to the organization that issued it and can be revoked at any time; revoking takes effect immediately. Only the hash is stored, so a lost key is replaced rather than recovered.

Authentication is rate-limited per key id - 240 requests per 5 minutes, sized for a 15-to-60-second scrape interval. The response is never cached; a scrape sees the fleet's current state.

Wiring it up

CheckMK ships a built-in Prometheus special agent, so pointing that at this URL with the key as its bearer token is the entire CheckMK setup - there is no plugin to install. The same endpoint works unchanged with Grafana, Datadog's OpenMetrics check, Zabbix's HTTP agent, or a plain prometheus.yml scrape config:

scrape_configs:
  - job_name: aethercert
    scheme: https
    metrics_path: /api/monitoring/metrics
    authorization:
      credentials: "<key-id>.<secret>"
    static_configs:
      - targets: ["api.aethercert.com"]

Your monitoring server needs outbound HTTPS to api.aethercert.com. Nothing has to be opened on the agent side for this.

What it exposes

MetricTypeLabels
aethercert_agents_totalgaugestatus - enrolled agents by effective status
aethercert_certificates_totalgaugestatus
aethercert_certificates_expiring_within_daysgaugedays - 7, 14 and 30
aethercert_jobs_totalgaugestatus, type
aethercert_organization_infogaugeplan - always 1, for joining
aethercert_renewals_duegaugeManaged certificates currently due for renewal
aethercert_job_leases_activegaugeJobs currently claimed by an agent
aethercert_job_leases_expiredgaugeClaimed jobs whose lease expired and awaits recovery
aethercert_last_agent_heartbeat_secondsgaugeSeconds since the most recent heartbeat across the fleet. Absent until one exists
aethercert_oldest_queued_job_secondsgaugeAge of the oldest queued job. Absent when nothing is queued
aethercert_agent_poll_requests_totalcounterJob polls the fleet has made
aethercert_agent_poll_no_change_totalcounterHeartbeats answered with no work queued
aethercert_agent_poll_jobs_returned_totalcounterJobs handed out across every poll
aethercert_worker_job_duration_secondshistogramClaim to terminal state, most recent attempt only
aethercert_agent_updates_totalcountercomponent, result - self-update cycles
aethercert_release_rollout_percentgaugecomponent, version, channel
aethercert_notification_email_sent_totalcounterIssuance notification emails sent
aethercert_notification_email_failed_totalcounterNotifications that exhausted their retries
aethercert_notification_email_retry_totalcounterRetry attempts beyond the first

What it deliberately does not expose

The endpoint reports aggregate counts, never per-certificate or per-agent detail. A certificate's common name is not visible to a metrics scraper, and no metric carries an agent id or a job id as a label - an unbounded label set would be a cardinality problem as well as a disclosure one. For per-entity detail, use the dashboard.

Alerting on it

Three rules cover most of what goes wrong:

groups:
  - name: aethercert
    rules:
      - alert: AethercertCertificateExpiringSoon
        expr: aethercert_certificates_expiring_within_days{days="14"} > 0
        for: 1h
      - alert: AethercertJobsFailing
        expr: aethercert_jobs_total{status="failed"} > 0
        for: 15m
      - alert: AethercertAgentsOffline
        expr: aethercert_agents_total{status="offline"} > 0
        for: 30m

For event-driven alerting rather than polling, use the push integrations instead.

Auf dieser Seite