check_flume.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:flume-view 作者: screamingweasel 项目源码 文件源码
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
##################################################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号