웹 사이트의 연결 로그에 대한 그래프를 작성 중입니다. 로그는 logstash에 의해 구문 분석되고 elasticsearch를 통해 제공됩니다.elasticsearch에서 데이터를 요청할 수 없습니다.
저는 그래프를 발전 시켰으며, 걸출하고 힘들지는 않지만 작동합니다.
금요일 나는 elasticsearch를 시작했으며, 쿼리를 보낼 때 데이터를 가져 오기 위해 작성한 모든 스크립트가 실패합니다.
필자가 생각한 첫 번째 생각은 내가 어떻게 든 쿼리를 수정했기 때문에 그것을 인쇄하여 elasticsearch (플러그인 헤드 포함)로 보냈다. 쿼리는 괜찮 았고 결과가 있습니다.
logstash 및 elasticsearch에서 로그 삭제를 시도하고 알려진 양호한 데이터에서 피드를 재시작하는 중 ... 수정하지 않았습니다.
구성에 오류가 있는지 확인하고, 작동중인 백업을 사용했는지, 작동하지 않는지 확인하려고했습니다.
으로 마지막 희망, 나는 PHP 오류를 인쇄했는데, 나는 깊은 elasticsearch의 내부에서 던져진 예외 어떻게해야합니까 :
Fatal error: Uncaught exception 'Guzzle\Http\Exception\ServerErrorResponseException' with message 'Server error response [status code] 500 [reason phrase]
Internal Server Error [url] http://localhost:9200/empreinte_index/mobile/_search' in /home/empreinte/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:43
Stack trace:
#0 /home/empreinte/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response))
#1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /home/empreinte/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /home/empreinte/vendor/symfony/event-dispatcher/Symfony in /home/empreinte/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/GuzzleConnection.php on line 238
그래서이 내 코드는 괜찮 아이디어를 위로하는 것 같다,하지만 난 내가 잘못했거나 찾을 곳을 찾을 수 없습니다. 출력 "일수는 ..."및 PHP 경우 예외 설정
<?php
echo "Days";
require '/home/empreinte/vendor/autoload.php';
$client = new Elasticsearch\Client();
$Query['index'] = 'empreinte_index';
$Query['type'] = 'web';
echo ".";
//Building the timeframe needed. For brevity, using hardcoded data.
$timeframe = "{"from" : "1404165600", "to" : "1404252000" },{"from" : "1404252000", "to" : "1404338400" }";
echo ".";
$Query['body']='
{
"aggs" :
{
"temps" :
{
"range" :
{
"field" : "time",
"ranges" : ['.$timeframe.']
},
"aggs" :
{
"new_users" :
{
"terms" :
{
"field" : "is_newuser"
}
}
}
}
}
}';
echo ".";
$result = $client->search($Query);
//Parse the data to get them in usable form for graphs
echo "OK</br>";
?>
그것을 표시 : 여기
제가 사용하는 스크립트의 최소한의 예이다.(요청하면 구성 파일과 일부 로그를 게시합니다).
어떻게 해결할 수 있습니까? 수정 프로그램을 찾을 수있는 유사한 오류는 어디에서 찾을 수 있습니까? 오류 란 무엇을 의미합니까?