Back to Cilium

Protocol Documentation

api/v1/observer/README.md

1.19.316.4 KB
Original Source

Protocol Documentation

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

Table of Contents

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

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

observer/observer.proto

<a name="observer-ExportEvent"></a>

ExportEvent

ExportEvent contains an event to be exported. Not to be used outside of the exporter feature.

FieldTypeLabelDescription
flowflow.Flow
node_statusrelay.NodeStatusEventnode_status informs clients about the state of the nodes participating in this particular GetFlows request.
lost_eventsflow.LostEventlost_events informs clients about events which got dropped due to a Hubble component being unavailable
agent_eventflow.AgentEventagent_event informs clients about an event received from the Cilium agent.
debug_eventflow.DebugEventdebug_event contains Cilium datapath debug events
node_namestringName of the node where this event was observed.
timegoogle.protobuf.TimestampTimestamp at which this event was observed.

<a name="observer-GetAgentEventsRequest"></a>

GetAgentEventsRequest

FieldTypeLabelDescription
numberuint64Number of flows that should be returned. Incompatible with since/until. Defaults to the most recent (last) number events, unless first is true, then it will return the earliest number events.
firstboolfirst specifies if we should look at the first number events or the last number of events. Incompatible with follow.
followboolfollow sets when the server should continue to stream agent events after printing the last N agent events.
sincegoogle.protobuf.TimestampSince this time for returned agent events. Incompatible with number.
untilgoogle.protobuf.TimestampUntil this time for returned agent events. Incompatible with number.

<a name="observer-GetAgentEventsResponse"></a>

GetAgentEventsResponse

GetAgentEventsResponse contains an event received from the Cilium agent.

FieldTypeLabelDescription
agent_eventflow.AgentEvent
node_namestringName of the node where this event was observed.
timegoogle.protobuf.TimestampTimestamp at which this event was observed.

<a name="observer-GetDebugEventsRequest"></a>

GetDebugEventsRequest

FieldTypeLabelDescription
numberuint64Number of events that should be returned. Incompatible with since/until. Defaults to the most recent (last) number events, unless first is true, then it will return the earliest number events.
firstboolfirst specifies if we should look at the first number events or the last number of events. Incompatible with follow.
followboolfollow sets when the server should continue to stream debug events after printing the last N debug events.
sincegoogle.protobuf.TimestampSince this time for returned debug events. Incompatible with number.
untilgoogle.protobuf.TimestampUntil this time for returned debug events. Incompatible with number.

<a name="observer-GetDebugEventsResponse"></a>

GetDebugEventsResponse

GetDebugEventsResponse contains a Cilium datapath debug events.

FieldTypeLabelDescription
debug_eventflow.DebugEvent
node_namestringName of the node where this event was observed.
timegoogle.protobuf.TimestampTimestamp at which this event was observed.

<a name="observer-GetFlowsRequest"></a>

GetFlowsRequest

FieldTypeLabelDescription
numberuint64Number of flows that should be returned. Incompatible with since/until. Defaults to the most recent (last) number flows, unless first is true, then it will return the earliest number flows.
firstboolfirst specifies if we should look at the first number flows or the last number of flows. Incompatible with follow.
followboolfollow sets when the server should continue to stream flows after printing the last N flows.
blacklistflow.FlowFilterrepeatedblacklist defines a list of filters which have to match for a flow to be excluded from the result. If multiple blacklist filters are specified, only one of them has to match for a flow to be excluded.
whitelistflow.FlowFilterrepeatedwhitelist defines a list of filters which have to match for a flow to be included in the result. If multiple whitelist filters are specified, only one of them has to match for a flow to be included. The whitelist and blacklist can both be specified. In such cases, the set of the returned flows is the set difference whitelist - blacklist. In other words, the result will contain all flows matched by the whitelist that are not also simultaneously matched by the blacklist.
sincegoogle.protobuf.TimestampSince this time for returned flows. Incompatible with number.
untilgoogle.protobuf.TimestampUntil this time for returned flows. Incompatible with number.
field_maskgoogle.protobuf.FieldMaskFieldMask allows clients to limit flow's fields that will be returned. For example, {paths: ["source.id", "destination.id"]} will return flows with only these two fields set.
experimentalGetFlowsRequest.Experimental
extensionsgoogle.protobuf.Anyextensions can be used to add arbitrary additional metadata to GetFlowsRequest. This can be used to extend functionality for other Hubble compatible APIs, or experiment with new functionality without needing to change the public API.

