-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INDY-1187] Implement log processor #573
Conversation
f3c8100
to
b362209
Compare
Signed-off-by: Sergey Khoroshavin <[email protected]>
b362209
to
4e1c319
Compare
scripts/process_logs.yml
Outdated
filename: warnings_<node>.log | ||
pattern: <timestamp> | <message> | ||
merge_nodes: no | ||
commits: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does commits
mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an identifier for log sink. It's used as a target in rule log line
in chains.
scripts/process_logs.yml
Outdated
only_timestamped: no # Whether to discard non-timestamped lines | ||
|
||
|
||
chains: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need documentation and description how to use it and what each parameter means here.
scripts/process_logs.yml
Outdated
monitoring: warnings | ||
- log line: warnings | ||
|
||
tag_commits: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be a good idea to have a list of prepared chain items for common operations such as ViewChange, CatchUp, Connection, etc.
It would be great to have these rules in a separate file so that we don't need to edit neither the script nor config if the format of some log entries changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is next in my TODO list
scripts/process_logs.yml
Outdated
merge_nodes: no | ||
commits: | ||
filename: commits.log | ||
pattern: <timestamp> | <node> | <instId> <seqNo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to use it? Is it some pre-defined variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of them (timestamp, node, level, source, func, message) are indeed pre-defined, others (in this case instId and seqNo) are values of user defined attributes by tag
rule
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
f5de2df
to
e3b67b5
Compare
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
test this please |
Signed-off-by: Sergey Khoroshavin <[email protected]>
Signed-off-by: Sergey Khoroshavin <[email protected]>
scripts/process_logs/README.md
Outdated
- `node_group`: regex group number that matches node identifier | ||
- `only_timestamped`: whether to discard non-timestamped messages | ||
|
||
### logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to name it output_logs
?
Or even better move logs
, timelogs
and counters
into output
section, so that we have only 3 top-level configs: input, output, matchers (chains)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output
section makes sense, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: Sergey Khoroshavin <[email protected]>
98d75dc
to
9cffb43
Compare
Signed-off-by: Sergey Khoroshavin <[email protected]>
d694e6c
to
76687f4
Compare
filename: output.log | ||
pattern: <timestamp> | <node> | <source> | <func> | <message> | ||
merge_nodes: yes | ||
state_trie: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why state_trie
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashcherbakov this is a leftover from debugging session when I found incorrect state trie condition while analyzing logs from INDY-1180, will remove
Signed-off-by: Sergey Khoroshavin <[email protected]>
Only suggestion - add more example/predefined configs |
@dsurnin main problem with examples is my lack of experience with plenum, hope to catch up this soon |
test this please |
2 similar comments
test this please |
test this please |
Signed-off-by: Sergey Khoroshavin [email protected]