+ if not fbpcu.test_is_ok() and \
+ not found_within(recent_actions, 'pcuerror_notice', 3.0):
+
+ args = {}
+ if fbpcu:
+ args['pcu_name'] = fbpcu.pcu_name()
+ args['pcu_errors'] = fbpcu.pcu_errors()
+ else:
+ args['pcu_name'] = "error looking up pcu name"
+ args['pcu_errors'] = ""
+
+ args['hostname'] = host
+ sitehist.sendMessage('pcuerror_notice', **args)
+ print "send message for host %s PCU Failure" % host
+