<a name="observer-GetFlowsRequest-Experimental"></a>

GetFlowsRequest.Experimental

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

<a name="observer-GetFlowsResponse"></a>

GetFlowsResponse

GetFlowsResponse contains either a flow or a protocol message.

FieldTypeLabelDescription
flowflow.Flow
node_statusrelay.NodeStatusEventnode_status informs clients about the state of the nodes participating in this particular GetFlows request.
lost_eventsflow.LostEventlost_events informs clients about events which got dropped due to a Hubble component being unavailable
node_namestringName of the node where this event was observed.
timegoogle.protobuf.TimestampTimestamp at which this event was observed.

<a name="observer-GetNamespacesRequest"></a>

GetNamespacesRequest

<a name="observer-GetNamespacesResponse"></a>

GetNamespacesResponse

GetNamespacesResponse contains the list of namespaces.

FieldTypeLabelDescription
namespacesNamespacerepeatedNamespaces is a list of namespaces with flows

<a name="observer-GetNodesRequest"></a>

GetNodesRequest

<a name="observer-GetNodesResponse"></a>

GetNodesResponse

GetNodesResponse contains the list of nodes.

FieldTypeLabelDescription
nodesNoderepeatedNodes is an exhaustive list of nodes.

<a name="observer-Namespace"></a>

Namespace

FieldTypeLabelDescription
clusterstring
namespacestring

<a name="observer-Node"></a>

Node

Node represents a cluster node.

FieldTypeLabelDescription
namestringName is the name of the node.
versionstringVersion is the version of Cilium/Hubble as reported by the node.
addressstringAddress is the network address of the API endpoint.
staterelay.NodeStateState represents the known state of the node.
tlsTLSTLS reports TLS related information.
uptime_nsuint64UptimeNS is the uptime of this instance in nanoseconds
num_flowsuint64number of currently captured flows
max_flowsuint64maximum capacity of the ring buffer
seen_flowsuint64total amount of flows observed since the observer was started

<a name="observer-ServerStatusRequest"></a>

ServerStatusRequest

<a name="observer-ServerStatusResponse"></a>

ServerStatusResponse

FieldTypeLabelDescription
num_flowsuint64number of currently captured flows In a multi-node context, this is the cumulative count of all captured flows.
max_flowsuint64maximum capacity of the ring buffer In a multi-node context, this is the aggregation of all ring buffers capacities.
seen_flowsuint64total amount of flows observed since the observer was started In a multi-node context, this is the aggregation of all flows that have been seen.
uptime_nsuint64uptime of this observer instance in nanoseconds In a multi-node context, this field corresponds to the uptime of the longest living instance.
num_connected_nodesgoogle.protobuf.UInt32Valuenumber of nodes for which a connection is established
num_unavailable_nodesgoogle.protobuf.UInt32Valuenumber of nodes for which a connection cannot be established
unavailable_nodesstringrepeatedlist of nodes that are unavailable This list may not be exhaustive.
versionstringVersion is the version of Cilium/Hubble.
flows_ratedoubleApproximate rate of flows seen by Hubble per second over the last minute. In a multi-node context, this is the sum of all flows rates.

<a name="observer-TLS"></a>

TLS

TLS represents TLS information.

FieldTypeLabelDescription
enabledboolEnabled reports whether TLS is enabled or not.
server_namestringServerName is the TLS server name that can be used as part of the TLS cert validation process.

<a name="observer-Observer"></a>

Observer

Observer returns a stream of Flows depending on which filter the user want to observe.

Method NameRequest TypeResponse TypeDescription
GetFlowsGetFlowsRequestGetFlowsResponse streamGetFlows returning structured data, meant to eventually obsolete GetLastNFlows.
GetAgentEventsGetAgentEventsRequestGetAgentEventsResponse streamGetAgentEvents returns Cilium agent events.
GetDebugEventsGetDebugEventsRequestGetDebugEventsResponse streamGetDebugEvents returns Cilium datapath debug events.
GetNodesGetNodesRequestGetNodesResponseGetNodes returns information about nodes in a cluster.
GetNamespacesGetNamespacesRequestGetNamespacesResponseGetNamespaces returns information about namespaces in a cluster. The namespaces returned are namespaces which have had network flows in the last hour. The namespaces are returned sorted by cluster name and namespace in ascending order.
ServerStatusServerStatusRequestServerStatusResponseServerStatus returns some details about the running hubble server.

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)