2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 21:33:02 +01:00

update ntopng

This commit is contained in:
kev
2019-05-26 11:35:13 +08:00
parent 739515e64f
commit ca2838c316
4 changed files with 63 additions and 9 deletions

View File

@@ -23,9 +23,9 @@ EXPOSE 3000 5556
ENTRYPOINT ["ntopng"] ENTRYPOINT ["ntopng"]
CMD [ \ CMD [ \
"--community", \
"--data-dir", "/var/lib/ntopng", \
"--http-port", "0.0.0.0:3000", \ "--http-port", "0.0.0.0:3000", \
"--interface", "tcp://0.0.0.0:5556c", \ "--interface", "tcp://0.0.0.0:5556c", \
"--data-dir", "/var/lib/ntopng", \ "--redis", "redis" \
"--redis", "redis", \
"--community" \
] ]

View File

@@ -12,15 +12,48 @@ 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 MacOSX). When installed on a PC, nProbe turn it into a Network-aware monitoring
appliance. appliance.
## Server (collector mode) > :warning: [nProbe][3] is not free
## docker-compose.yml
```yaml
version: '3'
services:
ntopng:
image: vimagick/ntopng
command: --community -d /var/lib/ntopng -i eth0 -r 127.0.0.1:6379@0 -w 0.0.0.0:3000
volumes:
- ./data/ntop:/var/lib/ntopng
network_mode: host
restart: unless-stopped
redis:
image: redis:alpine
command: --save 900 1
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
restart: unless-stopped
```
## Standalone mode
``` ```
$ mkdir -m 777 -p data/{ntopng,redis} $ mkdir -m 777 -p data/{ntopng,redis}
$ docker-compose up -d $ docker-compose up -d
$ curl http://localhost:3000 $ curl http://127.0.0.1:3000
``` ```
## Client (probe mode) ## Collector mode
```
$ mkdir -m 777 -p data/{ntopng,redis}
$ docker-compose up -d -f docker-compose-collector.yml
$ curl http://127.0.0.1:3000
```
``` ```
$ nprobe -i eth0 -n none --zmq-probe-mode --zmq tcp://ntopng-server:5556 -f 'tcp port 80' $ nprobe -i eth0 -n none --zmq-probe-mode --zmq tcp://ntopng-server:5556 -f 'tcp port 80'
@@ -30,3 +63,4 @@ $ nprobe -i eth0 -n none --zmq-probe-mode --zmq tcp://ntopng-server:5556 -f 'tcp
[1]: https://www.ntop.org/guides/ntopng/cli_options.html [1]: https://www.ntop.org/guides/ntopng/cli_options.html
[2]: https://www.ntop.org/guides/nProbe/cli_options.html [2]: https://www.ntop.org/guides/nProbe/cli_options.html
[3]: https://www.ntop.org/products/netflow/nprobe/

View File

@@ -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

View File

@@ -4,16 +4,17 @@ services:
ntopng: ntopng:
image: vimagick/ntopng image: vimagick/ntopng
ports: command: --community -d /var/lib/ntopng -i eth0 -r 127.0.0.1:6379@0 -w 0.0.0.0:3000
- "3000:3000"
- "5556:5556"
volumes: volumes:
- ./data/ntop:/var/lib/ntopng - ./data/ntop:/var/lib/ntopng
network_mode: host
restart: unless-stopped restart: unless-stopped
redis: redis:
image: redis:alpine image: redis:alpine
command: --save 900 1 command: --save 900 1
ports:
- "6379:6379"
volumes: volumes:
- ./data/redis:/data - ./data/redis:/data
restart: unless-stopped restart: unless-stopped