From 29ea8f9e3024c1595fd4fc821fb965ab29b6182a Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 25 May 2019 19:47:03 +0800 Subject: [PATCH] add ntopng --- README.md | 1 + ntopng/Dockerfile | 25 +++++++++++++++++++++++++ ntopng/README.md | 32 ++++++++++++++++++++++++++++++++ ntopng/docker-compose.yml | 19 +++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 ntopng/Dockerfile create mode 100644 ntopng/README.md create mode 100644 ntopng/docker-compose.yml diff --git a/README.md b/README.md index fe002db..e9a0682 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ A collection of delicious docker recipes. - [x] motion-arm :+1: - [x] nginx - [x] nifi +- [x] ntopng - [x] nullmailer - [x] nullmailer-arm - [x] openhab diff --git a/ntopng/Dockerfile b/ntopng/Dockerfile new file mode 100644 index 0000000..1c4b7d7 --- /dev/null +++ b/ntopng/Dockerfile @@ -0,0 +1,25 @@ +# +# Dockerfile for ntopng +# + +FROM ubuntu:18.04 + +MAINTAINER EasyPi Software Foundation + +RUN set -xe \ + && apt update \ + && apt install -y wget lsb-release gnupg libjson-c3 \ + && wget -q http://apt-stable.ntop.org/18.04/all/apt-ntop-stable.deb \ + && dpkg -i apt-ntop-stable.deb \ + && apt update \ + && apt install -y ntopng \ + && rm -rf /var/lib/apt/lists/* + +VOLUME /var/lib/ntopng + +EXPOSE 3000 5556 + +CMD ntopng --http-port 0.0.0.0:3000 \ + --interface tcp://0.0.0.0:5556c \ + --redis redis \ + --data-dir /var/lib/ntopng diff --git a/ntopng/README.md b/ntopng/README.md new file mode 100644 index 0000000..d9bbfa3 --- /dev/null +++ b/ntopng/README.md @@ -0,0 +1,32 @@ +ntopng +====== + +[ntopng][1] is the next generation version of the original ntop, a network traffic +probe that monitors network usage. ntopng is based on libpcap and it has been +written in a portable way in order to virtually run on every Unix platform, +MacOSX and on Windows as well. + +[nProbe][2] is a software NetFlow v5/v9/IPFIX probe able to collect, analyze and +export network traffic reports using the standard Cisco NetFlow v5/v9/IPFIX +format. It is available for most of the OSs on the market (Windows, BSD, Linux, +MacOSX). When installed on a PC, nProbe turn it into a Network-aware monitoring +appliance. + +## Server (collector mode) + +``` +$ mkdir -m 777 -p data/{ntopng,redis} +$ docker-compose up -d +$ curl http://localhost:3000 +``` + +## Client (probe mode) + +``` +$ nprobe -i eth0 -n none --zmq-probe-mode --zmq tcp://ntopng-server:5556 -f 'tcp port 80' +``` + + + +[1]: https://www.ntop.org/guides/ntopng/cli_options.html +[2]: https://www.ntop.org/guides/nProbe/cli_options.html diff --git a/ntopng/docker-compose.yml b/ntopng/docker-compose.yml new file mode 100644 index 0000000..f9415b4 --- /dev/null +++ b/ntopng/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3' + +services: + + ntopng: + image: vimagick/ntopng + ports: + - "3000:3000" + - "5556:5556" + volumes: + - ./data/ntop:/var/lib/ntopng + restart: unless-stopped + + redis: + image: redis:alpine + command: --save 900 1 + volumes: + - ./data/redis:/data + restart: unless-stopped