discoverhostparams.py 文件源码

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

项目:nagios-plugins-gluster 作者: gluster 项目源码 文件源码
def discoverhostparams():
    command_host_name = utils.hostnameCmdPath.cmd
    result_dict = {}
    resultString = ""

    hostname = commands.getoutput(command_host_name)
    result_dict['hostname'] = hostname
    resultString = json.dumps(result_dict)
    print resultString
    sys.exit(utils.PluginStatusCode.OK)


###
# This plugin discovers all the host specific parameters
# Currently it gets only the hostname from the node
# but when we add support for discovering physical
# components like cpu,network,disk etc, all those will be
# addded as part of this module
###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号