FlightRecorder Satellite#
Name |
FlightRecorder |
---|---|
Description |
Satellite to record log messages from a Constellation |
Category |
Monitoring |
Language |
C++ |
Description#
This satellite subscribes to Constellation log messages of a configurable level, receives them and records them to storage.
Several storage options are available and can be selected via the method
configuration parameter:
FILE
represents the simplest storage, all logs are recorded into a single file provided via thefile_path
parameter.ROTATE
allows to use multiple, rotating log files. Every time the current log file reaches the size configured via therotate_filesize
parameter, a new file is started. After the maximum number of files set byrotate_max_files
is reached, the oldest log file is overwritten. This can be useful to keep only a certain amount of history present.DAILY
will create a new log file every 24h at the time defined with thedaily_switch
parameter. This method is particularly useful for very long-running Constellations which require preservation of the log history.RUN
will switch to a new log file whenever a new run is started, i.e. when this satellite received thestart
command. This can be especially helpful when many runs are recorded and an easy assignment of logs is required.
The global log level to which the FlightRecorder subscribes for all satellites in the Constellation can be configured using
the global_recording_level
.
Caution
This level should be selected carefully. Only log messages with an active subscription are transmitted over the network and
subscribing to low levels such as DEBUG
or TRACE
might lead to significant network traffic and sizable log files being
written to storage.
Log messages are cached and flushed to storage asynchronously. The cache is flushed in regular intervals set by
flush_period
as well as at each run stop or interruption of operation.
Note
It should be noted that the flush_period
setting also applied to the console output of the FlightRecorder satellite itself.
Parameters#
The following parameters are read and interpreted by this satellite. Parameters without a default value are required.
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
String |
Method to be used for logging. Valid values are |
|
|
String |
Path to the target log file |
- |
|
Boolean |
Flag to allow or deny overwriting of existing log files |
|
|
String |
Global log level to be recorded by this satellite |
|
|
Integer |
Period in seconds after which log messages are regularly flushed to storage |
|
|
Integer |
Maximum number of files to be user for rotating. Only used for |
|
|
Integer |
Maximum file size Mb after which the log is rotated. Only used for |
|
|
Local time |
Local time in the format |
- |
Configuration Example#
An example configuration for this satellite which could be dropped into a Constellation configuration as a starting point
[FlightRecorder.RunLogger]
method = "RUN"
allow_overwriting = true
file_path = "/data/logs/logfile.txt"
Metrics#
Metric |
Description |
Interval |
Type |
---|---|---|---|
|
Total number messages received and logged since satellite startup |
3s |
|
|
Number of warning messages received and logged since satellite startup |
3s |
|
|
Total number messages received and logged since the last run start |
3s |
|
Custom Commands#
Command |
Description |
Arguments |
Return Value |
Allowed States |
---|---|---|---|---|
|
Flush log sink |
- |
- |
|
Framework Parameters#
This satellite inherits the following framework parameters from its base classes:
Parameters inherited from Satellite
#
Autonomous Operation#
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
Unsigned integer |
Interval in seconds between heartbeats to be sent to other Constellation components |
|
|
Role name |
Role this satellite should take in the Constellation. Accepted values are |
|
Transition Orchestration#
Parameters to control autonomous transition orchestration of satellites:
Parameter |
Type |
Description |
Default Value |
---|---|---|---|
|
Unsigned integer |
Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning |
|
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
Framework Metrics#
This satellite inherits the following framework metrics from its base classes:
Metrics inherited from Satellite
#
None