def checkAgents(agents):
msg = ""
for key, value in agents.iteritems():
print (key, str(value['status']))
if (str(value['status']) == STATUS_ERROR):
errMsg = "Unable to reach agent " + str(key) + " at " + str(value['host'])
syslog.syslog(syslog.LOG_ERR, errMsg)
msg = msg + errMsg + "\n"
if (msg != ""):
print "Errors found in Flume Agents"
print msg
sendEmail(msg)
return
##################################################################################################
# Function to check whether a flume agent can be contacted using the json rest api
##################################################################################################
评论列表
文章目录