Back to Cilium

Protocol Documentation

api/v1/flow/README.md

1.19.347.6 KB
Original Source

Protocol Documentation

<a name="top"></a>

Table of Contents

<a name="flow_flow-proto"></a>

<p align="right"><a href="#top">Top</a></p>

flow/flow.proto

<a name="flow-AgentEvent"></a>

AgentEvent

FieldTypeLabelDescription
typeAgentEventType
unknownAgentEventUnknown
agent_startTimeNotification
policy_updatePolicyUpdateNotificationused for POLICY_UPDATED and POLICY_DELETED
endpoint_regenerateEndpointRegenNotificationused for ENDPOINT_REGENERATE_SUCCESS and ENDPOINT_REGENERATE_FAILURE
endpoint_updateEndpointUpdateNotificationused for ENDPOINT_CREATED and ENDPOINT_DELETED
ipcache_updateIPCacheNotificationused for IPCACHE_UPSERTED and IPCACHE_DELETED
service_upsertServiceUpsertNotificationDeprecated.
service_deleteServiceDeleteNotificationDeprecated.

<a name="flow-AgentEventUnknown"></a>

AgentEventUnknown

FieldTypeLabelDescription
typestring
notificationstring

<a name="flow-Aggregate"></a>

Aggregate

Aggregate contains flow aggregation counters

FieldTypeLabelDescription
ingress_flow_countuint32ingress_flow_count is the count of flows in the ingress direction
egress_flow_countuint32egress_flow_count is the count of flows in the egress direction
unknown_direction_flow_countuint32unknown_direction_flow_count is the count of flows with unknown traffic direction

<a name="flow-CiliumEventType"></a>

CiliumEventType

CiliumEventType from which the flow originated.

FieldTypeLabelDescription
typeint32type of event the flow originated from, i.e. github.com/cilium/cilium/pkg/monitor/api.MessageType*
sub_typeint32sub_type may indicate more details depending on type, e.g. - github.com/cilium/cilium/pkg/monitor/api.Trace* - github.com/cilium/cilium/pkg/monitor/api.Drop* - github.com/cilium/cilium/pkg/monitor/api.DbgCapture*

<a name="flow-DNS"></a>

DNS

DNS flow. This is basically directly mapped from Cilium's LogRecordDNS:

FieldTypeLabelDescription
querystringDNS name that's being looked up: e.g. "isovalent.com."
ipsstringrepeatedList of IP addresses in the DNS response.
ttluint32TTL in the DNS response.
cnamesstringrepeatedList of CNames in the DNS response.
observation_sourcestringCorresponds to DNSDataSource defined in: https://github.com/cilium/cilium/blob/04f3889d627774f79e56d14ddbc165b3169e2d01/pkg/proxy/accesslog/record.go#L253
rcodeuint32Return code of the DNS request defined in: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
qtypesstringrepeatedString representation of qtypes defined in: https://tools.ietf.org/html/rfc1035#section-3.2.3
rrtypesstringrepeatedString representation of rrtypes defined in: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4

<a name="flow-DebugEvent"></a>

DebugEvent

FieldTypeLabelDescription
typeDebugEventType
sourceEndpoint
hashgoogle.protobuf.UInt32Value
arg1google.protobuf.UInt32Value
arg2google.protobuf.UInt32Value
arg3google.protobuf.UInt32Value
messagestring
cpugoogle.protobuf.Int32Value

<a name="flow-Emitter"></a>

Emitter

Emitter identifies the source that emits a Hubble flow.

FieldTypeLabelDescription
namestringname identifies the emitter. The name should be capitalized ("Hubble", not "hubble" nor "HUBBLE").
versionstringversion identifiers the emitter version. The version should not contain a 'v' prefix as sometimes seen ("1.19.0", not "v1.19.0").

<a name="flow-Endpoint"></a>

Endpoint

FieldTypeLabelDescription
IDuint32
identityuint32
cluster_namestring
namespacestring
labelsstringrepeatedlabels in foo=bar format.
pod_namestring
workloadsWorkloadrepeated

<a name="flow-EndpointRegenNotification"></a>

EndpointRegenNotification

FieldTypeLabelDescription
iduint64
labelsstringrepeated
errorstring

<a name="flow-EndpointUpdateNotification"></a>

EndpointUpdateNotification

FieldTypeLabelDescription
iduint64
labelsstringrepeated
errorstring
pod_namestring
namespacestring

<a name="flow-Ethernet"></a>

Ethernet

FieldTypeLabelDescription
sourcestring
destinationstring

<a name="flow-EventTypeFilter"></a>

EventTypeFilter

EventTypeFilter is a filter describing a particular event type.

FieldTypeLabelDescription
typeint32type is the primary flow type as defined by: github.com/cilium/cilium/pkg/monitor/api.MessageType*
match_sub_typeboolmatch_sub_type is set to true when matching on the sub_type should be done. This flag is required as 0 is a valid sub_type.
sub_typeint32sub_type is the secondary type, e.g. - github.com/cilium/cilium/pkg/monitor/api.Trace*

<a name="flow-FileInfo"></a>

FileInfo

FieldTypeLabelDescription
namestring
lineuint32

<a name="flow-Flow"></a>

Flow

FieldTypeLabelDescription
timegoogle.protobuf.Timestamp
uuidstringuuid is a universally unique identifier for this flow.
emitterEmitteremitter identifies the source that emitted the flow.
verdictVerdict
drop_reasonuint32Deprecated. only applicable to Verdict = DROPPED. deprecated in favor of drop_reason_desc.
auth_typeAuthTypeauth_type is the authentication type specified for the flow in Cilium Network Policy. Only set on policy verdict events.
ethernetEthernetl2
IPIPl3
l4Layer4l4
tunnelTunnel
sourceEndpoint
destinationEndpoint
TypeFlowType
node_namestringNodeName is the name of the node from which this Flow was captured.
node_labelsstringrepeatednode labels in foo=bar format.
source_namesstringrepeatedall names the source IP can have.
destination_namesstringrepeatedall names the destination IP can have.
l7Layer7L7 information. This field is set if and only if FlowType is L7.
replyboolDeprecated. Deprecated. This suffers from false negatives due to protobuf not being able to distinguish between the value being false or it being absent. Please use is_reply instead.
event_typeCiliumEventTypeEventType of the originating Cilium event
source_serviceServicesource_service contains the service name of the source
destination_serviceServicedestination_service contains the service name of the destination
traffic_directionTrafficDirectiontraffic_direction of the connection, e.g. ingress or egress
policy_match_typeuint32policy_match_type is only applicable to the cilium event type PolicyVerdict https://github.com/cilium/cilium/blob/e831859b5cc336c6d964a6d35bbd34d1840e21b9/pkg/monitor/datapath_policy.go#L50
trace_observation_pointTraceObservationPointOnly applicable to cilium trace notifications, blank for other types.
trace_reasonTraceReasonCilium datapath trace reason info.
fileFileInfoCilium datapath filename and line number. Currently only applicable when Verdict = DROPPED.
ip_trace_idIPTraceIDIPTraceID relates to the trace ID in the IP options of a packet.
drop_reason_descDropReasononly applicable to Verdict = DROPPED.
is_replygoogle.protobuf.BoolValueis_reply indicates that this was a packet (L4) or message (L7) in the reply direction. May be absent (in which case it is unknown whether it is a reply or not).
debug_capture_pointDebugCapturePointOnly applicable to cilium debug capture events, blank for other types
interfaceNetworkInterfaceinterface is the network interface on which this flow was observed
proxy_portuint32proxy_port indicates the port of the proxy to which the flow was forwarded
trace_contextTraceContexttrace_context contains information about a trace related to the flow, if any.
sock_xlate_pointSocketTranslationPointsock_xlate_point is the socket translation point. Only applicable to TraceSock notifications, blank for other types
socket_cookieuint64socket_cookie is the Linux kernel socket cookie for this flow. Only applicable to TraceSock notifications, zero for other types
cgroup_iduint64cgroup_id of the process which emitted this event. Only applicable to TraceSock notifications, zero for other types
SummarystringDeprecated. This is a temporary workaround to support summary field for pb.Flow without duplicating logic from the old parser. This field will be removed once we fully migrate to the new parser.
extensionsgoogle.protobuf.Anyextensions can be used to add arbitrary additional metadata to flows. This can be used to extend functionality for other Hubble compatible APIs, or experiment with new functionality without needing to change the public API.
egress_allowed_byPolicyrepeatedThe CiliumNetworkPolicies allowing the egress of the flow.
ingress_allowed_byPolicyrepeatedThe CiliumNetworkPolicies allowing the ingress of the flow.
egress_denied_byPolicyrepeatedThe CiliumNetworkPolicies denying the egress of the flow.
ingress_denied_byPolicyrepeatedThe CiliumNetworkPolicies denying the ingress of the flow.
policy_logstringrepeatedThe set of Log values for policies that matched this flow. If no matched policies have an explicit log value configured, this list is empty. Duplicate values are elided; each entry is unique.
aggregateAggregateAggregate contains flow aggregation counters when flow aggregation is enabled. This field is only populated for aggregated flows.

