Change long field format

I have field called

# user_id_s:	14,960,923,573 long

as above name, value and type
I want it should look like 14960923573
I try to change its type to string by mutate convert but not worked.
I tried creating new string and copy it to it but still not worked any other option

Logstash doesn't have any datatypes that serialize to 14,960,923,573 long. What format is this coming in as? Is it a string of characters (1 4 , 9 6 0 , 9 2 3 , 5 7 3 SPACE l o n g)?

If so, the following should work by replacing any comma surrounded by digits, or any trailing <SPACE> long, with an empty string:

filter { mutate { gsub => ["user_id_s", "(?:(?<=[0-9]),(?=[0-9]))|(?: long$)", ""] } }

NO. Its a long value coming as follows in discover of kibana

14,960,923,573 

I just want a long value or string value as

14960923573

Can you check kibana index options, there might you able to remove those extra commas

Stack Management -> Kibana Index Patterns -> Your index -> Your field "Set Format" = "0"

this will remove commas, but keep that in mind, this is only for kibana

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