Hello all,
I have a script that will execute at a Unix serve
curl -X POST "htt..xxxxx/xxxxx*/_search?pretty=" -H 'authorization: Basic xxxxxxxx' -H 'content-type: application/json' -d '{
"aggs": {
"2": {
"terms": {
"field": "app.name.keyword",
"order": {
"_count": "desc"
},
"size": 10000
},
"aggs": {
"3": {
"terms": {
"field": "apiproxy.name.keyword",
"order": {
"_count": "desc"
},
"size": 10000
},
"aggs": {
"4": {
"filters": {
"filters": {
"message.status.code >299 and message.status.code <499 and NOT message.status.code =429": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"range": {
"message.status.code": {
"gt": 299
}
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"range": {
"message.status.code": {
"lt": 499
}
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"must_not": {
"multi_match": {
"type": "best_fields",
"query": "message.status.code =429",
"lenient": true
}
}
}
}
]
}
}
]
}
}
],
"should": [],
"must_not": []
}
},
"message.status.code <299": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"should": [
{
"range": {
"message.status.code": {
"lt": 299
}
}
}
],
"minimum_should_match": 1
}
}
],
"should": [],
"must_not": []
}
},
"message.status.code >499": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"should": [
{
"range": {
"message.status.code": {
"gt": 499
}
}
}
],
"minimum_should_match": 1
}
}
],
"should": [],
"must_not": []
}
},
"message.status.code = 429": {
"bool": {
"must": [],
"filter": [
{
"multi_match": {
"type": "best_fields",
"query": "message.status.code = 429",
"lenient": true
}
}
],
"should": [],
"must_not": []
}
}
}
},
"aggs": {
"5": {
"filters": {
"filters": {
"totalLatency > 3000": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"should": [
{
"range": {
"totalLatency": {
"gt": 3000
}
}
}
],
"minimum_should_match": 1
}
}
],
"should": [],
"must_not": []
}
},
"totalLatency < 3000": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"should": [
{
"range": {
"totalLatency": {
"lt": 3000
}
}
}
],
"minimum_should_match": 1
}
}
],
"should": [],
"must_not": []
}
}
}
}
}
}
}
}
}
}
}
},
"size": 0,
"_source": {
"excludes": []
},
"stored_fields": [
"*"
],
"script_fields": {},
"docvalue_fields": [
{
"field": "client.received.start.datetime",
"format": "date_time"
},
{
"field": "received.datetime",
"format": "date_time"
}
],
"query": {
"bool": {
"must": [],
"filter": [
{
"match_all": {}
},
{
"match_all": {}
},
{
"range": {
"client.received.start.datetime": {
"format": "strict_date_optional_time",
"gte": "2024-01-03T12:17:55.095Z",
"lte": "2024-01-03T12:32:55.095Z"
}
}
}
],
"should": [],
"must_not": []
}
}
}'
but the curl ht…://xxxx/onlineapigeecampinasprod*/_search?pretty= they send me to a page with a kibana response how i change this?
by the end i want to extract kibana logs