Open
Description
Logstash information:
Please include the following information:
- Logstash version: logstash 7.4.1
- Logstash installation source: expanded from tar or zip archive
- How is Logstash being run: Via command line
- How was the Logstash Plugin installed: by default
JVM:
- JVM version: java version "1.8.0_251"
- JVM installation source: from source
OS version (uname -a
if on a Unix-like system):
Linux centosT-SecElk-7079 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Steps to reproduce:
I use http output plugin to send request to server, request body contains attributes and it's type is Integer. When request to server, it seems Integer value is convert to string.
- http output config info like below
http {
url => "http://10.2.13.36:8080/post"
http_method => "post"
headers => {
"token" => "token"
}
format => "json"
mapping => {
"alert_source_id" => '%{[@metadata][alert_source_id]}'
"title" => "%{[@metadata][title]}"
"num" => 1
"array" => [1, 2]
}
}
- server response
{"alert_source_id":"37","title":"HFish Threat Alert","num":"1","array":["1","2"]}