Hello,
How can I tell Kibana to display a numeric field in hexadecimal or octal?
I have looked into the formatting options and numeral.js, but nothing concerning which base to use for displaying numeric values...
I'd like to avoid adding multi-fields to my indices for data numeric to cope with that.
Thanks for the help !
Olivier
hi @makibroshett ,
You can use scripted fields to do that. Use the conversion methods exposed by the Painless scripting language.
E.g., for a double to HEX conversion, it'd look something like:
More info about the Painless API you can find here: https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-api-reference.html
thx,
Hi Thomas
Ah! Another aspect of E(L)K I had never scratched. It worked great, thank you for pointing me to that.
Best regards
Olivier
system
(system)
Closed
December 7, 2017, 9:11am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
baerrach
(Barrie Treloar)
June 27, 2019, 11:17pm
6
I needed to change the dns.id of packetbeats to hex so that I could easily visualize my wireshark pcap files.
Here is the painless script I used for that.
if (doc['dns.id'].size()==0) {
return "-";
}
long dnsId = doc['dns.id'].value;
String asHex = Long.toHexString(dnsId);
return "0x" + asHex