-
Notifications
You must be signed in to change notification settings - Fork 0
Add loki logpush via promtail #13
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
Conversation
|
This is unfortunately still not ready -- env expansion in promtail configuration is still not working (on dappnode). This leads to authorization errors: |
This aims to recreate the functionality from shutter-network/shutter-keyper-deployment#10 usable with the DAppnodePackage. Because we can not install the docker loki plugin, and everything is running in one container through supervisord, we need to resort to promtail and some extra log redirections to keep the docker logging working.
|
This is ready now! |
ulope
left a comment
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.
Apart from the question about rotation, LGTM.
shutter/supervisord.conf
Outdated
| autostart = true | ||
| startretries = 9999 ; A large number enough to cover node updates | ||
| autorestart = true |
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.
Env var interpolation should allow to make autostart and autorestart conditional on the SHUTTER_PUSH_METRICS_ENABLED variable
| $SHUTTER_BIN chain --config "$SHUTTER_CHAIN_CONFIG_FILE" | ||
| if [[ SHUTTER_PUSH_LOGS_ENABLED=true ]]; | ||
| then | ||
| $SHUTTER_BIN chain --config "$SHUTTER_CHAIN_CONFIG_FILE" |& rotatelogs -n 1 -e -c /tmp/chain.log 5M |
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.
Does the "rotation" with only one file work correctly with promtail without causing log lines to be missed?
Reading the promtail logs on logrotation suggests it might not.
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.
I saw that documentation, but I could not fully figure out, whether it applies in this case. My assessment was that using a single file would actually work as intended, but now that I re-read your link I am not sure anymore.
Do you have another suggestion how to achieve what we need?:
- redirect output to file AND stdout (to keep docker logging working)
- keep the logfile from growing indefinitely
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.
I've added a comment but decided to leave it like this.
This aims to recreate the functionality from
shutter-network/shutter-keyper-deployment#10 usable with the DAppnodePackage.
Because we can not install the docker loki plugin, and everything is running in one container through supervisord, we need to resort to promtail and some extra log redirections to keep the docker logging working.
Fixes #10