1
0
mirror of https://github.com/netsampler/goflow2.git synced 2024-05-06 15:54:52 +00:00

docs: add information about mapping (#108)

This commit is contained in:
Louis
2022-08-02 22:28:47 -07:00
committed by GitHub
parent 1468ff77c2
commit 29075b832d

View File

@ -157,6 +157,25 @@ You can also run directly with a container:
$ sudo docker run -p 6343:6343/udp -p 2055:2055/udp -ti netsampler/goflow2:latest $ sudo docker run -p 6343:6343/udp -p 2055:2055/udp -ti netsampler/goflow2:latest
``` ```
### Mapping extra fields
In the case of exotic template fields or extra payload not supported by GoFlow2
of out the box, it is possible to pass a mapping file using `-mapping mapping.yaml`.
A [sample file](cmd/goflow2/mapping.yaml) is available in the `cmd/goflow2` directory.
For instance, certain devices producing IPFIX use `ingressPhysicalInterface` (id: 252)
and do not use `ingressInterface` (id: 10). Using the following you can have the interface mapped
in the InIf protobuf field without changing the code.
```yaml
ipfix:
mapping:
- field: 252
destination: InIf
- field: 253
destination: OutIf
```
### Output format considerations ### Output format considerations
The JSON format is advised only when consuming a small amount of data directly. The JSON format is advised only when consuming a small amount of data directly.