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

NFSEN запускается, но графики пусты #1

Open
eosfor opened this issue Aug 22, 2024 · 1 comment
Open

NFSEN запускается, но графики пусты #1

eosfor opened this issue Aug 22, 2024 · 1 comment

Comments

@eosfor
Copy link

eosfor commented Aug 22, 2024

Доброго дня, Вам

Пробую запустить все это добро на

Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Все вроде запускается с корректной тайм зоной, я могу зайти на nfsen в браузере, однако, графики пустые.

Похоже, что nfdump работает. Как минимум я вижу появляющиеся файлы в data/profiles-data

xxx@raspberrypi:~/repo/nfsen-docker $ tree data/profiles-data/
data/profiles-data/
└── live
    └── netflow
        ├── 2024
        │   └── 08
        │       ├── 21
        │       │   └── nfcapd.202408212325
        │       └── 22
        │           ├── nfcapd.202408220635
        │           ├── nfcapd.202408220655
        │           ├── nfcapd.202408220845
        │           └── nfcapd.202408220905
        └── nfcapd.current.14

6 directories, 6 files

Но графики пустые, куда бежать и что делать?

image

PS

xxx@raspberrypi:~/repo/nfsen-docker $ sudo docker compose logs
WARN[0000] /home/vlad/repo/nfsen-docker/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
nfsen  | Check for required Perl modules: All modules found.
nfsen  | setlogsock(): type='unix': path not available at libexec/Log.pm line 50.
nfsen  | Setup NfSen:
nfsen  | Version: 1.3.11: install.pl 2022-12-19
nfsen  |
nfsen  | Perl to use: [/usr/bin/perl] Setup php and html files.
nfsen  | mkdir /opt/nfsen/www
nfsen  |
nfsen  | Copy NfSen dirs etc bin libexec plugins doc ...
nfsen  | Copy config file 'etc/nfsen-dist.conf'
nfsen  |
nfsen  | In directory: /opt/nfsen/libexec ...
nfsen  | Update script: AbuseWhois.pm
nfsen  | Update script: Log.pm
nfsen  | Update script: Lookup.pm
nfsen  | Update script: NfAlert.pm
nfsen  | Update script: Nfcomm.pm
nfsen  | Update script: NfConf.pm
nfsen  | Update script: NfProfile.pm
nfsen  | Update script: NfSen.pm
nfsen  | Update script: NfSenRC.pm
nfsen  | Update script: NfSenRRD.pm
nfsen  | Update script: NfSenSim.pm
nfsen  | Update script: Nfsources.pm
nfsen  | Update script: Nfsync.pm
nfsen  | Update script: Notification.pm
nfsen  | In directory: /opt/nfsen/bin ...
nfsen  | Update script: nfsen
nfsen  | Update script: nfsend
nfsen  | Update script: RebuildHierarchy.pl
nfsen  | Update script: testPlugin
nfsen  |
nfsen  | Cleanup old files ...
nfsen  |
nfsen  | Setup directories:
nfsen  |
nfsen  | Use UID/GID 33 33
nfsen  | Exists: /opt/nfsen/var
nfsen  | Creating: mkdir /opt/nfsen/var/tmp
nfsen  | /opt/nfsen/var/tmp
nfsen  | Creating: mkdir /opt/nfsen/var/run
nfsen  | /opt/nfsen/var/run
nfsen  | Exists: /opt/nfsen/var/filters
nfsen  | Exists: /opt/nfsen/var/fmt
nfsen  | Exists: /opt/data/profiles-stat
nfsen  | Exists: /opt/data/profiles-stat/live
nfsen  | Exists: /opt/data/profiles-data
nfsen  | Exists: /opt/data/profiles-data/live
nfsen  |
nfsen  | Profile live: spool directories:
nfsen  | Exists: netflow
nfsen  | Rename gif RRDfiles ... done.
nfsen  | RRD DB 'netflow.rrd' already exists!
nfsen  | Use existing profile info for profile 'live'
nfsen  |
nfsen  | Can not get semaphore:  at libexec/Nfsync.pm line 48.
nfsen  | setlogsock(): type='unix': path not available at /opt/nfsen/libexec/Log.pm line 50.
nfsen  | -l is a legacy option and may get removed in future. Please use -w to set output directory
nfsen  | Add flow source: ident: netflow, IP: any IP, flowdir: /opt/data/profiles-data/live/netflow
nfsen  | Starting nfcapd:(netflow)[16]
nfsen  | setlogsock(): type='unix': path not available at /opt/nfsen/libexec/Log.pm line 50.
nfsen  | Starting nfsend.

