Skip to content

Instantly share code, notes, and snippets.

[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
@NickStallman
NickStallman / dd-pure-ftpd.py
Created July 31, 2017 23:39
DataDog Log Parser for Pure-FTPd
import time
from datetime import datetime
def parse_pureftpd(logger, line):
# Split the line into fields
time, unique, username, ip, direction, bytes, duration, filename = line.split(' ')
attr_dict = {"username": username, "metric_type": "counter"}
return ('pure-ftpd.uploads', time, 1, attr_dict)