4545. [func] Make dnstap-read output more functionally usable.

[RT #43642]

4544.	[func]		Add message/payload size to dnstap-read YAML output.
			[RT #43622]
This commit is contained in:
wpk
2016-12-28 10:06:40 +01:00
parent 6f94747270
commit e910d18007
10 changed files with 625 additions and 120 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/python
try:
import yaml
except:
print "I: No python yaml module, skipping"
exit(1)
import subprocess
import pprint
import sys
DNSTAP_READ=sys.argv[1]
DATAFILE=sys.argv[2]
f = subprocess.Popen([DNSTAP_READ, '-y', DATAFILE], stdout=subprocess.PIPE)
pprint.pprint([l for l in yaml.load_all(f.stdout)])