Skip to content

Instantly share code, notes, and snippets.

@corenting
Created July 8, 2019 13:08
Show Gist options
  • Save corenting/edbc0110621bd1331d4e49698b6ed25f to your computer and use it in GitHub Desktop.
Save corenting/edbc0110621bd1331d4e49698b6ed25f to your computer and use it in GitHub Desktop.
CLI statsd debug server - needs Python3
#!/usr/bin/env python3
# encoding: utf-8
import datetime
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 8125
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
while True:
data, addr = sock.recvfrom(1024)
print(datetime.datetime.now(), data)
@corenting
Copy link
Author

See https://github.com/corenting/cookies for a rewrite in Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment