- Log files manipulation
1.1. Upload (Current or specific ID)
1.2. Rotate
1.3. Delete - Setting severity level
2.1. General
2.2. Per daemon/component
2.3. Logs generated inside docker containers should be available and transparent to general logging mechanism - Logging to console (Useful for debugging purposes)
3.1. Specific severity type used by application to print to console
3.2. Log monitor events to mirror selected messages to all terminals - Daemon crashes should be monitored and reported along with system dumps generated after crash occures.
System dumps should capture as much of a system state at the moment of querying as possible. Dump can be divided into 3 parts:
- General - provides all general (non platform related) information of a system. This includes output from all available
show
commands, configuration files, databases snapshots, standard command likeifconfig
orip
orlsmod
, along with all log files on the system - Per daemon - all stateteful daemons that under SONiC project development should have a possibility to dump their state. It requires a registration mechanism that allows to trigger dump generation for each daemon.
- Per platform - each platform should be able to dump its inner state, SDK configuration etc. It requires a registration mechanism that allows to trigger dump generation.
End goal of system dump is a collection of configuration files, logs, states of system components that will allow to reproduce any configuration in local development environment.
System should provide an interface to generate such dump on demand and upload it to a remote server.
In order to not use all available space on disk, log files should be rotated automaticcaly and their size should be limited.
Log files should be limitatied in their overall size.
Spamming log messages should be limited in frequency of their occurence.
Sysdump archive should have a limitation in size
All modules should use the same common API for logging and dumps (provided by libswss-common).
Following list of parameters should be configurable:
- Maximum number of files for rotation
- Rotation period
- Maximum log file size
- Compress type for rotated log files
- Post rotation actions
Those parameters in configuration files are deployed via sonic-mgmt.
It is done during deployment stage.
User can change logging configuration via sonic-mgmt, which takes care of deploying configs.
Sysdump should be available through sonic-mgmt.