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

The WEB UI doesn't have any error messages, but it also doesn't show any data, just the basic table #125

Open
ryan-liu-yes opened this issue Feb 21, 2025 · 1 comment

Comments

@ryan-liu-yes
Copy link

Image

Here is my configuration

root@9dadd141248a:/var/www/nfsen-ng/backend# cat /var/www/nfsen-ng/backend/settings/settings.php
<?php
/**
 * config file for nfsen-ng.
 *
 * remarks:
 * * database name = datasource class name (case-sensitive)
 * * log priority should be one of the predefined core constants prefixed with LOG_
 */

$nfsen_config = [
    'general' => [
        'ports' => [
            80, 22, 53,2152,
        ],
        'sources' => [
            'ryan',
        ],
        'filters' => [
            'proto udp',
            'proto tcp',
        ],
        'formats' => [
            'external_interfaces' => '%ts %td %pr %in %out %sa %sp %da %dp %ipkt %ibyt %opkt %obyt %flg',
        ],
        'db' => 'RRD',
        'processor' => 'NfDump',
    ],
    'frontend' => [
        'reload_interval' => 60,
        'defaults' => [
            'view' => 'graphs', // graphs, flows, statistics
            'graphs' => [
                'display' => 'sources', // sources, protocols, ports
                'datatype' => 'flows', // flows, packets, traffic
                'protocols' => ['any'], // any, tcp, udp, icmp, others (multiple possible if display=protocols)
            ],
            'flows' => [
                'limit' => 50,
            ],
            'statistics' => [
                'order_by' => 'bytes',
            ],
            'table'=> [
                'hidden_fields' => [
                    'flg', 'fwd', 'in', 'out', 'sas', 'das'
                ],
            ]
        ],
    ],
    'nfdump' => [
        'binary' => '/usr/local/bin/nfdump',
        'profiles-data' => '/var/nfdump/profiles-data',
        'profile' => 'live',
        'max-processes' => 1, // maximum number of concurrently running nfdump processes
    ],
    'db' => [
        'Akumuli' => [
            // 'host' => 'localhost',
            // 'port' => 8282,
        ],
        'RRD' => [],
    ],
    'log' => [
        #'priority' => \LOG_INFO, // LOG_DEBUG is very talkative!
        'priority' => LOG_DEBUG, // LOG_DEBUG is very talkative!
    ],
];

Here is the directory structure of my files

root@9dadd141248a:/var/cache/man/oldlocal# tree -h /var/nfdump/
/var/nfdump/
`-- [4.0K]  profiles-data
    `-- [4.0K]  live
        `-- [4.0K]  ryan
            |-- [4.0K]  2025
            |   `-- [4.0K]  02
            |       `-- [4.0K]  21
            |           |-- [ 528]  nfcapd.202502211130
            |           `-- [ 608]  nfcapd.202502211135

I can read nfcapd files correctly with nfdump.

