network_flow_logs
Creates, updates, deletes, gets or lists a network_flow_logs resource.
Overview​
| Name | network_flow_logs |
| Type | Resource |
| Id | railway.observability.network_flow_logs |
Fields​
The following fields are returned by SELECT queries:
- list
One row per NetworkFlowLog. A single network flow log entry.
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | The deployment ID |
deployment_instance_id | string | The deployment instance ID |
flow_id | string | Unique identifier for the flow |
peer_service_id | string | Service instance ID of the peer (for service-to-service flows) |
service_id | string | The service ID this flow belongs to |
byte_count | integer | Number of bytes transferred |
capture_end | string | When the flow capture ended (ISO timestamp) |
capture_start | string | When the flow capture started (ISO timestamp) |
direction | string | Traffic direction (ingress or egress) (egress, ingress) |
drop_cause | string | If packets were dropped, the reason |
dst_addr | string | Destination IP address |
dst_port | integer | Destination port number |
flow_state | string | Whether the flow is partial or complete (complete, partial) |
l4_latency_ms | number | Layer 4 latency in milliseconds |
l4_protocol | string | Layer 4 protocol (TCP, UDP, ICMP, etc) (icmp, icmpv6, tcp, udp, unknown) |
packet_count | integer | Number of packets transferred |
peer_kind | string | Type of peer (service, internet, DNS, etc) (edge_proxy, internet, local_dns, service, unknown) |
src_addr | string | Source IP address |
src_port | integer | Source port number |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | environment_id | after_date, after_limit, anchor_date, before_date, before_limit, deployment_instance_id, filter, service_id | Fetch individual network flow logs for an environment. Backed by the Railway GraphQL query networkFlowLogs. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
after_date | string | Latest date to look for logs after the anchor. |
after_limit | integer | Limit logs returned after the anchor. |
anchor_date | string | Target date time to look for logs. |
before_date | string | Oldest date to look for logs before the anchor. |
before_limit | integer | Limit logs returned before the anchor. |
deployment_instance_id | string | Filter by deployment instance / sandbox ID (optional). |
filter | string | Filter expression (e.g., @protocol:tcp @direction:egress @dropped:true). |
service_id | string | Filter by service ID (optional). |
SELECT examples​
- list
Fetch individual network flow logs for an environment. Backed by the Railway GraphQL query networkFlowLogs.
SELECT
deployment_id,
deployment_instance_id,
flow_id,
peer_service_id,
service_id,
byte_count,
capture_end,
capture_start,
direction,
drop_cause,
dst_addr,
dst_port,
flow_state,
l4_latency_ms,
l4_protocol,
packet_count,
peer_kind,
src_addr,
src_port
FROM railway.observability.network_flow_logs
WHERE environment_id = '{{ environment_id }}' -- required
AND after_date = '{{ after_date }}'
AND after_limit = '{{ after_limit }}'
AND anchor_date = '{{ anchor_date }}'
AND before_date = '{{ before_date }}'
AND before_limit = '{{ before_limit }}'
AND deployment_instance_id = '{{ deployment_instance_id }}'
AND filter = '{{ filter }}'
AND service_id = '{{ service_id }}'
;