- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4
Closed
Description
I've set up the Datadog agent on the live demo server.
I was wondering if I could get stats like this: https://www.gbitt.info/ just by reading the tracker logs.
Tracker container logs are like this:
2024-05-01T11:11:10.589204437+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=CONNECT transaction_id=118298604 request_id=7155d244-7cee-4198-9f28-4f79abb814b0
2024-05-01T11:11:10.589230565+00:00 [UDP TRACKER][INFO] response; server_socket_addr=0.0.0.0:6969 transaction_id=118298604 request_id=7155d244-7cee-4198-9f28-4f79abb814b0 latency_ms=0
2024-05-01T11:11:10.589277302+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=ANNOUNCE transaction_id=-729896705 request_id=86ab66b1-eb0b-44a5-977d-9d6acea187ca connection_id=2422797340181704759 info_hash=f9e2e57e28d1f1751d12c5134cc07acc5ea1c8d3
2024-05-01T11:11:10.589388497+00:00 [UDP TRACKER][INFO] response; server_socket_addr=0.0.0.0:6969 transaction_id=-729896705 request_id=86ab66b1-eb0b-44a5-977d-9d6acea187ca latency_ms=0
2024-05-01T11:11:10.589438930+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=CONNECT transaction_id=1989992304 request_id=5d7d727a-747e-4c69-8c38-69fb3a129e08
2024-05-01T11:11:10.589459868+00:00 [UDP TRACKER][INFO] response; server_socket_addr=0.0.0.0:6969 transaction_id=1989992304 request_id=5d7d727a-747e-4c69-8c38-69fb3a129e08 latency_ms=0
2024-05-01T11:11:10.589500016+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=CONNECT transaction_id=-1023867975 request_id=e958aa80-3536-4d1a-a752-9eb7f34f0b02
2024-05-01T11:11:10.589521650+00:00 [UDP TRACKER][INFO] response; server_socket_addr=0.0.0.0:6969 transaction_id=-1023867975 request_id=e958aa80-3536-4d1a-a752-9eb7f34f0b02 latency_ms=0
2024-05-01T11:11:10.594604650+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=ANNOUNCE transaction_id=-2091328113 request_id=4d30ae3a-333e-4340-8c1c-9d1cf6dbcb72 connection_id=-1149187464163498899 info_hash=7c6ceedc426c57400f718a2e01c563372a24e2d3
2024-05-01T11:11:10.595446286+00:00 [UDP TRACKER][INFO] response; server_socket_addr=0.0.0.0:6969 transaction_id=-2091328113 request_id=4d30ae3a-333e-4340-8c1c-9d1cf6dbcb72 latency_ms=2
2024-05-01T11:11:10.598630754+00:00 [UDP TRACKER][INFO] request; server_socket_addr=0.0.0.0:6969 action=CONNECT transaction_id=-2081178795 request_id=b6570344-1b1b-4446-ab5a-61388e22701e
In the end, it was very easy. I only needed to install the Datalog agent and add support for docker and I was able to get a graph with the UDP announce requests per second:
Commands
Some datadog commands:
- Start: sudo systemctl stop datadog-agent
- Stop: sudo systemctl start datadog-agent
- Add dd-agent to the docker group to enable the docker support, run: sudo usermod -a -G docker dd-agent
Links
- https://docs.datadoghq.com/agent/basic_agent_usage/ubuntu/?tab=agentv6v7
- https://docs.datadoghq.com/logs/
Disclaimer
WARNING: Datalog collects a lot of client data (like IPs). The live demo is not intended to be used in production environments. Don't use it if you are concerned about privacy. This demo helps us to improve the system in terms of performance, scalability and stability.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done