<a name="flow-FlowFilter"></a>

FlowFilter

FlowFilter represent an individual flow filter. All fields are optional. If multiple fields are set, then all fields must match for the filter to match.

FieldTypeLabelDescription
uuidstringrepeateduuid filters by a list of flow uuids.
source_ipstringrepeatedsource_ip filters by a list of source ips. Each of the source ips can be specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. "1.1.1.0/24").
source_ip_xlatedstringrepeatedsource_ip_xlated filters by a list IPs. Each of the IPs can be specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. "1.1.1.0/24").
source_podstringrepeatedsource_pod filters by a list of source pod name prefixes, optionally within a given namespace (e.g. "xwing", "kube-system/coredns-"). The pod name can be omitted to only filter by namespace (e.g. "kube-system/") or the namespace can be omitted to filter for pods in any namespace (e.g. "/xwing")
source_fqdnstringrepeatedsource_fqdn filters by a list of source fully qualified domain names
source_labelstringrepeatedsource_labels filters on a list of source label selectors. Selectors support the full Kubernetes label selector syntax.
source_servicestringrepeatedsource_service filters on a list of source service names. This field supports the same syntax as the source_pod field.
source_workloadWorkloadrepeatedsource_workload filters by a list of source workload.
source_cluster_namestringrepeatedsource_cluster_name filters by a list of source cluster names.
destination_ipstringrepeateddestination_ip filters by a list of destination ips. Each of the destination ips can be specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. "1.1.1.0/24").
destination_podstringrepeateddestination_pod filters by a list of destination pod names
destination_fqdnstringrepeateddestination_fqdn filters by a list of destination fully qualified domain names
destination_labelstringrepeateddestination_label filters on a list of destination label selectors
destination_servicestringrepeateddestination_service filters on a list of destination service names
destination_workloadWorkloadrepeateddestination_workload filters by a list of destination workload.
destination_cluster_namestringrepeateddestination_cluster_name filters by a list of destination cluster names.
traffic_directionTrafficDirectionrepeatedtraffic_direction filters flow by direction of the connection, e.g. ingress or egress.
verdictVerdictrepeatedonly return Flows that were classified with a particular verdict.
drop_reason_descDropReasonrepeatedonly applicable to Verdict = DROPPED (e.g. "POLICY_DENIED", "UNSUPPORTED_L3_PROTOCOL")
interfaceNetworkInterfacerepeatedinterface is the network interface on which this flow was observed.
event_typeEventTypeFilterrepeatedevent_type is the list of event types to filter on
http_status_codestringrepeatedhttp_status_code is a list of string prefixes (e.g. "4+", "404", "5+") to filter on the HTTP status code
protocolstringrepeatedprotocol filters flows by L4 or L7 protocol, e.g. (e.g. "tcp", "http")
source_portstringrepeatedsource_port filters flows by L4 source port
destination_portstringrepeateddestination_port filters flows by L4 destination port
replyboolrepeatedreply filters flows based on the direction of the flow.
dns_querystringrepeateddns_query filters L7 DNS flows by query patterns (RE2 regex), e.g. 'kube.*local'.
source_identityuint32repeatedsource_identity filters by the security identity of the source endpoint.
destination_identityuint32repeateddestination_identity filters by the security identity of the destination endpoint.
http_methodstringrepeatedGET, POST, PUT, etc. methods. This type of field is well suited for an enum but every single existing place is using a string already.
http_pathstringrepeatedhttp_path is a list of regular expressions to filter on the HTTP path.
http_urlstringrepeatedhttp_url is a list of regular expressions to filter on the HTTP URL.
http_headerHTTPHeaderrepeatedhttp_header is a list of key:value pairs to filter on the HTTP headers.
tcp_flagsTCPFlagsrepeatedtcp_flags filters flows based on TCP header flags
node_namestringrepeatednode_name is a list of patterns to filter on the node name, e.g. "k8s*", "test-cluster/*.domain.com", "cluster-name/" etc.
node_labelsstringrepeatednode_labels filters on a list of node label selectors. Selectors support the full Kubernetes label selector syntax.
ip_versionIPVersionrepeatedfilter based on IP version (ipv4 or ipv6)
trace_idstringrepeatedtrace_id filters flows by trace ID
ip_trace_iduint64repeatedip_trace_id filters flows by IPTraceID
encryptedboolrepeatedencrypted filters flows based on encryption status (WireGuard/IPsec). When set to true, only encrypted flows are returned. When set to false, only unencrypted flows are returned.
experimentalFlowFilter.Experimentalexperimental contains filters that are not stable yet. Support for experimental features is always optional and subject to change.

<a name="flow-FlowFilter-Experimental"></a>

FlowFilter.Experimental

Experimental contains filters that are not stable yet. Support for experimental features is always optional and subject to change.

FieldTypeLabelDescription
cel_expressionstringrepeatedcel_expression takes a common expression language (CEL) expression returning a boolean to determine if the filter matched or not. You can use the _flow variable to access fields on the flow using the flow.Flow protobuf field names. See https://github.com/google/cel-spec/blob/v0.14.0/doc/intro.md#introduction for more details on CEL and accessing the protobuf fields in CEL. Using CEL has performance cost compared to other filters, so prefer using non-CEL filters when possible, and try to specify CEL filters last in the list of FlowFilters.

<a name="flow-HTTP"></a>

HTTP

L7 information for HTTP flows. It corresponds to Cilium's accesslog.LogRecordHTTP type.

FieldTypeLabelDescription
codeuint32
methodstring
urlstring
protocolstring
headersHTTPHeaderrepeated

<a name="flow-HTTPHeader"></a>

HTTPHeader

FieldTypeLabelDescription
keystring
valuestring

<a name="flow-ICMPv4"></a>

ICMPv4

FieldTypeLabelDescription
typeuint32
codeuint32

<a name="flow-ICMPv6"></a>

ICMPv6

FieldTypeLabelDescription
typeuint32
codeuint32

<a name="flow-IGMP"></a>

IGMP

FieldTypeLabelDescription
typeuint32
group_addressstring

<a name="flow-IP"></a>

IP

FieldTypeLabelDescription
sourcestring
source_xlatedstringsource_xlated is the post-translation source IP when the flow was SNATed. When "source_xlated" is set, the "source" field is populated with the pre-translation source IP address.
destinationstring
ipVersionIPVersion
encryptedboolThis field indicates whether the TraceReasonEncryptMask is set or not. https://github.com/cilium/cilium/blob/ba0ed147bd5bb342f67b1794c2ad13c6e99d5236/pkg/monitor/datapath_trace.go#L27

<a name="flow-IPCacheNotification"></a>

IPCacheNotification

FieldTypeLabelDescription
cidrstring
identityuint32
old_identitygoogle.protobuf.UInt32Value
host_ipstring
old_host_ipstring
encrypt_keyuint32
namespacestring
pod_namestring

<a name="flow-IPTraceID"></a>

IPTraceID

FieldTypeLabelDescription
trace_iduint64
ip_option_typeuint32

<a name="flow-Kafka"></a>

Kafka

L7 information for Kafka flows. It corresponds to Cilium's accesslog.LogRecordKafka type.

FieldTypeLabelDescription
error_codeint32
api_versionint32
api_keystring
correlation_idint32
topicstring

<a name="flow-Layer4"></a>

Layer4

FieldTypeLabelDescription
TCPTCP
UDPUDP
ICMPv4ICMPv4ICMP is technically not L4, but mutually exclusive with the above
ICMPv6ICMPv6
SCTPSCTP
VRRPVRRP
IGMPIGMP

<a name="flow-Layer7"></a>

Layer7

Message for L7 flow, which roughly corresponds to Cilium's accesslog LogRecord:

FieldTypeLabelDescription
typeL7FlowType
latency_nsuint64Latency of the response
dnsDNS
httpHTTP
kafkaKafkaDeprecated.

<a name="flow-LostEvent"></a>

LostEvent

LostEvent is a message which notifies consumers about a loss of events that happened before the events were captured by Hubble.

FieldTypeLabelDescription
sourceLostEventSourcesource is the location where events got lost.
num_events_lostuint64num_events_lost is the number of events that haven been lost at source.
cpugoogle.protobuf.Int32Valuecpu on which the event was lost if the source of lost events is PERF_EVENT_RING_BUFFER.
firstgoogle.protobuf.Timestampfirst is the timestamp of the first event that was lost.
lastgoogle.protobuf.Timestamplast is the timestamp of the last event that was lost.

<a name="flow-NetworkInterface"></a>

NetworkInterface

FieldTypeLabelDescription
indexuint32
namestring

<a name="flow-Policy"></a>

Policy

FieldTypeLabelDescription
namestring
namespacestring
labelsstringrepeated
revisionuint64
kindstring

<a name="flow-PolicyUpdateNotification"></a>

PolicyUpdateNotification

FieldTypeLabelDescription
labelsstringrepeated
revisionuint64
rule_countint64

<a name="flow-SCTP"></a>

SCTP

FieldTypeLabelDescription
source_portuint32
destination_portuint32

<a name="flow-Service"></a>

Service

FieldTypeLabelDescription
namestring
namespacestring

<a name="flow-ServiceDeleteNotification"></a>

ServiceDeleteNotification

FieldTypeLabelDescription
iduint32

<a name="flow-ServiceUpsertNotification"></a>

ServiceUpsertNotification

FieldTypeLabelDescription
iduint32
frontend_addressServiceUpsertNotificationAddr
backend_addressesServiceUpsertNotificationAddrrepeated
typestring
traffic_policystringDeprecated.
namestring
namespacestring
ext_traffic_policystring
int_traffic_policystring

<a name="flow-ServiceUpsertNotificationAddr"></a>

ServiceUpsertNotificationAddr

FieldTypeLabelDescription
ipstring
portuint32

<a name="flow-TCP"></a>

TCP

FieldTypeLabelDescription
source_portuint32
destination_portuint32
flagsTCPFlags

<a name="flow-TCPFlags"></a>

TCPFlags

FieldTypeLabelDescription
FINbool
SYNbool
RSTbool
PSHbool
ACKbool
URGbool
ECEbool
CWRbool
NSbool

<a name="flow-TimeNotification"></a>

TimeNotification

FieldTypeLabelDescription
timegoogle.protobuf.Timestamp

<a name="flow-TraceContext"></a>

TraceContext

TraceContext contains trace context propagation data, i.e. information about a distributed trace. For more information about trace context, check the W3C Trace Context specification.

FieldTypeLabelDescription
parentTraceParentparent identifies the incoming request in a tracing system.

<a name="flow-TraceParent"></a>

TraceParent

TraceParent identifies the incoming request in a tracing system.

FieldTypeLabelDescription
trace_idstringtrace_id is a unique value that identifies a trace. It is a byte array represented as a hex string.

<a name="flow-Tunnel"></a>

Tunnel

FieldTypeLabelDescription
protocolTunnel.Protocol
IPIP
l4Layer4
vniuint32

<a name="flow-UDP"></a>

UDP

FieldTypeLabelDescription
source_portuint32
destination_portuint32

<a name="flow-VRRP"></a>

VRRP

FieldTypeLabelDescription
typeuint32
vriduint32
priorityuint32

<a name="flow-Workload"></a>

Workload

FieldTypeLabelDescription
namestring
kindstring

<a name="flow-AgentEventType"></a>

AgentEventType

AgentEventType is the type of agent event. These values are shared with type AgentNotification in pkg/monitor/api/types.go.

NameNumberDescription
AGENT_EVENT_UNKNOWN0
AGENT_STARTED2
POLICY_UPDATED3
POLICY_DELETED4
ENDPOINT_REGENERATE_SUCCESS5
ENDPOINT_REGENERATE_FAILURE6
ENDPOINT_CREATED7
ENDPOINT_DELETED8
IPCACHE_UPSERTED9
IPCACHE_DELETED10
SERVICE_UPSERTED11
SERVICE_DELETED12

<a name="flow-AuthType"></a>

AuthType

These types correspond to definitions in pkg/policy/l4.go.

NameNumberDescription
DISABLED0
SPIRE1
TEST_ALWAYS_FAIL2

<a name="flow-DebugCapturePoint"></a>

DebugCapturePoint

These values are shared with pkg/monitor/api/datapath_debug.go and bpf/lib/dbg.h.

NameNumberDescription
DBG_CAPTURE_POINT_UNKNOWN0
DBG_CAPTURE_DELIVERY4
DBG_CAPTURE_FROM_LB5
DBG_CAPTURE_AFTER_V466
DBG_CAPTURE_AFTER_V647
DBG_CAPTURE_PROXY_PRE8
DBG_CAPTURE_PROXY_POST9
DBG_CAPTURE_SNAT_PRE10
DBG_CAPTURE_SNAT_POST11

<a name="flow-DebugEventType"></a>

DebugEventType

These values are shared with pkg/monitor/api/datapath_debug.go and bpf/lib/dbg.h.

