Base di conoscenza

Appliance administration · aggiornato il 14 settembre 2021 · verificato il 9 luglio 2026

Attivare le metriche dal server Notakey Authentication

Esponete le metriche Prometheus dell'appliance tramite il plugin stats-agent, eventualmente dietro un indirizzo VRRP.

Le versioni più recenti del nostro server Authentication forniscono diverse metriche operative che consentono di monitorare l’utilizzo del servizio e di creare avvisi in caso di anomalie. Le metriche sono in formato Prometheus e disponibili direttamente dal nodo Notakey Appliance.

Le statistiche sono aggregate dal plugin stats-agent, che va configurato su uno o più nodi. È possibile anche una configurazione con un indirizzo VRRP per le metriche.

# minimal plugin configuration

ntk cfg set :plugins.\"stats-agent\" '{
   "ports": [
      "9394:9394"
    ],
    "tag": "statsagent"
  }' --json-input

Eseguite ntk plugins update per aggiornare le immagini dei container di tutti i plugin, seguito da ntk plugins restart.

Una volta configurato l’agent, dovete attivare le statistiche sul server Authentication:

ntk cfg set :nas.custom_params "ENABLE_STATS=1,STATS_HOST=stats-agent"
ntk as restart

Ora le metriche del server Authentication saranno accessibili su http://<internal-ip>:9394/metrics.

Alcune metriche da misurare:

ntk_as_auth_requests_created: Number of created auth requests per service
ntk_as_auth_requests_failed: Number of failed creations of auth requests
ntk_as_auth_requests_signed: Number of signing events for auth requests per service
ntk_as_api_auth_success_total: Number of successful API client authentication requests
ntk_as_api_auth_failures_total: Number of failed API client authentication requests
ntk_as_api_token_auth_fail_total: Token auth validation requests that failed
ntk_as_api_tokens_emitted_total: Number of issued authentication tokens
ntk_as_seats_issued_total: Total number of issued licensed seats
ntk_as_seats_total: Total number of available licensed seats
ntk_as_seat_destroy_count: Number of license seat removal events
ntk_as_seat_create_count: Number of license seat create events
ntk_as_http_duration_seconds_count: Request count of HTTP reqs, per endpoint
ntk_as_http_duration_seconds_sum: Time spent in HTTP reqs in seconds, per endpoint

Per configurare il plugin stats-agent affinché utilizzi un indirizzo IP VRRP, usate i comandi seguenti:

# VRRP service must be configured on every node running stats-agent

# 172.17.0.1 is the default internal bridge IP address, available on every node
ntk cfg set vrrp.track.generic.url 'http://172.17.0.1:9394/metrics'

# Adjust IP address and select different priorities for each node
ntk cfg set vrrp.services.stats  '{
      "prio": "100",
      "vrid": "54",
      "interface": "eth0",
      "address": "10.0.1.97",
      "preempt": "off",
      "track": [
        "generic"
      ]
    }' --json-input

# Any VRRP config changes require restart
ntk vrrp restart

Dopo la configurazione di VRRP, indicate al server di autenticazione di pubblicare le statistiche sull’IP VRRP impostando STATS_HOST=10.0.1.97 e riavviando il servizio (ntk as restart).

← Torna all’assistenza

Il vostro primo accesso senza password, già questa settimana

30 minuti con un ingegnere, non una presentazione commerciale. Insieme pianificheremo come avviare un progetto pilota funzionante nel vostro ambiente VPN, SSO o Windows.