NtopNG - docker container

Currently reading
NtopNG - docker container

2,486
840
NAS
Synology, TrueNAS
Operating system
  1. Linux
  2. Windows
Deployed and tested NtopNG container

First touch feelings:
1. running w/o a significant impact on NAS host (it was my worries)
2. Useful to fast preview of the network status before you will use Wireshark
3. you can create pools for a clustered preview or exact host interface flow check
4. Export to Wireshark PCAP binary format is also valuable (no need open SSH and create a task with tcdump) - save time when it is necessary

So it is an interesting junction between tcpdump and the Wireshark in GUI.

Here is my docker-compose for reuse:

YAML:
version: "3.8"
services:
  ntopg:
    image: ntop/ntopng:stable
    volumes:
      - <your_path>:/etc/ntopng.license:ro
    ports:
      - "<your port>:3000"
    environment:
      - TZ="<up_to_your_region>"
    network_mode: "host"
    command: ["-i", "eth0","-i", "eth3","-i", "tun0","-i", "lo", "-i", "bond0"]
    restart: unless-stopped

Regarding the "command" definition - you need to decide what interface you will take under the monitoring hood.

I decided to write only such a quick post because it is not a tool for newbies. The others don't need more information.
Maybe we can share here some experiences or scripts.

PS: don't use psw longer than 30 characters (I need to write them) and characters out of ISO8859-1 characters. it stuck me for about two minutes.
default/first login is admin/admin, then you can change them
 
Last edited:
Thanks Jeyare I tried to set this up before but was getting kernel dumps constantly.
So I've got 2 issues:
(1) Only eth0 and lo are recognised
Code:
20/Jan/2022 08:37:32 [main.cpp:236] ERROR: An exception occurred during tun0 interface creation[19]: No such device
20/Jan/2022 08:37:32 [main.cpp:236] ERROR: An exception occurred during eth3 interface creation[19]: No such device
20/Jan/2022 08:37:32 [main.cpp:236] ERROR: An exception occurred during bond0 interface creation[19]: No such device
I've got both my network cards connected and set to bond0 so I'm lost as to why they're not showing. :(

(2) The admin password resets after each reboot as we're not specifying a redis server:
Code:
https://github.com/ntop/ntopng/issues/4978

I also have 1 bit of help I can offer:
Add:
, "--community"
to:
command: ["-i", "eth0","-i", "eth3","-i", "tun0","-i", "lo", "-i", "bond0"]

Which then makes it so you're using the community edition. :)
 
thx @Akira
, "--community"
is pretty clear from Help/About:
1642673173233.png


but yes, it is applicable. But it is not necessary for all "licensed" features.
---------------------------------------------------------------------------------------------------------

To find exact interfaces within your NAS, you need to use:
Bash:
ifconfig -a
there was mine list of chosen interfaces to the monitoring
but yes, it is applicable.
---------------------------------------------------------------------------------------------------------

(2) The admin password resets after each reboot as we're not specifying a redis server:
No,
The mentioned issue was active one year ago.

A. the Redis is part of the image. You can check it by:
A.1 server check:
Bash:
redis-server -v
you will get
Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=636cde3b5c7a3923
A.2 or client check
Bash:
redis-cli -v
you will get
redis-cli 5.0.7

then

B. only my defined admin usr/psw is working (as expected), even when the container is restarted. Then it must be persistent for all.
Basic check:
- I can't log in with default or diff credentials.
 
Last edited:
@jeyare odd, my user and pass resets on every reboot. Will head off and try what you've suggested, thank you.

So, confirmed redis is working. But rebooting the container resets it.
 
Thank you, tried that, rebooted and the new user no longer exists.
I've also checked than:
eth1 and ovs_bond0 (which I changed to for my interfaces) exist but it can't see those or tun0. :(
Had a similar thing when setting up Grafana, Influx and Telegram. :'(
 
Code:
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
docker0   1500        0      0      0 0             0      0      0      0 BMU
docker54  1500      983      0      0 0         19318      0      0      0 BMRU
docker-4  1500 432131618      0      0 0      574688615      0      0      0 BMRU
docker01  1500   170695      0      0 0        172995      0      0      0 BMRU
docker03  1500        0      0      0 0         18387      0      0      0 BMRU
docker17  1500  2363983      0      1 0       2233214      0     13      0 BMRU
docker17  1500        6      0      0 0         14061      0      0      0 BMRU
docker1d  1500        0      0      0 0         18227      0      0      0 BMRU
docker23  1500  1644271      0      0 0       2051794      0      0      0 BMRU
docker26  1500      286      0      0 0         18567      0      0      0 BMRU
docker2b  1500      359      0      0 0         18683      0      0      0 BMRU
docker31  1500   149794      0      3 0        156083      0      6      0 BMRU
docker39  1500 26938639      0      1 0      14070768      0      0      0 BMRU
docker3a  1500      195      0      0 0           178      0      0      0 BMRU
docker3c  1500      170      0      0 0         16856      0      0      0 BMRU
docker41  1500   117282      0      0 0        114865      0      0      0 BMRU
docker46  1500    24802      0      0 0         52532      0      0      0 BMRU
docker67  1500 212408994      0     81 0      151953032      0    279      0 BMRU
docker68  1500        0      0      0 0         10807      0      0      0 BMRU
docker68  1500     3700      0      0 0          5339      0      0      0 BMRU
docker6e  1500     6954      0      0 0         40213      0      0      0 BMRU
docker72  1500     8701      0      0 0         29649      0      0      0 BMRU
docker78  1500    37956      0      0 0         61993      0      0      0 BMRU
docker96  1500   884173      0      0 0        509489      0      0      0 BMRU
docker98  1500    94644      0      0 0        126840      0      0      0 BMRU
docker9a  1500    53558      0      0 0         61450      0      0      0 BMRU
docker9e  1500     5674      0      0 0          6000      0      0      0 BMRU
dockera0  1500 16825529      0      5 0      15535471      0      0      0 BMRU
dockera3  1500      155      0      0 0         11326      0      0      0 BMRU
dockera8  1500       10      0      0 0         18282      0      0      0 BMRU
dockerae  1500 204402412      0 270692 0      398101129      0 354983      0 BMRU
dockerb5  1500     2482      0      0 0         20644      0      0      0 BMRU
dockerb9  1500    50481      0      0 0         67780      0      0      0 BMRU
dockerc0  1500  2627468      0      0 0       3606321      0      1      0 BMRU
dockerc6  1500        0      0      0 0         18273      0      0      0 BMRU
dockerc7  1500      220      0      0 0           547      0      0      0 BMRU
dockere2  1500   766462      0      0 0        929763      0      3      0 BMRU
dockere8  1500    43246      0      0 0         63694      0      0      0 BMRU
dockerf9  1500     3260      0      0 0         21553      0      0      0 BMRU
dockerf0  1500     1227      0      0 0         16735      0      0      0 BMRU
dockerf4  1500      731      0      0 0          1845      0      0      0 BMRU
dockerfb  1500        3      0      0 0            22      0      0      0 BMRU
dockerfd  1500    83958      0      2 0         95476      0      9      0 BMRU
eth0      1500  1943833      0      0 0       1577731      0      0      0 BMsRU
eth1      1500 1133943144    158      6 6      538800721      0      0      0 BMsRU
lo       65536  7507113      0      0 0       7507113      0      0      0 LRU
ovs_bond  1500 32338448      0      0 0      22021478      0      0      0 BMRU
tap02113  1500   792433      0      0 0       1934633      0      0      0 BMsRU
tun0      1500        0      0      0 0            93      0      0      0 MOPRU
compose is:

Code:
version: "3.8"
services:
  ntopg:
    image: ntop/ntopng:stable
    container_name: ntop
    volumes:
      - ${SSD}ntop:/etc/ntopng.license:ro
    ports:
      - "3010:3000"
    environment:
      - TZ=${TZ}
    command: ["-i", "eth0", "-i", "eth1","-i", "tun0","-i", "lo", "-i", "ovs_bond0", "--community"]
    restart: unless-stopped
    networks:
      - synology
    restart: always

networks:
  synology:
    external: true
 
@Akira
Try to take another look at my docker-compose and the one you used and try to find fundamental differences in the number of lines and unnecessary lines.

E.g.:

your docker-compose contains a mess:
restart: unless-stopped
restart: always ...... delete this row

and

I miss there:
network_mode: "host"

and

you don't need to use 'networks' specification for service linked to the container called 'synology' which doesn't exist probably in your host

and
same for the last 3 rows of your docker-compose.
 
Last edited:
@jeyare Thanks, I specified the network so it's not using the host network (if nothing else I'm already using port 3000).
It still doesn't explain why my container is forgetting everything on reboot.

Ok, so moved the other container to a different port.
Changing to network_mode: host has meant that eth1 and ovs_bond0 are now found.
Restarting still resets the admin password.
 
Last edited:
I was trying to set up ntopng but the strangest thing happened, as I am not able to get an IP address. Is it Docker, Is it Synology, is it my compose. I have no clue. One thing I noticed is that most of the containers have bridged for the network.
YAML:
version: "3.8"
services:
  ntopg:
    container_name: ntopng
    image: ntop/ntopng:stable
    volumes:
      - /volume1/docker/ntopng:/etc/ntopng.license:ro
    ports:
      - 3050:3000
    environment:
      - TZ=Europe/London
    network_mode: host
    command: ["-i", "eth0", "-i", "eth1","-i", "tun0","-i", "lo", "-i", "ovs_eth0", "--community"]
    restart: unless-stopped
-- post merged: --

I was trying to set up ntopng but the strangest thing happened, as I am not able to get an IP address. Is it Docker, Is it Synology, is it my compose. I have no clue. One thing I noticed is that most of the containers have bridged for the network.
YAML:
version: "3.8"
services:
  ntopg:
    container_name: ntopng
    image: ntop/ntopng:stable
    volumes:
      - /volume1/docker/ntopng:/etc/ntopng.license:ro
    ports:
      - 3050:3000
    environment:
      - TZ=Europe/London
    network_mode: host
    command: ["-i", "eth0", "-i", "eth1","-i", "tun0","-i", "lo", "-i", "ovs_eth0", "--community"]
    restart: unless-stopped
Never mind, I was able to login. The port details do not matter because of the host network.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
351
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
901
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
897
I'm happy with email notifications but in v0.3.3 of dockcheck the author added apprise notifications...
Replies
4
Views
977
I am also trying to setup a Z-wave USB dongle and am getting stuck after following the same steps as...
Replies
1
Views
976
How did you create the Portainer container in first place? As in exact docker run commands or in case...
Replies
7
Views
1,175
Looks like I triggered you somehow with my post: it was not my intention. I have no idea whether bash or...
Replies
4
Views
1,479

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top