NameNumberDescription
DBG_EVENT_UNKNOWN0
DBG_GENERIC1
DBG_LOCAL_DELIVERY2
DBG_ENCAP3
DBG_LXC_FOUND4
DBG_POLICY_DENIED5
DBG_CT_LOOKUP6
DBG_CT_LOOKUP_REV7
DBG_CT_MATCH8
DBG_CT_CREATED9
DBG_CT_CREATED210
DBG_ICMP6_HANDLE11
DBG_ICMP6_REQUEST12
DBG_ICMP6_NS13
DBG_ICMP6_TIME_EXCEEDED14
DBG_CT_VERDICT15
DBG_DECAP16
DBG_PORT_MAP17
DBG_ERROR_RET18
DBG_TO_HOST19
DBG_TO_STACK20
DBG_PKT_HASH21
DBG_LB6_LOOKUP_FRONTEND22
DBG_LB6_LOOKUP_FRONTEND_FAIL23
DBG_LB6_LOOKUP_BACKEND_SLOT24
DBG_LB6_LOOKUP_BACKEND_SLOT_SUCCESS25
DBG_LB6_LOOKUP_BACKEND_SLOT_V2_FAIL26
DBG_LB6_LOOKUP_BACKEND_FAIL27
DBG_LB6_REVERSE_NAT_LOOKUP28
DBG_LB6_REVERSE_NAT29
DBG_LB4_LOOKUP_FRONTEND30
DBG_LB4_LOOKUP_FRONTEND_FAIL31
DBG_LB4_LOOKUP_BACKEND_SLOT32
DBG_LB4_LOOKUP_BACKEND_SLOT_SUCCESS33
DBG_LB4_LOOKUP_BACKEND_SLOT_V2_FAIL34
DBG_LB4_LOOKUP_BACKEND_FAIL35
DBG_LB4_REVERSE_NAT_LOOKUP36
DBG_LB4_REVERSE_NAT37
DBG_LB4_LOOPBACK_SNAT38
DBG_LB4_LOOPBACK_SNAT_REV39
DBG_CT_LOOKUP440
DBG_RR_BACKEND_SLOT_SEL41
DBG_REV_PROXY_LOOKUP42
DBG_REV_PROXY_FOUND43
DBG_REV_PROXY_UPDATE44
DBG_L4_POLICY45
DBG_NETDEV_IN_CLUSTER46
DBG_NETDEV_ENCAP447
DBG_CT_LOOKUP4_148
DBG_CT_LOOKUP4_249
DBG_CT_CREATED450
DBG_CT_LOOKUP6_151
DBG_CT_LOOKUP6_252
DBG_CT_CREATED653
DBG_SKIP_PROXY54
DBG_L4_CREATE55
DBG_IP_ID_MAP_FAILED456
DBG_IP_ID_MAP_FAILED657
DBG_IP_ID_MAP_SUCCEED458
DBG_IP_ID_MAP_SUCCEED659
DBG_LB_STALE_CT60
DBG_INHERIT_IDENTITY61
DBG_SK_LOOKUP462
DBG_SK_LOOKUP663
DBG_SK_ASSIGN64
DBG_L7_LB65
DBG_SKIP_POLICY66
DBG_LB6_LOOPBACK_SNAT67
DBG_LB6_LOOPBACK_SNAT_REV68

<a name="flow-DropReason"></a>

DropReason

These values are shared with pkg/monitor/api/drop.go and bpf/lib/common.h. Note that non-drop reasons (i.e. values less than api.DropMin) are not used here.

