Monitoring

In order to maintain a constant memory footprint, Babl exports metrics to memory-mapped files that can be processed by external programs. This means reporting of metrics remains fast, and prevents allocation occurring due to 3rd-party monitoring libraries.

The recommended approach is to read and interpret the exported monitoring data, and push to a metrics back-end for processing.

Supported customers can benefit from integration with popular metrics backends (e.g. Influx, Prometheus), and pre-prepared charts formatted for the Grafana charting system. See Support for more information.

Exported Metrics

Server Statistics

Records server-wide statistics, contained in the server mark-file ${SERVER_DIR}/babl-server.mark.

Can be read using the program com.aitusoftware.babl.monitoring.ServerStatisticsPrinter:

$ java -cp babl-0.10.0-all.jar \
    com.aitusoftware.babl.monitoring.ServerStatisticsPrinter \
    $SERVER_DIR
Timestamp: 2021-03-14T15:32:05.358Z
Bytes Read:                       42826384
Bytes Written:                    42621246
Active Sessions:                       176
Back Pressure Events:                    2
Invalid Opcode Events:                   0
Max Event Loop Ms    :                   1
Session Statistics

Records per-session statistics, contained in files named ${SERVER_DIR}/babl-session-statistics-N.data.

Can be read using the program com.aitusoftware.babl.monitoring.SessionStatisticsPrinter:

$ java -cp babl-0.10.0-all.jar \
    com.aitusoftware.babl.monitoring.SessionStatisticsPrinter \
    $SERVER_DIR
Session ID:                                 711
Session State:                        CONNECTED
Bytes Read:                              433878
Bytes Written:                           433397
Frames Decoded:                            1271
Frames Encoded:                            2043
Messages Received:                         1090
Messages Sent:                             2043
Receive Buffered Bytes:                       0
Send Buffered Bytes:                          0
Invalid Messages Received:                    0
Invalid Pings Received:                       0
Send Back Pressure Events:                    0
Errors

Any exceptions are logged to an ErrorBuffer for efficient reporting, and can be viewed using the program com.aitusoftware.babl.monitoring.ErrorPrinter:

$ java -cp babl-0.10.0-all.jar \
    com.aitusoftware.babl.monitoring.ErrorPrinter \
    $SERVER_DIR
No errors reported.

Docker

If running Babl in the supplied docker container, utility scripts are provided for viewing monitoring data:

If running the server in DETACHED mode, Aeron statistics can be displayed with: