Skip to content

NS8 Metrics: forward alerts to my.nethesis.it #8042

Description

@edospadoni

What changed

Enterprise (nsent) NS8 clusters now forward their alerts to my.nethesis.it. The alert-proxy posts Alertmanager alerts to the credential-translation proxy https://my.nethesis.it/proxy/alerts using the subscription credentials (system_id / auth_token); the proxy maps them to the my credentials and ingests them into Mimir. It is automatic for enterprise subscriptions — no manual configuration.

How to test

Prerequisite: an enterprise cluster with a valid my.nethesis.it subscription (system registered/mapped on my).

  1. Update the Metrics module to the testing version:
    api-cli run update-module --data '{"module_url":"ghcr.io/nethserver/metrics:1.3.0-dev.1","instances":["metrics1"]}'
    
  2. Check the forwarding config was written:
    runagent -m metrics1 grep MIMIR state/alert-proxy.env
    
    Expected: MIMIR_URL=https://my.nethesis.it/proxy/alerts and MIMIR_AUTH_USER=<your system_id>.
  3. Generate an alert — a real condition (e.g. disk usage > 80%) or inject a test one into the local alert-proxy (current timestamps):
    echo '{"alerts":[{"status":"firing","labels":{"alertname":"TestAlert","severity":"warning","node":"1"},"annotations":{"summary":"test"},"startsAt":"'$(date -u +%FT%TZ)'","endsAt":"'$(date -u -d "+1 hour" +%FT%TZ)'"}]}' | runagent -m metrics1 curl -s --data-binary @- http://127.0.0.1:9095
    
  4. Confirm the alert appears on my.nethesis.it (https://qa.my.nethesis.it/alerts) in the system's Alerts page.

Released in ns8-metrics Testing 1.3.0-dev.1 (NethServer/ns8-metrics#71).

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully
    No fields configured for Feature.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions