-
Notifications
You must be signed in to change notification settings - Fork 46
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
Tracker Checker: console command to run tracker checks #637
Comments
If you want to check the live demo you can use this configuration: {
"udp_trackers": [
"144.126.245.19:6969"
],
"http_trackers": [
"https://tracker.torrust-demo.com"
],
"health_checks": [
"https://tracker.torrust-demo.com/api/health_check"
]
} cargo run --bin tracker_checker -- --config-path "./tracker_checker.json" NOTICE: the The current output is: |
You can also run it without creating the config file with: TORRUST_CHECKER_CONFIG='{
"udp_trackers": ["144.126.245.19:6969"],
"http_trackers": ["https://tracker.torrust-demo.com"],
"health_checks": ["https://tracker.torrust-demo.com/api/health_check"]
}' cargo run --bin tracker_checker |
The Tracker Checher does not work with trackers that respond with other fields. For example, this won't work: TORRUST_CHECKER_CONFIG='{
"udp_trackers": ["104.21.73.163:80"],
"http_trackers": ["https://tracker.gbitt.info:443"],
"health_checks": []
}' cargo run --bin tracker_checker This is the tracker: https://www.gbitt.info/ Probably the announce and scrape responses have more fields than the one we deserialize. Running checks for trackers ...
UDP trackers ...
✓ - UDP tracker at udp://104.21.73.163:80 is OK (TODO)
HTTP trackers ...
✗ - Announce at https://tracker.gbitt.info/ is failing
thread 'main' panicked at src/shared/bit_torrent/tracker/http/client/responses/scrape.rs:33:46:
provided bytes should be a valid bencoded response: EndOfStream
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
You can run the checker for the local env or live demo. Local dev envCommand: TORRUST_CHECKER_CONFIG='{
"udp_trackers": ["127.0.0.1:6969"],
"http_trackers": ["http://127.0.0.1:7070"],
"health_checks": ["http://127.0.0.1:1313/health_check"]
}' cargo run --bin tracker_checker Output: Running checks for trackers ...
UDP trackers ...
✓ - Announce at 127.0.0.1:6969 is OK
✓ - Announce at 127.0.0.1:6969 is OK
HTTP trackers ...
✓ - Announce at http://127.0.0.1:7070/ is OK
✓ - Scrape at http://127.0.0.1:7070/ is OK
Health checks ...
✓ - Health API at http://127.0.0.1:1313/health_check is OK Live demoCommand: TORRUST_CHECKER_CONFIG='{
"udp_trackers": ["144.126.245.19:6969"],
"http_trackers": ["https://tracker.torrust-demo.com"],
"health_checks": ["https://tracker.torrust-demo.com/health_check"]
}' cargo run --bin tracker_checker Output: Running checks for trackers ...
UDP trackers ...
✓ - Announce at 144.126.245.19:6969 is OK
✓ - Announce at 144.126.245.19:6969 is OK
HTTP trackers ...
✓ - Announce at https://tracker.torrust-demo.com/ is OK
✓ - Scrape at https://tracker.torrust-demo.com/ is OK
Health checks ...
✓ - Health API at https://tracker.torrust-demo.com/health_check is OK |
Parent issue: #620
Console command that runs some checks against live running trackers. It would be used for:
It can be run with the following alternatives:
And you can pass a list of services to check in the configuration:
For UDP and HTTP trackers it will make an announce and scrape requests.
Subtasks
The text was updated successfully, but these errors were encountered: