Monitoring

Monitoring in this project is designed to help you keep track of the system's performance and health. It allows you to observe various metrics and logs to ensure that everything is running smoothly and manage currently connected tunnels, links and clients.

Monitoring can be done through an api endpoint or through CLI commands. This section explains CLI commands.

Configuration

Before you can run the monitoring commands, you need to ensure that the server is properly configured. Ensure that the appropriate authentication method is configured to allow access to the monitoring commands. You can set the monitor_key in the tunnelize.json.

{
 "tunnel": {
    "monitor_key": "secretkey"
  }
}

Running commands

Once the monitoring key is set for your tunnel, you can run the following monitoring commands:

CommandDescriptionExample
tunnelize monitor system-infoRetrieves system information including CPU usage, memory, and uptimetunnelize monitor system-info
tunnelize monitor list-endpointsLists all configured endpoints on the servertunnelize monitor list-endpoints
tunnelize monitor list-tunnelsLists all active tunnelstunnelize monitor list-tunnels
tunnelize monitor get-tunnel tunnel_idRetrieves information about a specific tunnel by IDtunnelize monitor get-tunnel 123e4567-e89b-12d3-a456-426614174000
tunnelize monitor disconnect-tunnel tunnel_idDisconnects a specific tunnel by IDtunnelize monitor disconnect-tunnel 123e4567-e89b-12d3-a456-426614174001
tunnelize monitor list-clientsLists all connected clientstunnelize monitor list-clients
tunnelize monitor get-client client_idRetrieves information about a specific client by IDtunnelize monitor get-client 123e4567-e89b-12d3-a456-426614174002
tunnelize monitor list-linksLists all active linkstunnelize monitor list-links
tunnelize monitor get-link link_idRetrieves information about a specific link by IDtunnelize monitor get-link 123e4567-e89b-12d3-a456-426614174003
tunnelize monitor disconnect-link link_idDisconnects a specific link by IDtunnelize monitor disconnect-link 123e4567-e89b-12d3-a456-426614174004

Note that response from all of the commands is JSON meaning it can be piped for further processing.