Comments (6)
I've tested with Aritsta EOS, sampling configured ingress+egress on peering ports, prints 'i' and 'e' as expected, thank you.
from pmacct.
Hi Pawel ( @pawmal ),
Thanks for reporting this. I verified the issue occurring still in master code and fixed it with the commit referenced above. Interestingly, sFlow Flow Samples do not have a direct way to detect the sampling direction so the field does not really apply to sfacctd and it will print always u
, unknown.
Paolo
from pmacct.
It is a bit confusing, as "pretag.map.example" provides "direction" matcher.
While it uses IPFIX (61) direction field, it is allowed to be used by sfacctd as well, where it has value derived from "source_id".
Therefore I assumed aggregate by sampling_direction for sFlow will expose same 0 or 1 value, as pretag.map refers to.
in sFlow v2/v4/v5 this returns a positive match if: 1) source_id equals to input interface and this 'direction' key is set to '0' or 2) source_id equals to output interface and this 'direction' key is set to '1'.
Even more confusing, it is unspecified how "source_id" is filled for sFlow. :)
from pmacct.
Hi Pawel,
Thanks for insisting on this. I effectively had to refresh my memory and re-look at code. To your points:
-
I have aligned behavior of
sampling_direction
primitive todirection
key in pre_tag_map. So, effectively, sampling direction is now supported on sFlow; -
sFlow and source_id: this is how it is traditionally (we'll come back on the
traditionally
part later) populated, and i have added a comment in both sections of the code: "In the standard sFlow data model, every measurement comes from a particular datasource defined by agent IP address, ds_class and ds_index, and written as agent>ds_class:ds_index. For example the interface counters for interface 17 on switch 10.1.2.3 come from datasource 10.1.2.3>0:17".
So what now happens in both points of the code is that, say, input interface of a flow sample is 17 and ds_index (the last number of source id) is 17 then it is inferred that sampling direction is ingress. Similarly if 17 is output interface of a flow sample and that matches the ds_index, it is inferred that sampling direction is egress. Hope this explains & makes sense.
This all said, coming back on the traditionally
part, the whole scheme here holds up to the moment in which things are encoded in the source ID as expected.
Paolo
from pmacct.
Thanks, this clarifies how it works. :)
My understanding is there are 3 values possible: in (0), out(1) and unknown(u).
from pmacct.
3 values, exactly right! ingress (i), egress (e), unknown (u).
from pmacct.
Related Issues (20)
- nfacctd_templates_receiver container Operation not permitted HOT 3
- Openwrt: compile error for [-Werror=stringop-overflow=] in src/external_libs/libcdada/include/cdada/__list_internal.h HOT 8
- Adding timestamp to stderr logging HOT 7
- Telemetry daemon silently stops when incorrect messages sent to listening port HOT 1
- nfacctd: NetFlow v9 / IPFIX, correlate Options data to Flow data (ie. VRF ID -> VRF Name) HOT 3
- [sfacctd] Change the received datagrams agent address HOT 3
- [nfacctd] failed to parse Option Templates from Arista EOS device HOT 2
- [RPKI] bgp_daemon needs to be enabled to be able to connect to RTR cache HOT 3
- [RPKI] RPKI version mismatch when TLS for RTR HOT 2
- [nfacctd] Setting AS information from BGP no longer works in bleeding-edge HOT 8
- [RPKI] Pretag map filtering not working for ROA status
- VRF ID Support for IPFIX records in pretag.map when using tee plugin
- Sflow ipv6 tos field parsing of Traffic Class field in packet header. HOT 1
- Enhancement request: NATS plugin HOT 1
- DstAS/SrcAs values always equal to 0 for Global Routing Table while correct for VRFs.
- CI: use actions/cache instead of actions/upload-artifact for builders HOT 1
- How to discern BMP instance peer distinguisher and route distinguisher if both are present? HOT 1
- [sfacctd] Filtering traffic by interface HOT 5
- Slow restarting sfacctd daemon HOT 1
- nfacctd: print plugin -- writer [netflow] multiple processes are created and consume 40% of my system memory HOT 2
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 pmacct.