我正在尝试从命令行获取 JIRA 系统信息。我想从仪表板监控 Java VM 内存统计信息。
我知道 JIRA CLI,但是,没有看到任何可以帮助我的选项。
有什么建议么?
我正在尝试从命令行获取 JIRA 系统信息。我想从仪表板监控 Java VM 内存统计信息。
我知道 JIRA CLI,但是,没有看到任何可以帮助我的选项。
有什么建议么?
我会使用 jira-python 和 server_info 方法,例如
def connect_jira(log, options):
'''
Connect to JIRA. Prompt for a password if none was specified.
Return None on error
'''
try:
log.info("Connecting to JIRA: %s" % options.jira_server)
jira_options = {'server': options.jira_server}
if options.jira_password:
jira_password = options.jira_password
else:
jira_password = getpass.getpass()
jira = JIRA(options=jira_options,
# Note the tuple
basic_auth=(options.jira_user,
jira_password))
# Test the connection by retrieving server information
info = jira.server_info()
return jira
except Exception,e:
log.error("Failed to connect to JIRA: %s" % e)
return None