Hi,

unfortunately I still can't reproduce your problem on recent Graylog2 
versions.

One thing: You should use an Accept header instead of Content-Type in your 
HTTP request.

Please also run the following query against your Elasticsearch cluster 
directly and check if it returns any errors:

{"from":0,"size":150,"query":{"query_string":{"query":"cluster:bugatti","allow_leading_wildcard":false}},"post_filter":{"range":{"timestamp":{"from":"2014-10-07
 
10:14:19.893","to":"2014-10-14 
10:14:19.893","include_lower":true,"include_upper":true}}},"sort":[{"timestamp":{"order":"desc"}}]}



Cheers,
Jochen


Am Freitag, 10. Oktober 2014 22:29:04 UTC+2 schrieb Mave Zero:
>
> Hello,
>
> What I have now is only for testing, I have:
>
> <?php
>
> $restUrl = 
> "http://{graylog2ip}:12900/search/universal/keyword?query=cluster%3Abugatti&keyword=1%20week%20ago";;
> $restApiUser = "username";
> $restApiPass = "password";
>
> $url = $restUrl;
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, $url);
> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-type: 
> application/json'));
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($ch, CURLOPT_USERPWD, "$restApiUser:$restApiPass");
> curl_setopt($ch, CURLOPT_SSLVERSION, 3);
>
> $result = curl_exec($ch);
> $info = curl_getinfo($ch);
> curl_close($ch);
>
> print_r($result);
>
> ?>
>
> As you can see we use Content type application/json. Things to note: 
> {graylog2ip} just the IP address for graylog2 server, bugatti is the name 
> of the cluster.
>
>
>
> On Thursday, October 9, 2014 5:38:26 AM UTC-5, Jochen Schalanda wrote:
>>
>> Hi,
>>
>> Am Mittwoch, 8. Oktober 2014 23:15:21 UTC+2 schrieb Mave Zero:
>>>
>>> I set up my query correctly with the correct range keyword for my needs 
>>> and press the "Try it out!" button to receive some response info. It gives 
>>> a valid 200 response code with a response body, along with the request URL 
>>> needed to get that information (this I would use for my PHP script).
>>>
>>> The problem, however, is when I attempt to go to that URL I get a blank 
>>> page that says "Uncaught exception! HTTP 500 Internal Server Error".
>>>
>>
>> Unfortunately I couldn't reproduce the error you've mentioned with 
>> Graylog2 0.90.0, 0.91.0-rc.1, or the current development version 
>> (0.92.0-SNAPSHOT).
>>
>> Please provide the actual query (ideally the HTTP request) you are 
>> running against your Graylog2 0.90.0 server so that we can try to fix this.
>>
>>
>> Cheers,
>> Jochen
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"graylog2" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to