How can I visualize "top-talkers" from netflow data?

(Sliddjur) #1

Hello I want to visualize top-talkers from netflow data.

With a top-talkers I mean data sent from source to destination, as well as the data replied from the same dst and src.

I would like to stack this data in a vertical bar, and list the top-talkers based on flows/bytes etc. Something similar to this is what I'm trying to achive

(Spencer Alger) #2

Can you give me an example of what your documents might look like? I'm thinking something like this:

  "src": "",
  "dest": "",
  "bytes": 42

(Sliddjur) #3

@spalger yes thats what it looks like.
I'm intrested in netflow.ipv4_src_addr, netflow.ipv4_dst_addr and netflow.in_bytes

  "_index": "netflow-2016.12.23",
  "_type": "netflow",
  "_id": "AVkq4HlGRFxRys8jOYJN",
  "_score": null,
  "_source": {
    "netflow": {
      "ipv4_src_host": "",
      "in_pkts": 3,
      "first_switched": "2016-12-23T08:47:52.999Z",
      "flowset_id": 256,
      "l4_src_port": 56054,
      "ipv4_next_hop": "x.x.128.1",
      "ipv4_dst_host": "",
      "in_bytes": 156,
      "protocol": 6,
      "tcp_flags": 17,
      "xlate_src_addr_ipv4": "",
      "l4_dst_port": 443,
      "output_snmp": 15,
      "out_src_mac": "e4:8d:8c:20:ed:e2",
      "dst_mask": 0,
      "xlate_src_port": 0,
      "ipv4_dst_addr": "",
      "src_tos": 0,
      "in_dst_mac": "xx:xx:xx:20:ed:e6",
      "src_mask": 0,
      "xlate_dst_port": 0,
      "version": 9,
      "flow_seq_num": 29029,
      "ipv4_src_addr": "",
      "last_switched": "2016-12-23T08:48:04.999Z",
      "input_snmp": 13,
      "xlate_dst_addr_ipv4": "",
      "protocol_name": "TCP"
    "dst_geoip": {
      "timezone": "Europe/Dublin",
      "ip": "",
      "latitude": 53.3472,
      "country_code2": "IE",
      "country_name": "Ireland",
      "continent_code": "EU",
      "country_code3": "IE",
      "location": [
      "longitude": -6.2439
    "@timestamp": "2016-12-23T08:48:20.000Z",
    "@version": "1",
    "host": "",
    "src_geoip": {},
    "type": "netflow",
    "tags": [
  "fields": {
    "netflow.first_switched": [
    "netflow.last_switched": [
    "@timestamp": [
  "sort": [

(Peter Pisljar) #4

Its not possible to do it with scripted fields as ip fields are not accessible from scripts. I suppose you want to do this without reindexing your data ? @spalger did you have something specific in mind ?

(Sliddjur) #5

@ppisljar is it possible with strings? How?

(Christian Dahlqvist) #6

Since you want to group records with different source and destination fields, I suspect the most efficient way would be to create some type of conversation ID at indexing time. Add the source and destination fields (host and port*) to an array, sort it and concatenate it to a string with some kind of separator.

If you also want to show duration like in your example at scale, you may want to consider creating an entity-centric index for that.

(Peter Pisljar) #7

yes, with strings its possible. but if you can update your mappings (reindex, or your data is not yet indexed) then what Christian suggests would be best.

with scripted fields you could do something like:

return (doc['ip_from_string'].value < doc['ip_to_string'].value ? doc['ip_from_string'].value + '-' + doc['ip_to_string'].value : doc['ip_to_string'].value + '-'+ doc['ip_from_string'].value;

this will return something in form for this scripted fields (where the smaller ip always come first to make sure we don't have two pairs and 200-12.123.2- (we want to treat them as one talker group)

let me say this again, if you can add another field at the index time, that would be much better.

(system) #8

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