Lol, StackOverflow is probably a better forum for questions like these.
So you want the report to include unique (srcip, dstip) and a count for disallowed actions? Agreed that something like a python script is going to be the easiest thing. It's probably possible to do it in awk, but I certainly couldn't tell you how off the top of my head. Perhaps something like this (untested):
from collections import defaultdict
disallowed_count = defaultdict(int) # new entries in the dicitonary initialize the count at 0
with open('input.log', 'r') as f:
for line in f:
src, dst, action = None, None, None
for keyvalue in line.split():
key, _, value = keyvalue.partition('=')
if key == 'srcip':
src = value
elif key == 'dstip':
dst = value
elif key == 'action':
action = value
if src and dst and action and action == '!allow':
disallowed_count[(src, dst)] += 1
for (src, dst), count in disallowed_count.items():
print(src, dst, count)