[#240] Added test log counter metrics #240

Merged
abereziny merged 1 commit from i.niyazov/frostfs-testcases:add-test-log-counter-metrics-v0.39 into support/v0.39 2024-05-31 10:36:49 +00:00
Member

Signed-off-by: Ilyas Niyazov i.niyazov@yadro.com

Signed-off-by: Ilyas Niyazov i.niyazov@yadro.com
anikeev-yadro requested changes 2024-05-30 11:46:44 +00:00
@ -0,0 +48,4 @@
def get_count_logs_by_level(shell: Shell, log_level: str, after_time: str):
count_logs = 0
try:
logs = shell.exec(f"journalctl -u frostfs-storage --grep='{log_level}' --since '{after_time}'")
Member

Maybe it will be easier this way? Without any calculations on the test side.

sudo journalctl -u frostfs-storage --grep='info' --since '2024-05-30 09:32:48' | wc -l
Maybe it will be easier this way? Without any calculations on the test side. ``` sudo journalctl -u frostfs-storage --grep='info' --since '2024-05-30 09:32:48' | wc -l ```
Author
Member

in regular expression I calculate log level text located after time, until --grep='error' | wc -l will count each lines with substring 'error' in any location

f.e. logs with level 'info' contain word 'error' in message wc -l will count it as logs with level='error'

in regular expression I calculate log level text located after time, until ` --grep='error' | wc -l` will count each lines with substring 'error' in any location f.e. logs with level 'info' contain word 'error' in message `wc -l` will count it as logs with level='error'
anikeev-yadro marked this conversation as resolved
anikeev-yadro approved these changes 2024-05-30 13:30:32 +00:00
abereziny approved these changes 2024-05-30 14:50:11 +00:00
Member

Please change commit message

Please change commit message
i.niyazov force-pushed add-test-log-counter-metrics-v0.39 from 8fbd631ef3 to 29ee444519 2024-05-30 15:13:33 +00:00 Compare
i.niyazov changed title from [#239] Added test log counter metrics to [#240] Added test log counter metrics 2024-05-30 15:13:45 +00:00
abereziny approved these changes 2024-05-31 10:36:12 +00:00
abereziny merged commit a47634be5a into support/v0.39 2024-05-31 10:36:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-testcases#240
No description provided.