NameNumberDescription
DROP_REASON_UNKNOWN0non-drop reasons
INVALID_SOURCE_MAC130drop reasons
INVALID_DESTINATION_MAC131
INVALID_SOURCE_IP132
POLICY_DENIED133
INVALID_PACKET_DROPPED134
CT_TRUNCATED_OR_INVALID_HEADER135
CT_MISSING_TCP_ACK_FLAG136
CT_UNKNOWN_L4_PROTOCOL137
CT_CANNOT_CREATE_ENTRY_FROM_PACKET138
UNSUPPORTED_L3_PROTOCOL139
MISSED_TAIL_CALL140
ERROR_WRITING_TO_PACKET141
UNKNOWN_L4_PROTOCOL142
UNKNOWN_ICMPV4_CODE143
UNKNOWN_ICMPV4_TYPE144
UNKNOWN_ICMPV6_CODE145
UNKNOWN_ICMPV6_TYPE146
ERROR_RETRIEVING_TUNNEL_KEY147
ERROR_RETRIEVING_TUNNEL_OPTIONS148
INVALID_GENEVE_OPTION149
UNKNOWN_L3_TARGET_ADDRESS150
STALE_OR_UNROUTABLE_IP151
NO_MATCHING_LOCAL_CONTAINER_FOUND152
ERROR_WHILE_CORRECTING_L3_CHECKSUM153
ERROR_WHILE_CORRECTING_L4_CHECKSUM154
CT_MAP_INSERTION_FAILED155
INVALID_IPV6_EXTENSION_HEADER156
IP_FRAGMENTATION_NOT_SUPPORTED157
SERVICE_BACKEND_NOT_FOUND158
NO_TUNNEL_OR_ENCAPSULATION_ENDPOINT160
FAILED_TO_INSERT_INTO_PROXYMAP161
REACHED_EDT_RATE_LIMITING_DROP_HORIZON162
UNKNOWN_CONNECTION_TRACKING_STATE163
LOCAL_HOST_IS_UNREACHABLE164
NO_CONFIGURATION_AVAILABLE_TO_PERFORM_POLICY_DECISION165
UNSUPPORTED_L2_PROTOCOL166
NO_MAPPING_FOR_NAT_MASQUERADE167
UNSUPPORTED_PROTOCOL_FOR_NAT_MASQUERADE168
FIB_LOOKUP_FAILED169
ENCAPSULATION_TRAFFIC_IS_PROHIBITED170
INVALID_IDENTITY171
UNKNOWN_SENDER172
NAT_NOT_NEEDED173
IS_A_CLUSTERIP174
FIRST_LOGICAL_DATAGRAM_FRAGMENT_NOT_FOUND175
FORBIDDEN_ICMPV6_MESSAGE176
DENIED_BY_LB_SRC_RANGE_CHECK177
SOCKET_LOOKUP_FAILED178
SOCKET_ASSIGN_FAILED179
PROXY_REDIRECTION_NOT_SUPPORTED_FOR_PROTOCOL180
POLICY_DENY181
VLAN_FILTERED182
INVALID_VNI183
INVALID_TC_BUFFER184
NO_SID185
MISSING_SRV6_STATE186
NAT46187
NAT64188
AUTH_REQUIRED189
CT_NO_MAP_FOUND190
SNAT_NO_MAP_FOUND191
INVALID_CLUSTER_ID192
UNSUPPORTED_PROTOCOL_FOR_DSR_ENCAP193
NO_EGRESS_GATEWAY194
UNENCRYPTED_TRAFFIC195
TTL_EXCEEDED196
NO_NODE_ID197
DROP_RATE_LIMITED198
IGMP_HANDLED199
IGMP_SUBSCRIBED200
MULTICAST_HANDLED201
DROP_HOST_NOT_READY202A BPF program wants to tail call into bpf_host, but the host datapath hasn't been loaded yet.
DROP_EP_NOT_READY203A BPF program wants to tail call some endpoint's policy program in cilium_call_policy, but the program is not available.
DROP_NO_EGRESS_IP204An Egress Gateway node matched a packet against an Egress Gateway policy that didn't select a valid Egress IP.
DROP_PUNT_PROXY205Punt packet to a user space proxy.

<a name="flow-EventType"></a>

EventType

EventType are constants are based on the ones from <linux/perf_event.h>.

NameNumberDescription
UNKNOWN0
EventSample9EventSample is equivalent to PERF_RECORD_SAMPLE.
RecordLost2RecordLost is equivalent to PERF_RECORD_LOST.

<a name="flow-FlowType"></a>

FlowType

NameNumberDescription
UNKNOWN_TYPE0
L3_L41not sure about the underscore here, but L34 also reads strange
L72
SOCK3

<a name="flow-IPVersion"></a>

IPVersion

NameNumberDescription
IP_NOT_USED0
IPv41
IPv62

<a name="flow-L7FlowType"></a>

L7FlowType

This enum corresponds to Cilium's L7 accesslog FlowType:

NameNumberDescription
UNKNOWN_L7_TYPE0
REQUEST1
RESPONSE2
SAMPLE3

<a name="flow-LostEventSource"></a>

LostEventSource

NameNumberDescription
UNKNOWN_LOST_EVENT_SOURCE0
PERF_EVENT_RING_BUFFER1PERF_EVENT_RING_BUFFER indicates that events were dropped in the BPF perf event ring buffer, indicating that userspace agent did not keep up with the events produced by the datapath.
OBSERVER_EVENTS_QUEUE2OBSERVER_EVENTS_QUEUE indicates that events were dropped because the Hubble events queue was full, indicating that the Hubble observer did not keep up.
HUBBLE_RING_BUFFER3HUBBLE_RING_BUFFER indicates that the event was dropped because it could not be read from Hubble's ring buffer in time before being overwritten.

