Event Source Reference
Event Sources
Traffic Events
When network traffic transits through your endpoints, like HTTP requests or TCP connections, ngrok emits protocol-specific Traffic Events. Because Traffic Events are often high cardinality, they support the ability to select which fields to capture as well as the ability to specify a CEL filter expression to limit which events are captured.
Event | Description |
---|---|
http_request_complete.v0 | Triggers when an HTTP request completes. |
tcp_connection_closed.v0 | Triggers when a TCP connection to an endpoint closes. |
Audit Events
When you make configuration changes to your account ngrok emits Audit Events. These events can help you get visibility into when objects like Domains, API Keys, and IP Policies are created, updated, or deleted within your ngrok account.
Event | Description |
---|---|
agent_session_start.v0 | Triggers when an agent is started |
agent_session_stop.v0 | Triggers when an agent is stopped |
api_key_created.v0 | Triggers when an API key is created |
api_key_deleted.v0 | Triggers when an API key is deleted |
api_key_updated.v0 | Triggers when an API key is updated |
certificate_authority_created.v0 | Triggers when a certificate authority is created |
certificate_authority_deleted.v0 | Triggers when a certificate authority is deleted |
certificate_authority_updated.v0 | Triggers when a certificate authority is updated |
domain_created.v0 | Triggers when a domain is created |
domain_deleted.v0 | Triggers when a domain is deleted |
domain_updated.v0 | Triggers when a domain is updated |
event_destination_created.v0 | Triggers when an Event Destination is created |
event_destination_deleted.v0 | Triggers when an Event Destination is deleted |
event_destination_updated.v0 | Triggers when an Event Destination is updated |
event_subscription_created.v0 | Triggers when an Event Subscription is created |
event_subscription_deleted.v0 | Triggers when an Event Subscription is deleted |
event_subscription_updated.v0 | Triggers when an Event Subscription is updated |
ip_policy_created.v0 | Triggers when an IP Policy is created. |
ip_policy_deleted.v0 | Triggers when an IP Policy is deleted. |
ip_policy_updated.v0 | Triggers when an IP Policy is updated. |
ip_policy_rule_created.v0 | Triggers when an IP Policy Rule is created. |
ip_policy_rule_deleted.v0 | Triggers when an IP Policy Rule is deleted. |
ip_policy_rule_updated.v0 | Triggers when an IP Policy Rule is updated. |
ip_restriction_created.v0 | Triggers when an IP Restriction is created. |
ip_restriction_deleted.v0 | Triggers when an IP Restriction is deleted. |
ip_restriction_updated.v0 | Triggers when an IP Restriction is updated. |
ssh_certificate_authority_created.v0 | Triggers when an SSH certificate authority is created. |
ssh_certificate_authority_deleted.v0 | Triggers when an SSH certificate authority is deleted. |
ssh_certificate_authority_updated.v0 | Triggers when an SSH certificate authority is updated. |
ssh_host_certificate_created.v0 | Triggers when an SSH host certificate is created. |
ssh_host_certificate_deleted.v0 | Triggers when an SSH host certificate is deleted. |
ssh_host_certificate_updated.v0 | Triggers when an SSH host certificate is updated. |
ssh_public_key_created.v0 | Triggers when an SSH public key is created. |
ssh_public_key_deleted.v0 | Triggers when an SSH public key is deleted. |
ssh_public_key_updated.v0 | Triggers when an SSH public key is updated. |
ssh_user_certificate_created.v0 | Triggers when an SSH user certificate is created. |
ssh_user_certificate_deleted.v0 | Triggers when an SSH user certificate is deleted. |
ssh_user_certificate_updated.v0 | Triggers when an SSH user certificate is updated. |
tcp_address_created.v0 | Triggers when a TCP address is created. |
tcp_address_deleted.v0 | Triggers when a TCP address is deleted. |
tcp_address_updated.v0 | Triggers when a TCP address is updated. |
tls_certificate_created.v0 | Triggers when a TLS certificate is created. |
tls_certificate_deleted.v0 | Triggers when a TLS certificate is deleted. |
tls_certificate_updated.v0 | Triggers when a TLS certificate is updated. |
tunnel_credential_created.v0 | Triggers when a tunnel credential is created. |
tunnel_credential_deleted.v0 | Triggers when a tunnel credential is deleted. |
tunnel_credential_updated.v0 | Triggers when a tunnel credential is updated. |
Traffic Events
HTTP Request Complete
http_request_complete.v0
Triggers when an HTTP request completes.
Field | Type | Description |
---|---|---|
backend.connection_reused | bool | true if ngrok reused a TCP connection to transmit the HTTP request to the upstream service. |
basic_auth.decision | string | allow if the Basic Auth module permitted the request to the upstream service, block if not permitted, and invalid if the module did not run. |
basic_auth.username | string | The username in the HTTP basic auth credentials |
circuit_breaker.decision | string | Whether the HTTP request was sent to the upstream service. allow if the breaker was closed, block if the breaker was open, allow_while_open if the request was allowed while the breaker is open, and invalid if the module did not run. |
compression.algorithm | string | The compression algorithm used to encode responses from the endpoint. Either gzip , deflate , or none . |
compression.bytes_saved | int64 | The difference between the size of the raw response and the size of the response as compressed by the Compression Module |
conn.client_ip | string | Filterable. The source IP of the TCP connection to the ngrok edge |
conn.server_ip | string | Filterable. The IP address of the server that received the request |
conn.server_name | string | Filterable. The hostname associated with this connection. |
conn.server_port | int32 | Filterable. The port that the connection for this request came in on |
conn.start_ts | timestamp | The timestamp when the TCP connection to the ngrok edge is established |
http.request.body_length | int64 | The size of the request body in bytes |
http.request.headers | Map<string, List<string>> | A map of normalized headers from the requesting client. Header keys are capitalized and header values are lowercased. |
http.request.method | string | The request method, normalized to lowercase |
http.request.url.host | string | The host component of the request URL |
http.request.url.path | string | The path component of the request URL |
http.request.url.query | string | The query string component of the request URL |
http.request.url.raw | string | The full URL of the request including scheme, host, path, and query string |
http.request.url.scheme | string | The scheme component of the request URL |
http.request.user_agent | string | The value of the User-Agent header in the request received by ngrok edge |
http.response.body_length | int64 | The size of the response body in bytes |
http.response.headers | Map<string, List<string>> | A map of normalized response headers. Header keys are capitalized and header values are lowercased. |
http.response.status_code | int32 | The status code of the response returned by the ngrok edge |
ip_policy.decision | string | allow if IP Policy module permitted the request to the upstream service, block if not permitted, and invalid if the module did not run. |
oauth.app_client_id | string | The OAuth application client ID |
oauth.decision | string | allow if the OAuth module permitted the request to the upstream service, block if not permitted, and invalid if the module did not run. |
oauth.user.id | string | The authenticated user’s ID returned by the OAuth provider |
oauth.user.name | string | The authenticated user’s name returned by the OAuth provider |
tls.cipher_suite | string | The cipher suite selected during the TLS handshake |
tls.client_cert.serial_number | string | The serial number of the client’s leaf TLS certificate in the Mutual TLS handshake |
tls.client_cert.subject.cn | string | The subject common name of the client’s leaf TLS certificate in the Mutual TLS handshake |
tls.version | string | The version of the TLS protocol used between the client and the ngrok edge |
traffic_policy.logs | List<Map<string, any>> | The collection of logs generated by any configured Traffic Policy Log actions |
webhook_verification.decision | string | allow if the Webhook Verification module permitted the request to the upstream service, block if not permitted, and invalid if the module did not run. |
TCP Connection Closed
tcp_connection_closed.v0
Triggers when a TCP connection to an endpoint closes.
Field | Type | Description |
---|---|---|
conn.bytes_in | int64 | The number of bytes arriving at an endpoint from the frontend |
conn.bytes_out | int64 | The number of bytes leaving an endpoint to the frontend |
conn.client_ip | string | Filterable. The source IP of the TCP connection to the ngrok edge |
conn.end_ts | timestamp | The timestamp when the TCP connection to the ngrok edge is closed |
conn.server_ip | string | Filterable. The IP address of the server that received the request |
conn.server_name | string | Filterable. The hostname associated with this connection. |
conn.server_port | int32 | Filterable. The port that the connection for this request came in on |
conn.start_ts | timestamp | The timestamp when the TCP connection to the ngrok edge is established |
ip_policy.decision | string | allow if IP Policy module permitted the request to the upstream service, block if not permitted, and invalid if the module did not run or if the TCP connection was established for an HTTP endpoint. In the latter case, the decision will only be available in the corresponding http_request_complete.v0 event. |
traffic_policy.logs | List<Map<string, any>> | The collection of logs generated by any configured Traffic Policy Log actions |
Audit Events
Agent
agent_session_start.v0
Triggers when an agent is started
Field | Type | Description |
---|---|---|
session.id | string | a resource identifier |
session.uri | string | a uri for locating a resource |
credential.id | string | a resource identifier |
credential.uri | string | a uri for locating a resource |
agent_ip | string | the ip address from which the agent is connecting |
ingress_server_ip | string | the ip address of the ingress server to which the agent is connecting |
region | string | the region of the tunnel server |
ingress_hostname | string | the hostname of the tunnel server |
user_agent | string | the user agent provided to the tunnel server by the agent |
metadata | string | the session metadata provided by the agent on connection |
os | string | the operating system of the machine on which the agent is running |
arch | string | the CPU architecture of the machine on which the agent is running |
transport | string | the transport protocol used internally by the agent "muxado" for agents and agent libraries, "ssh" for reverse SSH tunnels |
started_at | string | the time at which the session started |
expires_at | string | the time at which the session expires |
stopped_at | string | the time at which the session stopped |
deprecated.upcoming_minimum_version | string | the upcoming minimum supported agent version |
deprecated.upcoming_enforcement_date | string | the date by which the current agent must be upgraded to the upcoming minimum version |
deprecated.message | string | additional information about the agent deprecation |
error | string | on a failed session start, an explanation of the failure on a successful session start, the empty string on a session stop, the reason for the session stop |
agent_session_stop.v0
Triggers when an agent is stopped
Field | Type | Description |
---|---|---|
session.id | string | a resource identifier |
session.uri | string | a uri for locating a resource |
credential.id | string | a resource identifier |
credential.uri | string | a uri for locating a resource |
agent_ip | string | the ip address from which the agent is connecting |
ingress_server_ip | string | the ip address of the ingress server to which the agent is connecting |
region | string | the region of the tunnel server |
ingress_hostname | string | the hostname of the tunnel server |
user_agent | string | the user agent provided to the tunnel server by the agent |
metadata | string | the session metadata provided by the agent on connection |
os | string | the operating system of the machine on which the agent is running |
arch | string | the CPU architecture of the machine on which the agent is running |
transport | string | the transport protocol used internally by the agent "muxado" for agents and agent libraries, "ssh" for reverse SSH tunnels |
started_at | string | the time at which the session started |
expires_at | string | the time at which the session expires |
stopped_at | string | the time at which the session stopped |
deprecated.upcoming_minimum_version | string | the upcoming minimum supported agent version |
deprecated.upcoming_enforcement_date | string | the date by which the current agent must be upgraded to the upcoming minimum version |
deprecated.message | string | additional information about the agent deprecation |
error | string | on a failed session start, an explanation of the failure on a successful session start, the empty string on a session stop, the reason for the session stop |
API Key
api_key_created.v0
Triggers when an API key is created
Field | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this API key |
description | string | human-readable description of what uses the API key to authenticate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined data of this API key. optional, max 4096 bytes |
created_at | string | timestamp when the api key was created, RFC 3339 format |
token | string | the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. This value is only available one time, on the API response from key creation. Otherwise it is null. |
api_key_deleted.v0
Triggers when an API key is deleted
Field | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this API key |
description | string | human-readable description of what uses the API key to authenticate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined data of this API key. optional, max 4096 bytes |
created_at | string | timestamp when the api key was created, RFC 3339 format |
token | string | the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. This value is only available one time, on the API response from key creation. Otherwise it is null. |
api_key_updated.v0
Triggers when an API key is updated
Field | Type | Description |
---|---|---|
id | string | unique API key resource identifier |
uri | string | URI to the API resource of this API key |
description | string | human-readable description of what uses the API key to authenticate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined data of this API key. optional, max 4096 bytes |
created_at | string | timestamp when the api key was created, RFC 3339 format |
token | string | the bearer token that can be placed into the Authorization header to authenticate request to the ngrok API. This value is only available one time, on the API response from key creation. Otherwise it is null. |
Certificate Authority
certificate_authority_created.v0
Triggers when a certificate authority is created
Field | Type | Description |
---|---|---|
id | string | unique identifier for this Certificate Authority |
uri | string | URI of the Certificate Authority API resource |
created_at | string | timestamp when the Certificate Authority was created, RFC 3339 format |
description | string | human-readable description of this Certificate Authority. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this Certificate Authority. optional, max 4096 bytes. |
ca_pem | string | raw PEM of the Certificate Authority |
subject_common_name | string | subject common name of the Certificate Authority |
not_before | string | timestamp when this Certificate Authority becomes valid, RFC 3339 format |
not_after | string | timestamp when this Certificate Authority becomes invalid, RFC 3339 format |
key_usages | List<string> | set of actions the private key of this Certificate Authority can be used for |
extended_key_usages | List<string> | extended set of actions the private key of this Certificate Authority can be used for |