You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Krisztian Kasa (JIRA)" <ji...@apache.org> on 2018/07/24 08:03:00 UTC
[jira] [Created] (AMBARI-24343) [LogSearch] Wrong (error) response
format
Krisztian Kasa created AMBARI-24343:
---------------------------------------
Summary: [LogSearch] Wrong (error) response format
Key: AMBARI-24343
URL: https://issues.apache.org/jira/browse/AMBARI-24343
Project: Ambari
Issue Type: Bug
Components: ambari-logsearch
Affects Versions: 2.7.1
Reporter: Krisztian Kasa
Assignee: Krisztian Kasa
Fix For: 2.7.1
When I call the
{noformat}
/shipper/input/\{clusterName}/services/\{serviceName}
{noformat}
api endpoint with wrong json schema the backend responses with plain text body instead of json or empty body.
For example:
{code:json}
{
"input": [
{
"type": "zookeeper",
"rowtype": "service",
"path": "/var/log/zookeeper/zookeeper*.log"
}
],
"filter": [
{
"filter": "grok",
"conditions": {
"fieldss": {
"type": [
"zookeeper"
]
}
},
"skipOnError": false,
"deepExtract": false,
"post_map_values": {
"logtime": [
{
"map_date": {
"target_date_pattern": "yyyy-MM-dd HH:mm:ss,SSS"
}
}
]
},
"log4j_format": "%d\{ISO8601} - %-5p [%t:%C\{1}@%L] - %m%n",
"multiline_pattern": "^(%\{TIMESTAMP_ISO8601:logtime})",
"message_pattern": "(?m)^%\{TIMESTAMP_ISO8601:logtime}%\{SPACE}-%\{SPACE}%\{LOGLEVEL:level}%\{SPACE}\\[%\{DATA:thread_name}\\@%\{INT:line_number}\\]%\{SPACE}-%\{SPACE}%\{GREEDYDATA:log_message}"
}
]
}
{code}
Where the `fieldss` is not a valid JSON key.
The response plain text body:
{code:javascript}
Unrecognized field "fieldss" (class org.apache.ambari.logsearch.model.common.LSServerConditions), not marked as ignorable (one known property: "fields"])
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: org.apache.ambari.logsearch.model.common.LSServerInputConfig["filter"]->org.apache.ambari.logsearch.model.common.LSServerFilterGrok["conditions"]->org.apache.ambari.logsearch.model.common.LSServerConditions["fieldss"])
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)