Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple instance with systemctl #462

Closed
bricevalenza opened this issue Jan 5, 2021 · 5 comments
Closed

Multiple instance with systemctl #462

bricevalenza opened this issue Jan 5, 2021 · 5 comments

Comments

@bricevalenza
Copy link

Hello,

How can I manage multiple instances of nprobe on the same machine using systemctl service management?

the need is to have two NPROBE listening on two different ports, which send to two different ntop interfaces

Thank you :)

@cardigliano
Copy link
Member

Do you mean UDP ports or interfaces? Are you collecting Netflow or capturing live traffic?

@bricevalenza
Copy link
Author

bricevalenza commented Jan 5, 2021

Sorry I opened this issues in parallel with my answer to another one (#173) because I saw that it was closed and I thought I might not get any feedback.

i capture Netflow.

I want to be able to have two listening ports (UDP i think) on a single physical interface. In order to be able to separate the interfaces on NTOP
Exemple :
1 :
--zmq="tcp://*:5556"
--collector-port=2055
-n=none
-i=none
-V 9

2 :
--zmq="tcp://*:5557"
--collector-port=6343
-n=none
-i=none
-V 9

On ntop:
-G=/var/run/ntopng.pid
--interface="tcp://127.0.0.1:5556"
--interface="tcp://127.0.0.1:5557"

Thanks.

@cardigliano
Copy link
Member

This looks fine

@bricevalenza
Copy link
Author

ok, but how do you do that with systemd and with only one physical interface?

Systemd only looks at nprobe.conf only

@bricevalenza
Copy link
Author

Ok, I found the solution, the idea is to use what is described in this documentation:
: https://www.ntop.org/guides/nprobe/how_to_start.html#automatic-startup

But without any concept of interface (physical)
image

nprobe.conf :
-g=/var/run/nprobe-01.pid
--zmq="tcp://*:5556"
--collector-port=2055
-n=none
-i=none
-V 9

nprobe-switch.conf :
-g=/var/run/nprobe-switch.pid
--zmq="tcp://*:5557"
--collector-port=6343
-n=none
-i=none
-V 9

etc...

Note : i think the -g is useless with systemctl

and for activate the multi instance :
systemctl enable nprobe@switch
systemctl start nprobe@switch

nprobe@name where name is the same as cfg file (nprobe-name.cfg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants