Firecracker Metrics Configuration
For the metrics capability, Firecracker uses a single Metrics system. This system can be configured by sending a PUT API Request to the /metrics path.
Prerequisites
In order to configure the Metrics, first you have to create the resource that will be used for storing the metrics:
Configuring the system
You can configure the Metrics system by sending the following API command:
Details about this configuration can be found in the swagger definition.
The metrics are written to the metrics_path in JSON format.
Flushing the metrics
The metrics get flushed in two ways:
without user intervention every 60 seconds;
upon user demand, by issuing a
FlushMetricsrequest. You can find how to use this request in the actions API.
If the path provided is a named pipe, you can use the script below to read from it:
Otherwise, if the path points to a normal file, you can simply do: