mbolli / nfsen-ng

Responsive NetFlow visualizer built on top of nfdump tools.
Apache License 2.0
231 stars 43 forks source link

Configuration Issues #85

Closed rohanrajnv closed 9 months ago

rohanrajnv commented 1 year ago

I am installing nfsen-ng and have a hard time making it work. Everything seems to be in order, but I get nothing in the UI.

/var/nfdump/profiles-data/live/source1/
├── [4.0K]  2022
│   └── [4.0K]  12
│       ├── [4.0K]  13
│       │   └── [4.0K]  23
│       │       ├── [419K]  nfcapd.202212132305
│       │       ├── [512K]  nfcapd.202212132310
│       │       └── [545K]  nfcapd.202212132315
│       └── [4.0K]  14
│           └── [4.0K]  07
│               └── [198K]  nfcapd.202212140745
├── [228K]  nfcapd.202212132325
├── [3.0K]  nfcapd.202212140747
├── [272K]  nfcapd.current.32700
└── [ 276]  nfcapd.current.51136

I have the following configuration in my /var/www/html/nfsen-ng/backend/settings/settings.php

<?php
$nfsen_config = array(
    'general' => array(
        'ports' => array(
            80, 22, 53,
        ),
        'sources' => array(
            //'source1', 'source2',
        ),
        'db' => 'RRD',
        'processor' => 'NfDump',
    ),
    'frontend' => array(
        'reload_interval' => 60,
        'defaults' => array(
            'view' => 'graphs', // graphs, flows, statistics
            'graphs' => array(
                'display' => 'sources', // sources, protocols, ports
                'datatype' => 'flows', // flows, packets, bytes
                'protocols' => array('any'), // any, tcp, udp, icmp, others (multiple possible if display=protocols)
            ),
            'flows' => array(
                'limit' => 50,
            ),
            'statistics' => array(
                'order_by' => 'bytes',
            ),
        ),
    ),
    'nfdump' => array(
        'binary' => '/usr/bin/nfdump',
        'profiles-data' => '/var/nfdump/profiles-data/',
        'profile' => 'live',
        'max-processes' => 5, // maximum number of concurrently running nfdump processes
    ),
    'db' => array(
        'Akumuli' => array(
            //'host' => 'localhost',
            //'port' => 8282,
        ),
        'RRD' => array()
    ),
    'log' => array(
        'priority' => LOG_INFO, // LOG_DEBUG is very talkative!
    )
);

I cannot see any traffic in the webgui. is there anything i am missing in the config?

6 directories, 8 files

mbolli commented 1 year ago

Seems like there is a level too much: It should be 2022\12\13 instead of 2022\12\13\23 (see readme). Can you try that?

rohanrajnv commented 1 year ago

I have checked the readme file and i am sorry i am not able to change the folder structure. i run the following command it automatically creates the folders sudo nfcapd -z -w -D -T all -l /var/nfdump/profiles-data/live/source1/ -I any -S 2 -p 9995

rohanrajnv commented 1 year ago

i have checked the folder issue /var/nfdump/profiles-data/live/source1/ ├── [4.0K] 2022 │   └── [4.0K] 12 │   └── [4.0K] 14 │   ├── [406K] nfcapd.202212141920 │   └── [525K] nfcapd.202212141925 └── [ 276] nfcapd.current.75297

I changed the command to sudo nfcapd -z -w -D -T all -l /var/nfdump/profiles-data/live/source1/ -I any -S 1 -p 9995

and i changed the configuration in the settings.php $nfsen_config = array( 'general' => array( 'ports' => array( 80, 22, 53, ), 'sources' => array( 'source1', 'source2', ), 'db' => 'RRD', 'processor' => 'NfDump', ), 'frontend' => array( 'reload_interval' => 60, 'defaults' => array( 'view' => 'graphs', // graphs, flows, statistics 'graphs' => array( 'display' => 'sources', // sources, protocols, ports 'datatype' => 'flows', // flows, packets, bytes 'protocols' => array('any'), // any, tcp, udp, icmp, others (multiple possible if display=protocols) ), 'flows' => array( 'limit' => 50, ), 'statistics' => array( 'order_by' => 'bytes', ), ), ), 'nfdump' => array( 'binary' => '/usr/bin/nfdump', 'profiles-data' => '/var/nfdump/profiles-data', 'profile' => 'live', 'max-processes' => 5, // maximum number of concurrently running nfdump processes ), 'db' => array( 'Akumuli' => array( //'host' => 'localhost', //'port' => 8282, ), 'RRD' => array() ), 'log' => array( 'priority' => LOG_INFO, // LOG_DEBUG is very talkative! ) );

but i am getting a error in gui

Got 400 - Bad Request. rrd_xport failed. opening '/var/www/html/nfsen-ng/backend/datasources/data/source2.rrd': No such file or directory

image

newerit commented 11 months ago

manual https://blog.remontti.com.br/7610

jult commented 9 months ago

oh and also:

# ./install.pl etc/nfsen-dist.conf
Check for required Perl modules: All modules found.
Setup NfSen:
Version: 1.3.10: install.pl 2022-12-19

Perl to use: [/usr/bin/perl]
nfdump tools installation error: 'nfcapd' not found in '/usr/local/bin' at ./install.pl line 195, <STDIN> line 1.
Dona21 commented 9 months ago

@jult you are mixing things up. nfsen-ng is not nfdump, it is just using it. Therefore, as mentioned more than once, for any nfdump suite tools you should ask that directly there https://github.com/phaag/nfdump