root@9dadd141248a:/var/nfdump/profiles-data/live/ryan/2025/02/21# nfdump -r nfcapd.202502211130
Date first seen         Duration         Proto      Src IP Addr:Port          Dst IP Addr:Port   Packets    Bytes Flows
2025-02-07 10:29:46.046     00:07:24.794 UDP      192.168.10.40:0     ->    192.168.10.28:0         9795    1.6 M     1
2025-02-07 10:25:43.326     00:11:41.688 UDP       192.168.2.20:2123  ->    192.168.10.22:2123        15     1090     1
2025-02-07 10:25:43.326     00:11:41.688 UDP      192.168.10.22:2123  ->     192.168.2.20:2123        15     1321     1
2025-02-07 10:28:26.737     00:08:58.065 UDP      192.168.10.28:2152  ->    192.168.10.40:2152     11886    5.2 M     1
2025-02-07 10:28:26.737     00:08:58.065 UDP      192.168.10.40:2152  ->    192.168.10.28:2152     18023   13.6 M     1
2025-02-07 10:25:36.325     00:12:22.605 SCTP     192.168.10.21:0     ->    192.168.3.108:0           63     4792     1
2025-02-07 10:25:36.224     00:12:23.705 SCTP      192.168.2.25:0     ->    192.168.10.25:0           83    13842     1
2025-02-07 10:25:36.224     00:12:23.705 SCTP     192.168.10.25:0     ->     192.168.2.25:0           98    11948     1
2025-02-07 10:26:57.398     00:11:03.850 SCTP     192.168.10.21:0     ->    192.168.10.40:0          114    10788     1
2025-02-07 10:26:57.398     00:11:03.850 SCTP     192.168.10.40:0     ->    192.168.10.21:0          125    11038     1
Summary: total flows: 10, total bytes: 20.4 M, total packets: 40217, avg bps: 219354, avg pps: 53, avg bpp: 507
Time window: 2025-02-07 10:25:36 - 2025-02-07 10:38:01
Total flows processed: 10, passed: 10, Blocks skipped: 0, Bytes read: 904
Sys: 0.0000s User: 0.0023s Wall: 0.0012s flows/second: 8332.0 Runtime: 0.0014s
root@9dadd141248a:/var/nfdump/profiles-data/live/ryan/2025/02/21# nfdump -r nfcapd.202502211135
Date first seen         Duration         Proto      Src IP Addr:Port          Dst IP Addr:Port   Packets    Bytes Flows
2025-02-07 10:29:46.046     00:07:24.795 UDP      192.168.10.40:0     ->    192.168.10.28:0         9795    1.6 M     1
2025-02-07 10:25:43.326     00:11:41.689 UDP       192.168.2.20:2123  ->    192.168.10.22:2123        15     1090     1
2025-02-07 10:25:43.326     00:11:41.689 UDP      192.168.10.22:2123  ->     192.168.2.20:2123        15     1321     1
2025-02-07 10:28:26.737     00:08:58.065 UDP      192.168.10.28:2152  ->    192.168.10.40:2152     11886    5.2 M     1
2025-02-07 10:28:26.737     00:08:58.065 UDP      192.168.10.40:2152  ->    192.168.10.28:2152     18023   13.6 M     1
2025-02-07 10:25:36.326     00:12:22.604 SCTP     192.168.10.21:0     ->    192.168.3.108:0           63     4792     1
2025-02-07 10:25:36.225     00:12:23.704 SCTP      192.168.2.25:0     ->    192.168.10.25:0           83    13842     1
2025-02-07 10:25:36.225     00:12:23.704 SCTP     192.168.10.25:0     ->     192.168.2.25:0           98    11948     1
2025-02-07 10:26:57.399     00:11:03.849 SCTP     192.168.10.21:0     ->    192.168.10.40:0          114    10788     1
2025-02-07 10:26:57.399     00:11:03.849 SCTP     192.168.10.40:0     ->    192.168.10.21:0          125    11038     1
2025-02-07 10:29:46.047     00:07:24.794 UDP      192.168.10.40:0     ->    192.168.10.28:0         9795    1.6 M     1
2025-02-07 10:25:43.327     00:11:41.688 UDP       192.168.2.20:2123  ->    192.168.10.22:2123        15     1090     1
2025-02-07 10:25:43.327     00:11:41.688 UDP      192.168.10.22:2123  ->     192.168.2.20:2123        15     1321     1
2025-02-07 10:28:26.738     00:08:58.065 UDP      192.168.10.28:2152  ->    192.168.10.40:2152     11886    5.2 M     1
2025-02-07 10:28:26.738     00:08:58.065 UDP      192.168.10.40:2152  ->    192.168.10.28:2152     18023   13.6 M     1
2025-02-07 10:25:36.326     00:12:22.604 SCTP     192.168.10.21:0     ->    192.168.3.108:0           63     4792     1
2025-02-07 10:25:36.225     00:12:23.705 SCTP      192.168.2.25:0     ->    192.168.10.25:0           83    13842     1
2025-02-07 10:25:36.225     00:12:23.705 SCTP     192.168.10.25:0     ->     192.168.2.25:0           98    11948     1
2025-02-07 10:26:57.399     00:11:03.850 SCTP     192.168.10.21:0     ->    192.168.10.40:0          114    10788     1
2025-02-07 10:26:57.399     00:11:03.850 SCTP     192.168.10.40:0     ->    192.168.10.21:0          125    11038     1
Summary: total flows: 20, total bytes: 40.9 M, total packets: 80434, avg bps: 438708, avg pps: 107, avg bpp: 507
Time window: 2025-02-07 10:25:36 - 2025-02-07 10:38:01
Total flows processed: 20, passed: 20, Blocks skipped: 0, Bytes read: 1744
Sys: 0.0028s User: 0.0000s Wall: 0.0017s flows/second: 12076.9 Runtime: 0.0018s

I can generate the rrd file just fine.


root@9dadd141248a:/var/www/nfsen-ng/backend/datasources/data# ls -lrt
total 47988
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 ryan.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 80.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 22.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 53.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 2152.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 ryan_80.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 ryan_22.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 ryan_53.rrd
-rw-r--r-- 1 root root 5457448 Feb 21 15:30 ryan_2152.rrd

My logs keep importing into rrd

root@9dadd141248a:/var/www/nfsen-ng/backend# tail -f /var/log/journal/nfsen-ng.service.log
Processing source ryan (1/1)...
2025-02-21 15:27:33 Last update: 2025-02-21 11:35
2025-02-21 15:27:33 Scanning path /var/nfdump/profiles-data/live/ryan/2025/02/21
Sc...50.0% 1/2 ETC: < 1 sec. Elapsed: < 1 sec [===============>               ]

Proc...0.0% 0/1097 ETC: ???. Elapsed: < 1 sec [>                              ]
Processing source ryan (1/1)...
2025-02-21 15:28:03 Last update: 2025-02-21 11:35
2025-02-21 15:28:03 Scanning path /var/nfdump/profiles-data/live/ryan/2025/02/21
Sc...50.0% 1/2 ETC: < 1 sec. Elapsed: < 1 sec [===============>               ]


Proc...0.0% 0/1097 ETC: ???. Elapsed: < 1 sec [>                              ]
Processing source ryan (1/1)...
2025-02-21 15:28:33 Last update: 2025-02-21 11:35
2025-02-21 15:28:33 Scanning path /var/nfdump/profiles-data/live/ryan/2025/02/21
Sc...50.0% 1/2 ETC: < 1 sec. Elapsed: < 1 sec [===============>               ]

Proc...0.0% 0/1097 ETC: ???. Elapsed: < 1 sec [>                              ]
Processing source ryan (1/1)...
2025-02-21 15:29:03 Last update: 2025-02-21 11:35
2025-02-21 15:29:03 Scanning path /var/nfdump/profiles-data/live/ryan/2025/02/21
Sc...50.0% 1/2 ETC: < 1 sec. Elapsed: < 1 sec [===============>               ]

Proc...0.0% 0/1097 ETC: ???. Elapsed: < 1 sec [>                              ]
Processing source ryan (1/1)...
2025-02-21 15:29:33 Last update: 2025-02-21 11:35
2025-02-21 15:29:33 Scanning path /var/nfdump/profiles-data/live/ryan/2025/02/21
Sc...50.0% 1/2 ETC: < 1 sec. Elapsed: < 1 sec [===============>               ]


I've looked through our question bank, but I don't see anything like that, where else can I check?

@ryan-liu-yes
Copy link
Author

I've redeployed it again in ubuntu 22.04.
Two of the issues may have had an impact:

  1. After apt-get install software-properties-common, there may be a systemctl exception, which I solved by apt-get install systemctl

  2. Regarding the problem of the WEB UI not displaying data, I re-executed. /cli.php -f -p -ps import and I can see the data now.

Image

But this installation introduced a problem, I use DEBUG's priority debugging, but the logs are only very small, I don't have the logs that were always automatically imported in the last installation, this is strange, but it doesn't affect me to show the data.

root@10f9900ebcbf:/# tail -f /var/log/journal/nfsen-ng.service.log
int(0)
Daemon running, pid=32193
2025-02-24 15:56:12 CLI: Stopping daemon
Stopped.
2025-02-24 15:56:12 CLI: Starting daemon...
int(0)
Daemon running, pid=666
2025-02-24 15:59:50 CLI: Starting daemon...
int(0)
Daemon running, pid=57

My logs are set up as follows:

    'log' => [
        'priority' => LOG_DEBUG, // LOG_DEBUG is very talkative!
    ]

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

1 participant