Skip to content
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

Add log streamer #46

Merged
merged 4 commits into from
Oct 21, 2022
Merged

Conversation

gabriel-samfira
Copy link
Member

This is a quality of life change that allows the operator to stream logs via web sockets. To enable this feature, you'll need to add:

[default]
# Enable streaming logs via web sockets. Use garm-cli debug-log.
enable_log_streamer = true

to your config file and restart garm.

After that, you can stream logs using garm-cli debug-log:

ubuntu@garm:/tmp$ garm-cli debug-log
2022/10/21 08:41:41 connecting to wss://webhooks.samfira.com/api/v1/ws
2022/10/21 08:41:41 10.198.117.1 - - [21/Oct/2022:08:41:41 +0000] "GET /api/v1/ws HTTP/1.1" 200 0 "" "Go-http-client/1.1"
2022/10/21 08:43:39 10.198.117.1 - - [21/Oct/2022:08:43:39 +0000] "GET /api/v1/instances HTTP/1.0" 200 773 "" "go-resty/2.7.0 (https://github.com/go-resty/resty)"

@gabriel-samfira gabriel-samfira merged commit 3247065 into cloudbase:main Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant