Last active
March 8, 2018 02:04
-
-
Save srkiNZ84/9044e06b605fd6459f657374e52bd17c to your computer and use it in GitHub Desktop.
Simple python script to parse AWS ELB logs and look for HTTP 503 responses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
logLines = sys.stdin.readlines() | |
for line in logLines: | |
#print("line is: " + line) | |
tokens = line.split(" ") | |
#print("elb status code: " + tokens[8]) | |
if(tokens[8].startswith("5")): | |
print("Found HTTP 5XX") | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment