Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json format with Integer attribute convert to string value #136

Open
ririkizzu opened this issue Sep 1, 2022 · 0 comments
Open

json format with Integer attribute convert to string value #136

ririkizzu opened this issue Sep 1, 2022 · 0 comments
Labels

Comments

@ririkizzu
Copy link

Logstash information:

Please include the following information:

  1. Logstash version: logstash 7.4.1
  2. Logstash installation source: expanded from tar or zip archive
  3. How is Logstash being run: Via command line
  4. How was the Logstash Plugin installed: by default

JVM:

  1. JVM version: java version "1.8.0_251"
  2. 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.

  1. 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]
  }
}
  1. server response
{"alert_source_id":"37","title":"HFish Threat Alert","num":"1","array":["1","2"]}
@ririkizzu ririkizzu added the bug label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant