All Projects → javadmohebbi → nfCollector

javadmohebbi / nfCollector

Licence: other
Collects Netflow version 1, 5, 6, 7, 9 & IPFIX & stores them on InfluxData time-series DB (InfluxDB)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to nfCollector

Personal Influxdb
Import data from various APIs into InfluxDB
Stars: ✭ 51 (+70%)
Mutual labels:  influxdb, grafana, grafana-dashboard
ruuvitag-demo
Demo of reading Bluetooth Low Energy sensor measurements of RuuviTag environmental sensors and feeding them to MQTT, a database and dashboards
Stars: ✭ 14 (-53.33%)
Mutual labels:  influxdb, grafana, grafana-dashboard
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+6520%)
Mutual labels:  influxdb, grafana, grafana-dashboard
Unifiedmetrics
Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.
Stars: ✭ 29 (-3.33%)
Mutual labels:  influxdb, grafana, grafana-dashboard
Pi Hole Influx
A python daemon to send Pi-Hole stats for Grafana to InfluxDB
Stars: ✭ 126 (+320%)
Mutual labels:  influxdb, grafana, grafana-dashboard
Grafana Influx Dashboard
Grafana InfluxDB scripted dashboard
Stars: ✭ 130 (+333.33%)
Mutual labels:  influxdb, grafana, grafana-dashboard
netdata-influx
Netdata ➡️ InfluxDB metrics exporter & Grafana dashboard
Stars: ✭ 29 (-3.33%)
Mutual labels:  influxdb, grafana, grafana-dashboard
solar-logger
A datalogger for a solar inverter. Stores data in influxdb and displays it in grafana. Has load diverting capability, to use the inverter's excess power
Stars: ✭ 53 (+76.67%)
Mutual labels:  influxdb, grafana
formula1-telemetry-kafka
No description or website provided.
Stars: ✭ 99 (+230%)
Mutual labels:  influxdb, grafana
nifi-prometheus-reporter
A reporting task in Nifi which is capable of sending monitoring statistics as prometheus metrics to a prometheus pushgateway.
Stars: ✭ 48 (+60%)
Mutual labels:  grafana, grafana-dashboard
geostat
GeoStat, Python script for parsing Nginx and Apache logs files and getting GEO data from incoming IP's.
Stars: ✭ 50 (+66.67%)
Mutual labels:  influxdb, grafana
influx-crypto-watcher
Server that let you monitor many cryptocurrencies and store the OHLC data in InfluxDB (visualisation with grafana)
Stars: ✭ 49 (+63.33%)
Mutual labels:  influxdb, grafana
bme680 to influxdb
Simple script that sends your BME680 temp, pressure, humidity and gas sensor data to InfluxDB.
Stars: ✭ 21 (-30%)
Mutual labels:  influxdb, grafana
rpi-monitoring-node
Automated installation of Grafana, Telegraf and influxdb for your Raspberry Pi
Stars: ✭ 18 (-40%)
Mutual labels:  influxdb, grafana
tado-exporter
A Prometheus exporter for tado smart heating solution
Stars: ✭ 32 (+6.67%)
Mutual labels:  grafana, grafana-dashboard
air-quality
Live dashboard for air quality in my home.
Stars: ✭ 70 (+133.33%)
Mutual labels:  influxdb, grafana
victoriametrics-ru-links
Список постов и видеозаписей об VictoriaMetrics на русском языке
Stars: ✭ 1 (-96.67%)
Mutual labels:  grafana, grafana-dashboard
ml-ops
Get your MLOps (Level 1) platform started and going fast.
Stars: ✭ 81 (+170%)
Mutual labels:  influxdb, grafana
telegraf-influxdb-grafana
TIG Stack
Stars: ✭ 30 (+0%)
Mutual labels:  influxdb, grafana
grafonnet-playground
Playground for grafanna with jsonnet
Stars: ✭ 25 (-16.67%)
Mutual labels:  grafana, grafana-dashboard

END OF LIFE NOTE

THIS REPO IS DEPRECATED & NO PATCH NOR UPDATE WILL BE PROVIDED IN THE FUTURE. TO UPDATE TO THE LATEST VERSION, PLEASE WATCH THIS REPO goNfCollector

Netflow Collector v0.0.9

NFCOL Collects Netflow version 1, 5, 6, 7, 9 & IPFIX & stores them on InfluxData time-series DB (InfluxDB)

Features

As I develop this tool for my personal usage at first step, It has small set of features:

  • Collect all available versions of Netflow
    • YAML config file which helps you configure the whole application from a single file
    • Thanks to tehmaze, We are using this repo to decode Netflow traffics & able to decode 1, 5, 6, 7, 9 & IPFIX protocols.
    • You can forward decoded Netflow packets to another hosts by enabling Packet Forwarders in nfc.yaml config file
      • In addition to packet forwarder, nfc-dump is a client for forwarded packets to print a nice tabular output. Also this tool can filter incomming packets according to the provided arguments.
    • Exporting traffics to InfluxDB time-series database.
      • To enable this feature you need to configure nfc.yaml config file
      • Also, It can provide you a GEO Location information for the SOURCE & DESTINATION IP Addresses (both IPv4 & IPv6).
        • To get more information about IP2Location tool you can read this GITHUB Repo. README file IP2Location

Usage

In order to use this tool you can download the compiled binaries or you can compile it for yourself. You can download the compiled versions from the further links:

Download Binaries:

Download Installation Packages

Currently I have just created a DEB package. I will provide RPM and MSI packages here soon ;-)

  • Debian (deb) package for AMD64 bit systems
    • To install this package run the command sudo dpkg -i nfcol_0.0.9-amd64.deb
      • It will install nfcol, nfcol-dump and ip2location and will create a system service nfcol.service. Also it will download the latest IP2Location Lite DB from the Internet
      • Once Installation has completed, You can check the service status using sudo service nfcol status

Prepare InfluxDB

If you want to export Netflow traffics to InfluxDB database you must install it. currently we support version 1.x (max version is 1.7)

  • You can get InfluxDB installtion file from This Link
  • InfluxData recommends you to install InfluxDB on SSD and since we are going to store many metrics, SSD disk is recommended for better performance.
  • After installing InfluxDB you can create a DB using this command: CREATE DATABASE "netflowDB" WITH DURATION 10d REPLICATION 1 SHARD DURATION 1h NAME "nfc"

Configuration

To config nfcol you need to provide configuration file in yaml format. *nix users must place this file in /etc/nfcol/nfc.yaml & windows users must place it in %ProgramFiles%\Netflow-Collector\nfc.yaml If you use installtion packages, It will create it for you automatically

Your nfc.yaml file must be look like this sample:

# # # # # # # # # # # # # # # # # #
#       Netflow Collector         #
#         Configuration           #
# # # # # # # # # # # # # # # # # #
server:
  # Listen Address
  address: 0.0.0.0

  # Listen UDP Port
  port: 6859

  # If true, nfc will write flow data into stdout
  dump: false

  # Activate forwarder
  forwarder: true

  # Host to forward - Can be separated by ; (semi-colon) eg: 127.0.0.1;192.168.100.1
  forwarderHost: 127.0.0.1

  # Forwarder UDP Port
  forwarderPort: 7161

# # # # # # # # # # # # # # # # # #
#    IP2Location Configuration    #
# # # # # # # # # # # # # # # # # #
ip2location:
  # IP2Location command path
  cmd: /usr/local/bin/ip2location

  # Path to Local GEO Database. Read more at:
  # https://github.com/javadmohebbi/IP2Location#local-database-format
  local: /etc/ip2location/local.csv

# # # # # # # # # # # # # # # # # #
#     Exporter Configuration      #
# # # # # # # # # # # # # # # # # #
exporter:
  # Enable if it's true
  enable: false

  # Currently Only InfluxDB (1.x) supported
  type: influxdb


# # # # # # # # # # # # # # # # # #
#     InfluxDB Configuration      #
# # # # # # # # # # # # # # # # # #
influxDB:
  # InfluxDB Host
  host: 127.0.0.1

  # InfluxDB Port
  port: 8086

  # InfluxDB Username. Can be null
  username: #user

  # InfluxDB Password. Can be null
  password: #secret

  # InfluxDB Database
  # InfluxDB command example for creating database:
  #       CREATE DATABASE "netflowDB" WITH DURATION 10d REPLICATION 1 SHARD DURATION 1h NAME "nfc"
  database: netflowDB

  # Temp Dir for InfluxDB Metrics. MUST be ended with / (Linux) or \ (Windows)
  tmpDir: /tmp/nfcol/


# # # # # # # # # # # # # # # # # #
#          Measurements           #
# # # # # # # # # # # # # # # # # #
measurements:
  # Netflow Summary Measurement Name
  summaryProto: sum_proto

  # Netflow GEO Summary Measurement Name
  summaryProtoGeo: sum_proto_geo

IP2Location

If you want to use GEO location tool, you need to read it's usage at IP2Location Github Repositories

Command line options

Here is the command line options for all binaries:

nfcol command line options

  -addr string
        Listen IP address
  -debug string
        It will Print debug info if the value is 'true' and 'false' for nothing
  -dump string
        It will Print flow record if the value is 'true' and 'false' for nothing
  -port string
        Listen port
  -v    Print Version & exit.
  • addr: Listen address for Netflow Collector tool. If nothing will be provided it will read it from nfc.yaml file
  • port: Listen port for Netflow Collector tool. If nothing will be provided it will read it from nfc.yaml file
  • debug: Enable debugging mode & provide more information about everything
  • dump: Disable exporting & dump netflow traffics to Standard Output
  • h: Show help and exit
  • v: Print version and exit

nfcol-dump command line options

This tool can connect to nfcol tools & Filter and Print Netflow Traffic to the standard output (Terminal, CMD, Powershell) Almost all of options starts with -flt & accepts wildcards.

  -addr string
        Listen IP address - Default 127.0.0.1
  -flt-dst-ip string
        Filter Destination IP. eg: 192.168.1.1, 192.168.1.* (default "*")
  -flt-dst-port string
        Filter Destination Port. eg: 80, 433, 100-250 (default "*")

  -flt-nf-exp string
        Filter netflow Exporter. IP address of exporter device. eg: 192.168.1.1, 192.168.1.* (default "*")
  -flt-nf-ver string
        Filter netflow version. eg: 1, 5, 6, 7, 9, 10 (for IPFIX) (default "*")
  -flt-proto string
        Filter Protocol. eg: tcp, udp, icmp (default "*")
  -flt-src-ip string
        Filter Source IP. eg: 192.168.1.1, 192.168.1.* (default "*")
  -flt-src-port string
        Filter Source Port. eg: 80, 433, 100-250 (default "*")
  -port string
        Listen port - Default 7161
  • addr: Listen address for Netflow Dumper tool. If you want to listen on available IP addresses you need to provide 0.0.0.0
  • port: Listen post for Netflow Dumper tool
  • flt-nf-ver: Filter packet based on netflow version.
  • flt-nf-exp: Filter packet based on netflow exporter. You might have different Netflow exporter and interested in one of them, So you can provide it here to filter the printer packets
  • flt-proto: Filter based on protocols. Like tcp, udp, gre.
  • flt-src-ip & flt-dst-ip: Filter based on source or destination IP Addresses.
  • flt-src-port & flt-dst-port: Filter based on source or destination port.

Grafana Dashboards

I have made two simple & powerfull Grafana dashboards which you can download them from the further links:

Netflow Exporter Dashboard Netflow Summary Dashboard

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].