Skip to content

Instantly share code, notes, and snippets.

@negz
Created February 15, 2017 17:21
Show Gist options
  • Save negz/64ad6692217eb7a1fb9937339439ba60 to your computer and use it in GitHub Desktop.
Save negz/64ad6692217eb7a1fb9937339439ba60 to your computer and use it in GitHub Desktop.
Log audit script
import json
json_lines = [json.loads(line) for line in open("sumo.json", "r").readlines()]
for line in json_lines:
host = line.get("host")
if host is None:
print "Line missing host key"
if host == "":
print "Line has empty host key"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment