Comments (5)
There really isn't a good way to do this without code from outside of the Elasticstack. Probably the best place to do this is first stick the flows into Kafka and write a Streams app for it.
I am open for suggestions here, but I am hesitant to expand ElastiFlow beyond the core of Elasticsearch, Kibana and Logstash.
from elastiflow.
The first step would be to calculate a common id field for the forward and reverse flows, so you can group on this new field. Let's call it "flow_key" or something. You basically calculate some integer for both directions, and ADD these two values. Because you add them, the sum will be equal for reverse and forward flows. Now you can use this new common field to do other operations on.
Example integers for forward flow:
- 28867323006035317 (172.16.10.12 in decimal is 2886732300 for src_ip, appended with 60352 for src port numer, appended with 17 for the udp protocol number)
- 1347440725317 (8.8.8.8 in decimal is 134744072 for dest_ip, appended with 53 for the dest_port, appended with 17 for the protocol number for udp)
- sum = 28868670446760634
Example integers for reverse flow:
- 1347440725317
- 28867323006035317
- sum = 28868670446760634
Generating this field "flow_key" could be implemented as an Elasticsearch script, for example in Painless.
from elastiflow.
I did something similar in Splunk a while a go based on the JSON output from Logstash: https://github.com/jorritfolmer/TA-netflow-logstash. It's a two part operation:
- perform some aggregations on the flow_key, keep only the flows where src_port>dest_port, and save to a new index
- use this new index for dashboarding or alerting.
You can see the search I used here: https://github.com/jorritfolmer/TA-netflow-logstash/blob/master/default/savedsearches.conf#L12-L25
Splunk has much more flexibility in terms processing and analytics, but I believe this could also be done in Elasticsearch "Painless" scripting.
from elastiflow.
For deduplication -- we have multiple routers sending sflow data into logstash, and it would be nice if we could use an aggregation filter that records all the common records of a flow, and then has a list of node_ids the record was received from. Ideally, we'd be able to expire the raw records after a short period of time, and keep the deduplicated aggregation records for a longer period. It looks like something that could be done in logstash via fingerprinting and aggregate filters, as long as the timeouts were configurable.
from elastiflow.
This issue is being closed as this legacy version of ElastiFlow is now deprecated and is to be archived. Please try the new ElastiFlow, request a free Basic Tier license, and join the ElastiFlow Community Slack. Thank you.
from elastiflow.
Related Issues (20)
- Import PCAP file from a USB File to ElasticFlow HOT 1
- RISKIQ behind proxy HOT 1
- Can't access ElastiFlow 5.0.0 in Docker HOT 2
- Centos 7 Install Logstsh sFlow codec fails HOT 1
- ElasticFlow : Netflow VLAN data is not populated in elastiflow HOT 2
- Elastiflow : Not generating enough data in Elastic HOT 2
- ElasticSearch 7.12 ... just checking :) HOT 3
- I can't see data (elastiflow) in kibana HOT 1
- docker image - flowcoll should recover once elasticsearch become available HOT 3
- index-pattern remain elastiflow empty HOT 8
- Invalid request payload JSON format HOT 4
- Elastic upgrade from 7.10 to 7.12 HOT 5
- source.as.organization.name always public HOT 2
- logstash is running but not able to see Sflow data HOT 3
- netflowv5 mikrotik no data in dashboard HOT 6
- kibana terms list might be incomplete because the request is taking to long HOT 1
- Mapper_parsing_exception HOT 2
- No matching indices found: No indices match pattern "elastiflow-flow-codex-*" HOT 2
- no data in threats HOT 2
- The legacy ElastiFlow is deprecated. TRY THE NEW ELASTIFLOW!!!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elastiflow.