I'm trying to configure Check_MK 1.2.8p20 (multisite-enabled) to work with BI notifications. I've set up the service account, have my aggregations working, but, upon check, I receive:
ERROR: Invalid json response (invalid syntax (<string>, line 1)): <!DOCTYPE HTML>
The long output produced by the agg check is the HTML for the login page as follows:
<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;output_format=python&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 - © <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>
EDIT - ADDITIONAL NOTES Changed to form-based authentication, and login is still "successful", but now receiving:
ERROR: Aggregation "aggname" does not exist or user is not permitted
I've found very little documentation on the BI notifications, and am curious if someone has gotten this working properly.
Thank you
I managed to get this working after configuring a user with an automation secret.
$ /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