req/req.yml

204 lines
7.3 KiB
YAML
Raw Normal View History

2024-05-08 09:52:34 +00:00
name: journal-uploader
2024-05-09 21:14:14 +00:00
version: 1.0.0
2024-05-08 09:52:34 +00:00
description: |-
The journal-uploader has two main functionalities.
- Take a stream of log messages and filter them depending on their severity
- Upload journal logs for a specified time when activated through cloud call
topics:
2024-05-08 12:43:29 +00:00
TOPIC-1:
name: Journal Watcher
2024-05-08 09:52:34 +00:00
subtopics:
2024-05-08 12:43:29 +00:00
SUB-1.1:
2024-05-08 09:52:34 +00:00
name: File Monitoring
requirements:
2024-05-08 12:43:29 +00:00
REQ-1.1.1:
2024-05-08 09:52:34 +00:00
name: Continuous Monitoring
description: The tool must continuously monitor a designated directory.
2024-05-08 12:43:29 +00:00
SUB-1.2:
2024-05-08 12:18:03 +00:00
name: File Detection
requirements:
2024-05-08 12:43:29 +00:00
REQ-1.2.1:
2024-05-08 12:18:03 +00:00
name: Detection of New Files
description: The tool must detect the addition of new files in the monitored directory.
2024-05-08 12:43:29 +00:00
REQ-1.2.2:
2024-05-08 12:18:03 +00:00
name: Avoid Re-processing
description: The tool must not process files that have already been processed.
2024-05-08 14:51:38 +00:00
2024-05-08 12:43:29 +00:00
TOPIC-2:
name: Traced Logging
subtopics:
SUB-2.1:
2024-05-08 12:18:03 +00:00
name: File Processing
requirements:
2024-05-08 12:43:29 +00:00
REQ-2.1.1:
2024-05-08 12:18:03 +00:00
name: Reading Log Messages
description: When a new file is processed, each log message should be put into a buffer.
2024-05-08 12:43:29 +00:00
REQ-2.1.2:
2024-05-08 12:18:03 +00:00
name: Filtering Log Messages
description: |-
The tool will search for messages of a defined priority (Trigger Priority).
Each message of this priority, as well as all messages before and after, which are inside a defined timespan, must
get written into a file. Every other message should gets dropped.
2024-05-08 12:43:29 +00:00
REQ-2.1.3:
2024-05-08 12:18:03 +00:00
name: No Duplicate Log Messages
description: The tool shall make sure that no log entry will be written to the file twice.
2024-05-08 12:43:29 +00:00
SUB-2.2:
2024-05-08 12:18:03 +00:00
name: Traced Log Rotation
requirements:
2024-05-08 12:43:29 +00:00
REQ-2.2.1:
2024-05-08 12:18:03 +00:00
name: Rotating Files
description: |-
When the size of the current traced log file exceeds a certain threshold,
it must be closed and a new file must be opened for writing.
2024-05-08 12:43:29 +00:00
REQ-2.2.2:
2024-05-08 12:18:03 +00:00
name: Compression of Rotated Files
description: Each traced log file must get compressed after it got rotated.
2024-05-08 12:43:29 +00:00
REQ-2.2.3:
2024-05-08 12:18:03 +00:00
name: Rotating Directory
description: |-
When the directory size exceeds a certain threshold, the tool must delete the oldest
files in the directory, until the size is below the threshold again.
2024-05-08 14:51:38 +00:00
2024-05-08 12:43:29 +00:00
TOPIC-3:
2024-05-08 12:18:03 +00:00
name: Remote Journal Logging
subtopics:
2024-05-08 12:43:29 +00:00
SUB-3.1:
2024-05-08 12:18:03 +00:00
name: Service Activation
requirements:
2024-05-08 12:43:29 +00:00
REQ-3.1.1:
2024-05-08 12:18:03 +00:00
name: Cloud Activation
description: |-
2024-05-08 12:20:57 +00:00
The remote journal logging shall be startable through a function call from the cloud.
2024-05-08 12:18:03 +00:00
The api call has the duration and max interval as arguments.
2024-05-08 12:43:29 +00:00
REQ-3.1.2:
2024-05-08 12:18:03 +00:00
name: Duration
2024-05-08 12:20:57 +00:00
description: The remote journal logging should stay active, until it reaches the specified duration.
2024-05-08 12:43:29 +00:00
REQ-3.1.3:
2024-05-08 12:18:03 +00:00
name: Max Interval
description: |-
If no upload was done after the amount of time specified in max interval,
2024-05-08 12:20:57 +00:00
a log rotation shall be triggered, which will in turn get picked up by the file monitoring.
2024-05-08 12:43:29 +00:00
REQ-3.1.4:
2024-05-08 12:18:03 +00:00
name: Analytics Not Accepted
description: |-
2024-05-08 12:20:57 +00:00
If the user has not accepted the usage of their data, the cloud call must
2024-05-08 12:18:03 +00:00
result in an error.
2024-05-08 12:43:29 +00:00
SUB-3.2:
2024-05-08 12:18:03 +00:00
name: File Processing
requirements:
2024-05-08 12:43:29 +00:00
REQ-3.2.1:
2024-05-08 12:18:03 +00:00
name: File Upload
2024-05-08 12:20:57 +00:00
description: When a file gets detected, it should get uploaded to the cloud.
2024-05-08 12:43:29 +00:00
REQ-3.2.2:
2024-05-08 12:18:03 +00:00
name: No Duplicate Files
2024-05-08 12:20:57 +00:00
description: Already processed files must not get uploaded again.
2024-05-08 12:43:29 +00:00
REQ-3.2.3:
2024-05-08 12:18:03 +00:00
name: Revoking Analytics
description: |-
2024-05-08 12:20:57 +00:00
If the user revokes the usage of their data, the service may continue running
but must not upload any data until the user allows the usage of their data again.
2024-05-08 12:43:29 +00:00
REQ-3.2.4:
2024-05-08 12:18:03 +00:00
name: Duration Expired
2024-05-08 12:20:57 +00:00
description: After the specified duration is expired, the service should stop uploading files.
2024-05-08 12:43:29 +00:00
TOPIC-4:
2024-05-08 12:18:03 +00:00
name: Configuration
requirements:
2024-05-08 12:43:29 +00:00
CONF-4.1:
2024-05-08 12:18:03 +00:00
name: Journal Directory
2024-05-08 12:20:57 +00:00
description: Users should be able to specify the directory to be monitored for journal files.
2024-05-08 12:43:29 +00:00
CONF-4.2:
2024-05-08 12:18:03 +00:00
name: Output Directory
2024-05-08 12:20:57 +00:00
description: Users should be able to specify the directory into which the final files will be written.
2024-05-08 12:43:29 +00:00
CONF-4.3:
2024-05-08 12:18:03 +00:00
name: Trigger Priority
2024-05-08 12:20:57 +00:00
description: Users should be able to specify which priority triggers the filtering.
2024-05-08 12:43:29 +00:00
CONF-4.4:
2024-05-08 12:18:03 +00:00
name: Journal Context
2024-05-08 12:20:57 +00:00
description: Users should be able to specify how many seconds of context will be added
2024-05-08 12:18:03 +00:00
to traced logs when encountering a trigger priority.
2024-05-08 12:43:29 +00:00
CONF-4.5:
2024-05-08 12:18:03 +00:00
name: Max File Size
2024-05-08 12:20:57 +00:00
description: Users should be able to specify the max file size, at which a file gets rotated.
2024-05-08 12:43:29 +00:00
CONF-4.6:
2024-05-08 12:18:03 +00:00
name: Max Directory Size
2024-05-08 12:20:57 +00:00
description: Users should be able to specify the max directory size, at which a directory gets rotated.
2024-05-08 12:43:29 +00:00
CONF-4.7:
2024-05-08 12:18:03 +00:00
name: File Monitoring Interval
description: |-
2024-05-08 12:20:57 +00:00
Users should be able to specify an interval, which should change
2024-05-08 12:18:03 +00:00
how long the tool waits before checking if new files are available.
2024-05-08 14:51:38 +00:00
2024-05-08 12:43:29 +00:00
TOPIC-5:
2024-05-08 12:18:03 +00:00
name: Performance Requirements
requirements:
2024-05-08 12:43:29 +00:00
PERF-5.1:
2024-05-08 12:18:03 +00:00
name: Efficiency
2024-05-08 12:20:57 +00:00
description: The tool should efficiently monitor and process files without excessive resource consumption.
2024-05-08 12:43:29 +00:00
PERF-5.2:
2024-05-08 12:18:03 +00:00
name: Interval Delay
2024-05-08 12:20:57 +00:00
description: The tool should do its work with no more than 10 seconds delay after its interval.
2024-05-08 14:51:38 +00:00
2024-05-08 12:43:29 +00:00
TOPIC-6:
name: Security & Data Protection
2024-05-08 12:18:03 +00:00
requirements:
2024-05-08 12:43:29 +00:00
SEC-6.1:
2024-05-08 12:18:03 +00:00
name: No Insecure Connection
2024-05-08 12:20:57 +00:00
description: The tool must send data only through a secure connection.
2024-05-08 12:43:29 +00:00
SEC-6.2:
2024-05-08 12:18:03 +00:00
name: GDPR compliance
2024-05-08 12:20:57 +00:00
description: The tool must not upload data if the user has not agreed to share this information.
2024-05-08 14:51:38 +00:00
2024-05-08 12:43:29 +00:00
TOPIC-7:
2024-05-08 12:18:03 +00:00
name: Testing
requirements:
2024-05-08 13:50:35 +00:00
TST-7.1:
2024-05-08 12:18:03 +00:00
name: Unit Tests
2024-05-08 12:20:57 +00:00
description: Comprehensive unit tests should be written to cover major functionalities.
2024-05-08 13:50:35 +00:00
TST-7.2:
2024-05-08 12:18:03 +00:00
name: Integration Tests
2024-05-08 12:20:57 +00:00
description: Integration tests should be conducted to ensure all parts of the tool work together seamlessly.
2024-05-08 12:18:03 +00:00
2024-05-08 09:52:34 +00:00
definitions:
- name: Default Journal Directory
value: /run/log/journal/<machine_id>
additional_info:
- Machine ID can be found at /etc/machine-id
- name: Default Output Directory
value: /run/log/filtered-journal
config_defaults:
- name: Journal Directory
type: Path
- name: Output Directory
type: Path
- name: Trigger Priority
type: Enum
valid_values:
- Emergency
- Alert
- Critical
- Error
- Warning
- Notice
- Info
- Debug
default_value: Warning
- name: Journal Context
type: Integer
unit: Seconds
default_value: '15'
- name: Max File Size
type: Integer
unit: Bytes
default_value: '8388608'
hint: (8 MB)
- name: Max Directory Size
type: Integer
unit: Bytes
default_value: '75497472'
hint: (72 MB)
- name: File Monitoring Interval
type: Integer
unit: Seconds
default_value: '10'