Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field with a IP or ID of goflow instance. #354

Open
giovaneh opened this issue Oct 1, 2024 · 1 comment
Open

Field with a IP or ID of goflow instance. #354

giovaneh opened this issue Oct 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@giovaneh
Copy link

giovaneh commented Oct 1, 2024

Hello everyone.

I'm setting up an environment where I have a few GoFlow2 instances.

One of the metrics we use is to identify the origin of the flow.

We already know who created the flow, but we don't know who collected it.

This is important to us. We need to know which collector the equipment is connected to, since we use IP anycast.

I tried using mapping, but without success.

If anyone can give me some light, I would be immensely grateful.

formatter:
  fields:
    - goflow_source
    - src_addr
    - dst_addr
    - bytes
    - sampler_address
  protobuf:
    - name: goflow_source
      index: 100
      type: string

ipfix:
  mapping:
    - field: 8
      destination: src_addr
    - field: 12
      destination: dst_addr
    - field: 1
      destination: bytes
    - field: 130
      destination: sampler_address
    - destination: goflow_source
      type: const
      value: "10.1.2.3"

netflowv9:
  mapping:
    - field: 8
      destination: src_addr
    - field: 12
      destination: dst_addr
    - field: 1
      destination: bytes
    - field: 130
      destination: sampler_address
    - destination: goflow_source
      type: const
      value: "10.1.2.3"

sflow:
  mapping:
    - field: 8
      destination: src_addr
    - field: 12
      destination: dst_addr
    - field: 1
      destination: bytes
    - field: 130
      destination: sampler_address
    - destination: goflow_source
      type: const
      value: "10.1.2.3"
@giovaneh giovaneh added the enhancement New feature or request label Oct 1, 2024
@lspgn
Copy link
Member

lspgn commented Oct 2, 2024

Hi @giovaneh,
Unfortunately there is currently no possibility to add a constant value out of the box. You will need to edit the code.
This said, it's a good idea and will likely consider it for a future enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants