Baza wiedzy

Appliance administration · zaktualizowano 14 września 2021 · zweryfikowano 9 lipca 2026

Włączanie metryk z serwera Notakey Authentication

Udostępnij metryki Prometheus z appliance przez wtyczkę stats-agent, opcjonalnie za adresem VRRP.

Najnowsze wersje naszego serwera Authentication udostępniają różne metryki operacyjne, które pozwalają monitorować użycie usługi i tworzyć alerty o anomaliach. Metryki są w formacie Prometheus i dostępne bezpośrednio z węzła Notakey Appliance.

Statystyki agreguje wtyczka stats-agent, którą trzeba skonfigurować na jednym lub kilku węzłach. Możliwa jest też konfiguracja z adresem VRRP dla metryk.

# minimal plugin configuration

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

Uruchom ntk plugins update, aby zaktualizować obrazy kontenerów wszystkich wtyczek, a następnie ntk plugins restart.

Po skonfigurowaniu agenta musisz włączyć statystyki na serwerze Authentication:

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

Od tej chwili metryki z serwera Authentication będą dostępne pod adresem http://<internal-ip>:9394/metrics.

Kilka metryk, które warto śledzić:

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

Aby skonfigurować wtyczkę stats-agent do korzystania z adresu IP VRRP, użyj następujących poleceń:

# 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

Po skonfigurowaniu VRRP nakaż serwerowi uwierzytelniania publikowanie statystyk na adresie IP VRRP, ustawiając STATS_HOST=10.0.1.97 i uruchamiając ponownie usługę (ntk as restart).

← Powrót do pomocy

Pierwsze logowanie bez hasła jeszcze w tym tygodniu

30 minut rozmowy z inżynierem, a nie prezentacja handlowa. Wspólnie zaplanujemy, jak uruchomić działający projekt pilotażowy w Państwa środowisku VPN, SSO lub Windows.