-
Notifications
You must be signed in to change notification settings - Fork 19
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
chore: update filebeat templates to support drive from file and tenderdash only on logs nodes #581
Conversation
While testing this I noticed that drive writes slightly different timestamps to different log files:
|
@@ -0,0 +1,24 @@ | |||
--- | |||
|
|||
platform_filebeat_inputs: |
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.
tenderdash
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.
If we name the top level of the filebeat templates like core_filebeat_inputs
, tenderdash_filebeat_inputs
, etc., it will result in more conditional logic to handle seed nodes because you cannot merge with an undefined variable, and we cannot initialize variables due to precedence rules. So we would either need an extra step to rename the top level of tenderdash_filebeat_inputs
, or three final merge steps, depending on if we are running on a masternode, seed node or evonode.
For this reason I think it is less confusing to give the top level of the partial filebeat template we are merging into a predictable name that we can then reference in following steps, eventually merging everything into filebeat_inputs
, which is directly ready for consumption by the geerlingguy.filebeat
role.
I remember struggling with this a lot when I first wrote the templates.
file: drive.yml | ||
when: drive_host_info.containers | length > 0 | ||
|
||
- name: Merge drive and tenderdash input configs |
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.
You can define empty definitions at the top. Then conditionally overwrite each one with actual data and bellow merge all three without any conditions
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 won't work because set_fact
has higher precedence than include_vars
, so the variable definition will still be empty when we try to merge.
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.
LGTM (after explained on call)
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.
👍
Issue being fixed or feature implemented
Filebeat needs to support the following new configs:
drive-json.log
on dashmate-managed evonodesWhat was done?
tenderdash.log
is not available on seed nodesHow Has This Been Tested?
On testnet hp-masternode-10
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only