我最近将我的ELK堆栈重新安装到云服务器而不是本地机箱,而且我遇到了一些与Kibana有关的问题。
所有内容都设置正确,我的索引是从Elasticsearch创建的(您可以使用 <script>
/*I moved your javascript above the form because the code has to exist before you assign the onClick function!
*/
function newDel() {
var zipVal = document.getElementById('zipcode').value;
var firstname = document.getElementById('firstname');
var lastname = document.getElementById('lastname');
var streetAddress = document.getElementById('address');
var email = document.getElementById('emailaddress');
if(zipVal == ""){
alert("Please provide a zip code.");
return false;
} else {
//Now call your zipCalc() function:
zipCalc(zipVal);
}
}
function zipCalc(zip) {
if (zip == 32231) {
alert("Delivery fee will be 2 dollars.");
}
}
</script>
<form action="#" method="post" id="delInfo">
Zip Code:<br>
<input type="text" name="zipcode" id="zipcode"><br>
<p><i>Delivery fee will be calculated based on zip code</i><p>
First Name:<br>
<input type="text" name="firstname" id="firstname"></br>
Last Name:<br>
<input type="text" name="streetaddress" id="lastname"></br>
Street Address:<br>
<input type="text" name="zipcode" id="address"></br>
Email Address:<br>
<input type="text" name="email"></br>
<input type="submit" onClick="newDel()" value="Submit">
</form>
命令查看它们.Kibana 是显示的索引。
这是我第一次来到Kibana时发生的事情:
答案 0 :(得分:0)
您使用的是反向代理吗?
在使用nginx时我遇到了一个非常类似的错误,直到我找到了工作配置。请参阅下面的工作nginx配置,可以帮助您。根据使用的版本和配置,您可能需要不同的重写。
worker_processes 1; events { worker_connections 1024; } http { server { listen 80; server_name localhost; # redirect / location = / { rewrite ^ /_plugin/kibana/ redirect; } location / { proxy_pass https://<es-domain-url>.es.amazonaws.com; proxy_http_version 1.1; proxy_set_header Authorization ""; proxy_hide_header Authorization; proxy_set_header X-Forwarded-Proto $scheme; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/htpasswd.users; } } }