Closed felipeavilis closed 1 year ago
Hi! I'm getting this annoyng error after configure API Proxy and Logstash. I'll post here the Logstash log:
{"log":"{\n","stream":"stdout","time":"2023-01-21T01:02:48.312441382Z"} {"log":" \"apigeeTimestamp\" =\u003e \"Sat Jan 21 01:02:48 UTC 2023\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312477582Z"} {"log":" \"port\" =\u003e 34064,\n","stream":"stdout","time":"2023-01-21T01:02:48.312482982Z"} {"log":" \"type\" =\u003e \"syslog\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312486482Z"} {"log":" \"@timestamp\" =\u003e 2023-01-21T01:02:48.197Z,\n","stream":"stdout","time":"2023-01-21T01:02:48.312489982Z"} {"log":" \"@version\" =\u003e \"1\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312493483Z"} {"log":" \"message\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312496983Z"} {"log":" \"proxy\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312500183Z"} {"log":" \"name\" =\u003e \"hello-world-elk-logging\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312503383Z"} {"log":" \"basepath\" =\u003e \"/v1/hello-world-elk-logging\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312506583Z"} {"log":" \"suffix\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312509883Z"} {"log":" \"revision\" =\u003e \"1\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312513083Z"} {"log":" \"clientIP\" =\u003e \"x.x.x.x\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312516183Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312519383Z"} {"log":" \"error\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312522383Z"} {"log":" \"transportMessage\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312525583Z"} {"log":" \"policyErrorPolicyName\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312528783Z"} {"log":" \"content\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312531883Z"} {"log":" \"error\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312534983Z"} {"log":" \"message\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312538183Z"} {"log":" \"isError\" =\u003e \"false\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312541283Z"} {"log":" \"isTargetError\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312544483Z"} {"log":" \"reasonPhrase\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312547583Z"} {"log":" \"statusCode\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312550783Z"} {"log":" \"isPolicyError\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312553883Z"} {"log":" \"state\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312564983Z"} {"log":" \"policyErrorFlowName\" =\u003e \"\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312568483Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312571783Z"} {"log":" \"target\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312574784Z"} {"log":" \"statusCode\" =\u003e \"304\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312578384Z"} {"log":" \"contentLength\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312581784Z"} {"log":" \"basepath\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312584984Z"} {"log":" \"targetURL\" =\u003e \"https://mocktarget.apigee.net/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312588184Z"} {"log":" \"host\" =\u003e \"mocktarget.apigee.net\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312591384Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312594684Z"} {"log":" \"systemTimeStamp\" =\u003e \"2023-1-21T1:2:48.143Z\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312597584Z"} {"log":" \"statusCode\" =\u003e \"304\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312600884Z"} {"log":" \"contentType\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312603984Z"} {"log":" \"path\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312607084Z"} {"log":" \"meta\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312610284Z"} {"log":" \"application\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312613484Z"} {"log":" \"organization\" =\u003e \"seedts\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312616484Z"} {"log":" \"product\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312619584Z"} {"log":" \"env \" =\u003e \"lab\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312622684Z"} {"log":" \"virtualhost\" =\u003e \"default\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312625884Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312629084Z"} {"log":" \"uri\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312632084Z"} {"log":" \"messageId\" =\u003e \"seedts-labs-apigee-v1-13418-24-2\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312635184Z"} {"log":" \"verb\" =\u003e \"GET\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312638384Z"} {"log":" \"contentLength\" =\u003e \"0\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312641584Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312644684Z"} {"log":" \"priority_index\" =\u003e \"14\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312647784Z"} {"log":"}\n","stream":"stdout","time":"2023-01-21T01:02:48.312650984Z"} {"log":"[2023-01-21T01:02:48,318][WARN ][logstash.outputs.elasticsearch][main][2621d1f4ed9cefbeacdfbd3c965d5b1f7fd83400b7ab6e558b7121c7a4174fbf] Could not index event to Elasticsearch. {:status=\u003e400, :action=\u003e[\"index\", {:_id=\u003enil, :_index=\u003e\"apigee-2023.01.21\", :routing=\u003enil, :_type=\u003e\"_doc\"}, #\u003cLogStash::Event:0x5fcc436d\u003e], :response=\u003e{\"index\"=\u003e{\"_index\"=\u003e\"apigee-2023.01.21\", \"_type\"=\u003e\"_doc\", \"_id\"=\u003e\"6vPZ0YUBDX-DBGuld076\", \"status\"=\u003e400, \"error\"=\u003e{\"type\"=\u003e\"mapper_parsing_exception\", \"reason\"=\u003e\"failed to parse field [message] of type [text] in document with id '6vPZ0YUBDX-DBGuld076'. Preview of field's value: '{systemTimeStamp=2023-1-21T1:2:48.143Z, proxy={basepath=/v1/hello-world-elk-logging, clientIP=x.x.x.x, name=hello-world-elk-logging, suffix=, revision=1}, path=/, meta={product=, application=, organization=seedts, env =lab, virtualhost=default}, verb=GET, messageId=seedts-labs-apigee-v1-13418-24-2, contentLength=0, error={transportMessage=, isError=false, policyErrorFlowName=, isPolicyError=0, reasonPhrase=, isTargetError=0, policyErrorPolicyName=, state=, error=, message=, content=, statusCode=}, contentType=, uri=/, target={basepath=/, host=mocktarget.apigee.net, contentLength=0, targetURL=https://mocktarget.apigee.net/, statusCode=304}, statusCode=304}'\", \"caused_by\"=\u003e{\"type\"=\u003e\"illegal_state_exception\", \"reason\"=\u003e\"Can't get text on a START_OBJECT at 1:145\"}}}}}\n","stream":"stdout","time":"2023-01-21T01:02:48.318794459Z"}
I found some discuss in ELK Community but didnt help.
Thanks for helping!
Hi! I'm getting this annoyng error after configure API Proxy and Logstash. I'll post here the Logstash log:
{"log":"{\n","stream":"stdout","time":"2023-01-21T01:02:48.312441382Z"} {"log":" \"apigeeTimestamp\" =\u003e \"Sat Jan 21 01:02:48 UTC 2023\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312477582Z"} {"log":" \"port\" =\u003e 34064,\n","stream":"stdout","time":"2023-01-21T01:02:48.312482982Z"} {"log":" \"type\" =\u003e \"syslog\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312486482Z"} {"log":" \"@timestamp\" =\u003e 2023-01-21T01:02:48.197Z,\n","stream":"stdout","time":"2023-01-21T01:02:48.312489982Z"} {"log":" \"@version\" =\u003e \"1\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312493483Z"} {"log":" \"message\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312496983Z"} {"log":" \"proxy\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312500183Z"} {"log":" \"name\" =\u003e \"hello-world-elk-logging\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312503383Z"} {"log":" \"basepath\" =\u003e \"/v1/hello-world-elk-logging\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312506583Z"} {"log":" \"suffix\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312509883Z"} {"log":" \"revision\" =\u003e \"1\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312513083Z"} {"log":" \"clientIP\" =\u003e \"x.x.x.x\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312516183Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312519383Z"} {"log":" \"error\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312522383Z"} {"log":" \"transportMessage\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312525583Z"} {"log":" \"policyErrorPolicyName\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312528783Z"} {"log":" \"content\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312531883Z"} {"log":" \"error\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312534983Z"} {"log":" \"message\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312538183Z"} {"log":" \"isError\" =\u003e \"false\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312541283Z"} {"log":" \"isTargetError\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312544483Z"} {"log":" \"reasonPhrase\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312547583Z"} {"log":" \"statusCode\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312550783Z"} {"log":" \"isPolicyError\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312553883Z"} {"log":" \"state\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312564983Z"} {"log":" \"policyErrorFlowName\" =\u003e \"\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312568483Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312571783Z"} {"log":" \"target\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312574784Z"} {"log":" \"statusCode\" =\u003e \"304\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312578384Z"} {"log":" \"contentLength\" =\u003e \"0\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312581784Z"} {"log":" \"basepath\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312584984Z"} {"log":" \"targetURL\" =\u003e \"https://mocktarget.apigee.net/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312588184Z"} {"log":" \"host\" =\u003e \"mocktarget.apigee.net\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312591384Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312594684Z"} {"log":" \"systemTimeStamp\" =\u003e \"2023-1-21T1:2:48.143Z\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312597584Z"} {"log":" \"statusCode\" =\u003e \"304\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312600884Z"} {"log":" \"contentType\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312603984Z"} {"log":" \"path\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312607084Z"} {"log":" \"meta\" =\u003e {\n","stream":"stdout","time":"2023-01-21T01:02:48.312610284Z"} {"log":" \"application\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312613484Z"} {"log":" \"organization\" =\u003e \"seedts\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312616484Z"} {"log":" \"product\" =\u003e \"\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312619584Z"} {"log":" \"env \" =\u003e \"lab\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312622684Z"} {"log":" \"virtualhost\" =\u003e \"default\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312625884Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312629084Z"} {"log":" \"uri\" =\u003e \"/\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312632084Z"} {"log":" \"messageId\" =\u003e \"seedts-labs-apigee-v1-13418-24-2\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312635184Z"} {"log":" \"verb\" =\u003e \"GET\",\n","stream":"stdout","time":"2023-01-21T01:02:48.312638384Z"} {"log":" \"contentLength\" =\u003e \"0\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312641584Z"} {"log":" },\n","stream":"stdout","time":"2023-01-21T01:02:48.312644684Z"} {"log":" \"priority_index\" =\u003e \"14\"\n","stream":"stdout","time":"2023-01-21T01:02:48.312647784Z"} {"log":"}\n","stream":"stdout","time":"2023-01-21T01:02:48.312650984Z"} {"log":"[2023-01-21T01:02:48,318][WARN ][logstash.outputs.elasticsearch][main][2621d1f4ed9cefbeacdfbd3c965d5b1f7fd83400b7ab6e558b7121c7a4174fbf] Could not index event to Elasticsearch. {:status=\u003e400, :action=\u003e[\"index\", {:_id=\u003enil, :_index=\u003e\"apigee-2023.01.21\", :routing=\u003enil, :_type=\u003e\"_doc\"}, #\u003cLogStash::Event:0x5fcc436d\u003e], :response=\u003e{\"index\"=\u003e{\"_index\"=\u003e\"apigee-2023.01.21\", \"_type\"=\u003e\"_doc\", \"_id\"=\u003e\"6vPZ0YUBDX-DBGuld076\", \"status\"=\u003e400, \"error\"=\u003e{\"type\"=\u003e\"mapper_parsing_exception\", \"reason\"=\u003e\"failed to parse field [message] of type [text] in document with id '6vPZ0YUBDX-DBGuld076'. Preview of field's value: '{systemTimeStamp=2023-1-21T1:2:48.143Z, proxy={basepath=/v1/hello-world-elk-logging, clientIP=x.x.x.x, name=hello-world-elk-logging, suffix=, revision=1}, path=/, meta={product=, application=, organization=seedts, env =lab, virtualhost=default}, verb=GET, messageId=seedts-labs-apigee-v1-13418-24-2, contentLength=0, error={transportMessage=, isError=false, policyErrorFlowName=, isPolicyError=0, reasonPhrase=, isTargetError=0, policyErrorPolicyName=, state=, error=, message=, content=, statusCode=}, contentType=, uri=/, target={basepath=/, host=mocktarget.apigee.net, contentLength=0, targetURL=https://mocktarget.apigee.net/, statusCode=304}, statusCode=304}'\", \"caused_by\"=\u003e{\"type\"=\u003e\"illegal_state_exception\", \"reason\"=\u003e\"Can't get text on a START_OBJECT at 1:145\"}}}}}\n","stream":"stdout","time":"2023-01-21T01:02:48.318794459Z"}
I found some discuss in ELK Community but didnt help.
Thanks for helping!