#!/usr/bin/env python

import socket
import sys

# hacks to pickup correct graphs, due to local hosts and ganglia name mismatch
if sys.argv[1] in ['ip-10-54-182-112.eu-west-1.compute.internal', 'ip-10-236-86-54.eu-west-1.compute.internal', 'ip-10-250-157-37.eu-west-1.compute.internal', 'ip-10-53-54-49.eu-west-1.compute.internal']:
        print sys.argv[1]
        exit(0)
try:
        print socket.gethostbyaddr(sys.argv[1])[0]
except:
        print sys.argv[1]

@@ -42,16 +42,224 @@
 rt sys%0A%0A
+# hack for the change to whitehalls host not being done correctly%0Aif sys.argv%5B1%5D == %22ip-10-229-67-207.eu-west-1.compute.internal%22:%0A        print %22ip-10-224-50-207.eu-west-1.compute.internal%22%0A        exit(0)%0A%0A
 # hacks 

fix for the whitehall host mismatch, to makesure nagios can find the ganglia graphs for that host