check_mk BI 通知

check_mk BI 通知

我正在尝试配置 Check_MK 1.2.8p20(启用多站点)以使用 BI 通知。我已经设置了服务帐户,并使聚合正常运行,但检查后,我收到:

ERROR: Invalid json response (invalid syntax (<string>, line 1)): <!DOCTYPE HTML>

agg 检查产生的长输出是登录页面的 HTML,如下所示:

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
<title>Check_MK Multisite Login</title>
<link rel="stylesheet" type="text/css" href="check_mk-1.2.8p20.css" />
<link rel="stylesheet" type="text/css" href="pages-1.2.8p20.css" />
<link rel="stylesheet" type="text/css" href="login-1.2.8p20.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-1.2.8p20.css" />
<![endif]-->
<script type="text/javascript" src="js/checkmk_min-1.2.8p20.js"></script>
</head>
<body class="main"><script language="javascript">
if(top != self) {
window.top.location.href = location;
}
</script>
<div id="login">
<img id="login_window" src="images/login_window.png" />
<div id="version">1.2.8p20</div>
<form id="form_login" name="login" class="login" action="login.py" method="POST" enctype="multipart/form-data">
<input type="hidden" name="filled_in" value="login" /><input type="hidden" name="_login" value="1" /><input type="hidden" name="_origtarget" value="view.py?aggr_name=THN_Status&amp;amp;output_format=python&amp;amp;view_name=aggr_single_api" /><label id="label_user" class="legend" for="_username">Username:</label>       <br />
<input type="text" class="text" value="" name="_username" id="input_user" />
<label id="label_pass" class="legend" for="_password">Password:</label><br />
<input type="password" class="text" value="" name="_password" id="input_pass" />
<div id="button_text"><label for="_login" class="image_button"><input onfocus="if (this.blur) this.blur();" type="submit" name="_login" id="_login" value="Login" class="" />
</label></div>
<div id="foot">Version: 1.2.8p20 - &copy; <a href="http://mathias-kettner.de>Mathias Kettner</a><br /><br />You can use, modify and distribute Check_MK under the terms of the <a href="http://mathias-kettner.de/gpl.html>GNU GPL Version 2</a>.</div>
</form>
</div>
<script language="javascript" type="text/javascript">
<!--
if (document.login._username) { document.login._username.focus();
document.login._username.select();
}
// -->
</script>
</body></html>

编辑-附加说明 更改为基于表单的身份验证,登录仍然“成功”,但现在收到:

ERROR: Aggregation "aggname" does not exist or user is not permitted

我发现关于 BI 通知的文档很少,并且很好奇是否有人能够使其正常运行。

谢谢

答案1

在为用户配置了自动化密钥后,我设法让它正常工作。

$ /opt/omd/versions/1.2.8p25.cre/lib/nagios/plugins/check_bi_aggr -b http://localhost:5000/mva/ -a Loadbalancers -u automation -s TWFSNMHLHWEARRMYMHHV Aggregation state is OK

相关内容