Skip to content

Conversation

@blockchainluffy
Copy link
Contributor

No description provided.

@blockchainluffy blockchainluffy requested a review from ulope March 17, 2025 07:19
@blockchainluffy blockchainluffy self-assigned this Mar 17, 2025
README.md Outdated

### To run with pushing logs to loki
```
docker compose -f docker-compose.yml -f docker-compose.loki.yml up

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update docker-compose to conditionally enable logging when an environment variable is set (PUSH_LOGS_ENABLED), similar to how we handle push metrics? This way, users can continue using docker compose up -d to run the keyper without additional flags, while still having the option to enable logging when needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I was also striving for that, but as options are different for different logging drivers, it makes it very complicated. Also ternary operators are not supported for logging configuration in compose file.

# Replace <USERNAME> and <API_KEY> above with the credentials you receive.
# Multiple targets and their credentials can be specified by separating them with a comma.

## Push Logging ##

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to move this installation step under Software requirements, and then perhaps again before running docker compose up (and before updating) in the readme, so users know they should be installing the driver if they want to enable logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated readme

README.md Outdated
- Define the target(s) for the pushgateway with `PUSHGATEWAY_URL` (multiple targets can be separated by commas).

The default value points to a pushgateway operated by the Shutter Network team. To gain access please ask for credentials in the Shutter Network Discourse forum.
- Logging (optional):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please fix the indentation here to be at the same level as the metrics one? Thank you.

README.md Outdated
The default value points to a pushgateway operated by the Shutter Network team. To gain access please ask for credentials in the Shutter Network Discourse forum.
- Logging (optional):
- To push logs to loki/vmlogs server, use the `docker-compose.loki.yml` file, which overrides logging.
- Define the url for the server to push metrics to, with `LOKI_URL`. Default value points to the logging server operated by Shutter Network Team.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add here that they should add their credentials in the URL here as well, and that they would also need to request these credentials in the Shutter Network Forum?

@ylembachar ylembachar linked an issue Mar 18, 2025 that may be closed by this pull request
Copy link

@konradkonrad konradkonrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some suggestions, where I thought, they could help understanding. But it should work even without these.

Co-authored-by: konradkonrad <konradkonrad@users.noreply.github.com>
@ylembachar ylembachar merged commit 86820e7 into shutter-api Mar 18, 2025
konradkonrad added a commit to shutter-network/DAppnodePackage-shutter-api that referenced this pull request Apr 8, 2025
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.
konradkonrad added a commit to shutter-network/DAppnodePackage-shutter-api that referenced this pull request Apr 8, 2025
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.
konradkonrad added a commit to shutter-network/DAppnodePackage-shutter-api that referenced this pull request Apr 8, 2025
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.
konradkonrad added a commit to shutter-network/DAppnodePackage-shutter-api that referenced this pull request Apr 10, 2025
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.
konradkonrad added a commit to shutter-network/DAppnodePackage-shutter-api that referenced this pull request Apr 14, 2025
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.
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.

Enable pushing logs for Shutter API Keypers

4 participants