check_node_status.py 文件源码

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

项目:Cassandra-Automation-Scripts 作者: c446984928 项目源码 文件源码
def check_node_status():
    try:
        b = commands.getoutput(PATH)
        logging.info(b)
        if "DN" in b or "Status=Up/Down" not in b:
            if read_flag() == 'normal':
                write_flag('abnormal')
                send_mail_tool(b)
            elif read_flag() == 'abnormal':
                pass
            else:
                write_flag('abnormal')
                send_mail_tool(b)

        else:
            write_flag('normal')

    except:
        send_mail_tool("Check node status error!")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号