<a name="flow-SocketTranslationPoint"></a>

SocketTranslationPoint

This mirrors enum xlate_point in bpf/lib/trace_sock.h

NameNumberDescription
SOCK_XLATE_POINT_UNKNOWN0
SOCK_XLATE_POINT_PRE_DIRECTION_FWD1Pre service translation
SOCK_XLATE_POINT_POST_DIRECTION_FWD2Post service translation
SOCK_XLATE_POINT_PRE_DIRECTION_REV3Pre reverse service translation
SOCK_XLATE_POINT_POST_DIRECTION_REV4Post reverse service translation

<a name="flow-TraceObservationPoint"></a>

TraceObservationPoint

NameNumberDescription
UNKNOWN_POINT0Cilium treats 0 as TO_LXC, but its's something we should work to remove. This is intentionally set as unknown, so proto API can guarantee the observation point is always going to be present on trace events.
TO_PROXY1TO_PROXY indicates network packets are transmitted towards the l7 proxy.
TO_HOST2TO_HOST indicates network packets are transmitted towards the host namespace.
TO_STACK3TO_STACK indicates network packets are transmitted towards the Linux kernel network stack on host machine.
TO_OVERLAY4TO_OVERLAY indicates network packets are transmitted towards the tunnel device.
TO_ENDPOINT101TO_ENDPOINT indicates network packets are transmitted towards endpoints (containers).
FROM_ENDPOINT5FROM_ENDPOINT indicates network packets were received from endpoints (containers).
FROM_PROXY6FROM_PROXY indicates network packets were received from the l7 proxy.
FROM_HOST7FROM_HOST indicates network packets were received from the host namespace.
FROM_STACK8FROM_STACK indicates network packets were received from the Linux kernel network stack on host machine.
FROM_OVERLAY9FROM_OVERLAY indicates network packets were received from the tunnel device.
FROM_NETWORK10FROM_NETWORK indicates network packets were received from native devices.
TO_NETWORK11TO_NETWORK indicates network packets are transmitted towards native devices.
FROM_CRYPTO12FROM_CRYPTO indicates network packets were received from the crypto process for decryption.
TO_CRYPTO13TO_CRYPTO indicates network packets are transmitted towards the crypto process for encryption.

<a name="flow-TraceReason"></a>

TraceReason

NameNumberDescription
TRACE_REASON_UNKNOWN0
NEW1
ESTABLISHED2
REPLY3
RELATED4
REOPENED5
SRV6_ENCAP6
SRV6_DECAP7
ENCRYPT_OVERLAY8

<a name="flow-TrafficDirection"></a>

TrafficDirection

NameNumberDescription
TRAFFIC_DIRECTION_UNKNOWN0
INGRESS1
EGRESS2

<a name="flow-Tunnel-Protocol"></a>

Tunnel.Protocol

NameNumberDescription
UNKNOWN0
VXLAN1
GENEVE2

<a name="flow-Verdict"></a>

Verdict

NameNumberDescription
VERDICT_UNKNOWN0UNKNOWN is used if there is no verdict for this flow event
FORWARDED1FORWARDED is used for flow events where the trace point has forwarded this packet or connection to the next processing entity.
DROPPED2DROPPED is used for flow events where the connection or packet has been dropped (e.g. due to a malformed packet, it being rejected by a network policy etc). The exact drop reason may be found in drop_reason_desc.
ERROR3ERROR is used for flow events where an error occurred during processing
AUDIT4AUDIT is used on policy verdict events in policy audit mode, to denominate flows that would have been dropped by policy if audit mode was turned off
REDIRECTED5REDIRECTED is used for flow events which have been redirected to the proxy
TRACED6TRACED is used for flow events which have been observed at a trace point, but no particular verdict has been reached yet
TRANSLATED7TRANSLATED is used for flow events where an address has been translated

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
<a name="double" /> doubledoubledoublefloatfloat64doublefloatFloat
<a name="float" /> floatfloatfloatfloatfloat32floatfloatFloat
<a name="int32" /> int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
<a name="int64" /> int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
<a name="uint32" /> uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
<a name="uint64" /> uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
<a name="sint32" /> sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
<a name="sint64" /> sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
<a name="fixed32" /> fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
<a name="fixed64" /> fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
<a name="sfixed32" /> sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
<a name="sfixed64" /> sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
<a name="bool" /> boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
<a name="string" /> stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
<a name="bytes" /> bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)