xxx@raspberrypi:~/repo/nfsen-docker $ sudo docker compose top
WARN[0000] /home/vlad/repo/nfsen-docker/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
nfsen
UID        PID     PPID    C    STIME   TTY   TIME       CMD
root       31989   31968   0    23:28   ?     00:00:00   bash /opt/app/run.sh
www-data   32082   31989   0    23:28   ?     00:00:01   /usr/bin/perl -w /opt/nfsen/bin/nfsend
www-data   32083   32082   0    23:28   ?     00:00:00   /opt/nfsen/bin/nfsend-comm
root       32085   31989   0    23:28   ?     00:00:00   php-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)
root       32089   31989   0    23:28   ?     00:00:00   nginx: master process /usr/sbin/nginx
www-data   32090   32089   0    23:28   ?     00:00:00   nginx: worker process
www-data   32091   32089   0    23:28   ?     00:00:00   nginx: worker process
www-data   32092   32089   0    23:28   ?     00:00:00   nginx: worker process
root       32093   31989   0    23:28   ?     00:00:00   sleep infinity
www-data   32094   32089   0    23:28   ?     00:00:00   nginx: worker process
www-data   32335   32085   0    23:29   ?     00:00:00   php-fpm: pool www
www-data   32374   32085   0    23:29   ?     00:00:00   php-fpm: pool www
www-data   32664   32085   0    23:29   ?     00:00:00   php-fpm: pool www
@eosfor eosfor changed the title NFSEN запускается, но они пусты NFSEN запускается, но графики пусты Aug 22, 2024
@alekskomp
Copy link
Owner

Приветствую.
Судя по выводу docker compose top у вас почему-то не запускается nfcapd
При нормальном запуске должно быть так:

# docker compose top
nfsen
PID     USER   TIME   COMMAND
9511    root   0:00   bash /opt/app/run.sh                                                                                                                                             
9552    xfs    0:04   /usr/bin/nfcapd -D -p 9995 -u www-data -g www-data -B 200000 -S 1 -P /opt/nfsen/var/run/p9995.pid -j -t 300 -I netflow -l /opt/data/profiles-data/live/netflow
9555    xfs    0:00   {nfsend} /usr/bin/perl -w /opt/nfsen/bin/nfsend                                                                                                                  
9556    xfs    0:00   {/opt/nfsen/bin/} /opt/nfsen/bin/nfsend-comm                                                                                                                     
9558    root   0:00   {php-fpm8.2} php-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)                                                                                             
9562    root   0:00   nginx: master process /usr/sbin/nginx                                                                                                                            
9563    xfs    0:00   nginx: worker process                                                                                                                                            
9564    xfs    0:00   nginx: worker process                                                                                                                                            
9565    root   0:00   sleep infinity                                                                                                                                                   
10307   xfs    0:00   {php-fpm8.2} php-fpm: pool www                                                                                                                                   
10962   xfs    0:00   {php-fpm8.2} php-fpm: pool www                                                                                                                                   
11721   xfs    0:00   {php-fpm8.2} php-fpm: pool www

Возможно это как-то связано c тем, что у вас ARM. К сожалению, я могу протестировать только на x86_64

Попробуйте зайти в контейнер и запустить nfcapd вручную:
/usr/bin/nfcapd -D -p 9995 -u www-data -g www-data -B 200000 -S 1 -P /opt/nfsen/var/run/p9995.pid -j -t 300 -I netflow -l /opt/data/profiles-data/live/netflow

Посмотрите на что он ругается

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