Skip to main content

statistics-collection

Most data provided in the AMPS monitoring interface is collected at the interval specified in the statistics configuration.

This means that the statistics presented are not a continuous sample, or a sample when "all operations are complete". Instead, the statistics reflect the point in time when the statistics are collected.

When monitoring statistics, consider not only the values reported, but the change in values over time and how those values compare to other values.

For example, the transport_rx_queue for a client connecting over the network indicates the number of bytes currently in the TCP buffer for a given connection. However, a single sample that shows a nonzero count for this metric simply means that, at the time statistics were collected, there were bytes in that buffer. Whether this indicates a problem or not depends on the context. If the next sample for that client shows that AMPS is consuming a large number of bytes for the client, then the fact that there are bytes in the queue simply means that the connection is active. On the other hand, if the bytes_in (total bytes consumed for this connection) and bytes_in_per_second (bytes per second consumed for this connection, averaged over the last statistics interval) indicate a slowdown, that might be cause for concern. Likewise, an empty transport_rx_queue does not mean that no messages are being received for the client if bytes_in and bytes_in_per_second show the expected traffic.

Likewise, a client that connects, runs a query, consumes the results and disconnects in a period of time less than the statistics interval, may not be captured in the statistics database at all. If the client connection does not exist at any of the times that statistics are recorded, AMPS will not capture statistics for that client connection, so that client will not appear in the statistics database.