Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Added] account specific monitoring endpoint(s) #3250

Merged
merged 3 commits into from
Jul 12, 2022
Merged

Commits on Jul 12, 2022

  1. [Added] account specific monitoring endpoint(s)

    Added account specific statz endpoint to the system account
    $SYS.REQ.ACCOUNT.*.STATZ
    Each server will respond with connection statistics for the requested
    account. The format of the data section is identical to the event
    $SYS.ACCOUNT.%s.SERVER.CONNS which is sent periodically as well as on
    connect/disconnect.
    
    A PING endpoint exists as well. There each server will respond with one
    message per (requested) account. The response format is identical to
    $SYS.REQ.ACCOUNT.*.STATZ
    In addition to general filter options
    the request takes a list of accounts and an argument to include accounts
    without local connections (disabled by default)
    $SYS.REQ.ACCOUNT.PING.STATZ
    
    Each account has a new system account import where the local subject
    $SYS.REQ.ACCOUNT.PING.STATZ essentially responds as if
    the importing account name was used for SYS.REQ.ACCOUNT.*.STATZ
    
    The only difference between requesting ACCOUNT.PING.STATZ from within
    the system account and an account is that the later can only retrieve
    statz for the local account.
    
    Furthermore added http monitoring endpoint /accstatz
    It responds with a list of statz for all accounts with local connections
    the argument "unused=1" can be provided to get statz for all accounts
    This endpoint is also exposed as nats request under:
    $SYS.REQ.SERVER.*.ACC_STATZ
    $SYS.REQ.SERVER.PING.ACC_STATZ
    
    Also exposed the monitoring /healthz via the system account under
    $SYS.REQ.SERVER.*.HEALTHZ
    $SYS.REQ.SERVER.PING.HEALTHZ
    No dedicated options are available for these.
    
    ACC_STATZ and HEALTHZ also accept general filter options.
    
    Signed-off-by: Matthias Hanel <mh@synadia.com>
    matthiashanel committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    bac4941 View commit details
    Browse the repository at this point in the history
  2. Move to one message per server

    Signed-off-by: Matthias Hanel <mh@synadia.com>
    matthiashanel committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    58171a8 View commit details
    Browse the repository at this point in the history
  3. Review comments

    Signed-off-by: Matthias Hanel <mh@synadia.com>
    matthiashanel committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    0b50828 View commit details
    Browse the repository at this point in the history