GithubHelp home page GithubHelp logo

rkosegi / netflow-collector Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 179 KB

Simple Netflow V5 exporter for prometheus

License: Apache License 2.0

Dockerfile 4.01% Makefile 6.47% Go 89.52%
netflow-collector netflow-v5 prometheus-exporter

netflow-collector's People

Contributors

dependabot[bot] avatar rkosegi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

vaygr

netflow-collector's Issues

Panics with specific config

Hello, thanks for this collector!

I noticed a few panics with specific configuration.

Adding bytes or packets as labels like:

          - name: bytes
            value: bytes
            converter: uint32

results in:

panic: interface conversion: interface {} is uint64, not uint32

as well as when converter is invalid.

Inconsistent results with NetFlow

I'm trying to come up with a dashboard for internal hosts' traffic monitoring using NetFlow data.

I have OPNsense sending NetFlow V5 to netflow-collector which exports metrics to Prometheus. At the same time I have ntopng installed and sending metrics to InfluxDB.

Somehow I have inconsistent results with NetFlow, so I'm wondering if I'm missing something here. With my bandwidth tests I get consistently 200-400 MBps down/up (down usually lower).

With InfluxDB this is the graph with already calculated speed (in mbps):

shot-2022-10-20_155348

But NetFlow metrics are very inconsistent and all over the place (sometimes there are no spikes for up like on this graph):

shot-2022-10-20_155611

This graph has raw values in bytes returned from Prometheus as they were sent by netflow-collector.

FWIW my scrape and evaluation intervals are 15 in Prometheus and flush interval is 120s in netflow-collector.

Is there a missing link here?

Interface mapper extension issue

For some reason in my setup it doesn't work, even though it seems netflow-collector processes yaml config properly.

I have:

pipeline:
  filter:
    - local-to-local: true
    - match: source_ip
      is: 0.0.0.0
    - match: source_ip
      is: 255.255.255.255
    - match: destination_ip
      is: 0.0.0.0
    - match: destination_ip
      is: 255.255.255.255
  enrich:
    - interface_mapper
    - protocol_name
  metrics:
    prefix: netflow
    items:
      - name: traffic_detail
        description: Traffic detail
        labels:
          - name: sampler
            value: sampler
            converter: ipv4
          - name: source_ip
            value: source_ip
            converter: ipv4
          - name: destination_ip
            value: destination_ip
            converter: ipv4
          - name: protocol
            value: proto_name
            converter: str
          - name: input_interface
            value: input_interface
            converter: uint32
          - name: output_interface
            value: output_interface
            converter: uint32
extensions:
  interface_mapper:
    0: if0
    1: if1
    2: if2
    5: if5

input_interface_name and output_interface_name don't show up in metrics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.