Can't disable logstash.codecs.json logging

Logstash 6.3

I am trying to disable logging from the port 9600 and seems to reject every value though I can change other loggers just not
logstash.codecs.json

"error" : "unrecognized option [logstash.codecs.json]"


Details below

I am using the INPUT UDP with a Codec of JSON,

input {
  udp {
    id => "udp-5514-XXXXXX"
    host => "0.0.0.0"  
    port => 5514      
    type => "microservices" # what kinds of logs are coming in
    codec => "json"
    tags => ["udp","microservice"]
            buffer_size => 10240000
            receive_buffer_bytes => 1024000
            workers => 1
  }
}

Unfortunately I can not use the JSON Filter because UDP will sometime merge those objects and make invalid JSON.

My problem is that Every time the codec received a non-json data it outputs an ERROR, which is filling up my file system

Unfortately it will not be easy for us to fix what is coming in.

So I tried disabling the Codec logging but it produces an error like so

[2018-08-27T10:24:54,005][ERROR][logstash.codecs.json     ] JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: (String)"<30>2018-08-27T14:25:09Z 6ed9dc4069ac logger/lat-prod-customernotificationservice[60806]: {"@timestamp":"2018-08-27T14:25:09.668+00:00","logger_name":"application","thread_name":"DispatchThread: [com.ibm.mq.jmqi.remote.impl.RemoteSession[connectionId=414D5143424D5320202020202020202046E64F58FD131D2A]]","level":"INFO","service":"customer-notification-service","msg":"Receiving message from queue correlationId=10.130.216.5215353799091400000000012847"}
[root@hd1melk20lx ~]# curl -GET 'localhost:9600/_node/logging?pretty''
{
  "host" : "hd1melk20lx.digital.hbc.com",
  "version" : "6.3.0",
  "http_address" : "127.0.0.1:9600",
  "id" : "c48718ef-373b-4120-a9a2-a89da6212aa4",
  "name" : "hd1melk20lx.digital.hbc.com",
  "loggers" : {
.....
deleted for brevity 
......
    "logstash.agent" : "INFO",
    "logstash.api.service" : "INFO",
    "logstash.codecs.json" : "INFO",
.....
deleted for brevity 
......
   }
}

Setting it to off or any other value fails

[root@hd1melk20lx ~]# curl -PUT 'localhost:9600/_node/logging?pretty' -H 'Content-Type: application/json' -d'
{
    "logstash.codecs.json" : "OFF"
}
'

Error Response

{
  "host" : "hd1melk20lx.digital.hbc.com",
  "version" : "6.3.0",
  "http_address" : "127.0.0.1:9600",
  "id" : "c48718ef-373b-4120-a9a2-a89da6212aa4",
  "name" : "hd1melk20lx.digital.hbc.com",
  "error" : "unrecognized option [logstash.codecs.json]"
}

Never mind figured it out

[root@hd1melk20lx logstash]# curl -XPUT 'localhost:9600/_node/logging?pretty' -H 'Content-Type: application/json' -d'
{
    "logger.logstash.codecs.json" : "off"
}
'
{
  "host" : "hd1melk20lx.digital.hbc.com",
  "version" : "6.3.0",
  "http_address" : "127.0.0.1:9600",
  "id" : "c48718ef-373b-4120-a9a2-a89da6212aa4",
  "name" : "hd1melk20lx.digital.hbc.com",
  "acknowledged" : true
}```

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.