blob: b05d93378bd0019dac76a01ffa1a561ad578c3f3 [file] [log] [blame]
include "aos/configuration.fbs";
namespace aos.message_bridge;
// Per-channel statistics for any channels being forwarded to other nodes by the
// message bridge server.
table ServerChannelStatistics {
// Index into the configuration channels list for this channel.
channel_index:uint64 (id: 0);
// Total number of messages that were sent (this does not necessarily
// mean that the message made it to the client).
sent_packets:uint (id: 1);
// Total number of messages that were dropped while sending (e.g.,
// those dropped by the kernel).
dropped_packets:uint (id: 2);
// Count of the total number of retries attempted on this channel.
retry_count:uint (id: 3);
}
// State of the connection.
enum State: ubyte {
CONNECTED,
DISCONNECTED,
}
// Statistics from a single connection to a client from this server.
table ServerConnection {
// The node that we are connected to.
node:Node (id: 0);
// Health of this connection. Connected or not?
state:State (id: 1);
// Number of packets that have been dropped (if known).
dropped_packets:uint (id: 2);
// Number of packets sent on all channels.
sent_packets:uint (id: 3);
// This is the measured monotonic offset for the connected node in
// nanoseconds. Add this to our monotonic time to get their
// monotonic time.
monotonic_offset:int64 (id: 4);
// Boot UUID of the client.
boot_uuid:string (id: 5);
// Number of extra calls needed to receive a single message
// (indicates congestion)
partial_deliveries:uint (id: 6);
// Time at which we connected to the client as nanoseconds on the local
// monotonic clock. This is not populated when not connected, and defaults
// to monotonic_clock::min_time.
connected_since_time:int64 = -9223372036854775808 (id: 7);
// Number of times we've established a connection to the server.
connection_count:uint (id: 8);
// Number of times we've had an invalid connection with something wrong in
// the connection message, but we were able to match which node it was.
invalid_connection_count:uint (id: 9);
// Statistics for every channel being forwarded to this node. Ordering is arbitrary;
// the channels are identified by an index in the ServerChannelStatistics.
channels:[ServerChannelStatistics] (id: 10);
// Total number of retries attempted on all channels. Typically due to kernel
// send buffers filling up.
retry_count:uint (id: 11);
}
// Statistics for all connections to all the clients.
table ServerStatistics {
connections:[ServerConnection] (id: 0);
// Count of timestamp send failures
timestamp_send_failures:uint64 (id: 1);
// Number of times we've had an invalid connection with something wrong in
// the connection message. The most likely cause is that the config sha256
// doesn't match between nodes.
invalid_connection_count:uint (id: 2);
}
root_type ServerStatistics;