ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.27k stars 656 forks source link

NTOPNG does not get timezone via DOCKER #8579

Closed ptocadoa closed 3 months ago

ptocadoa commented 3 months ago

My ntopng compose image

ptocadoa commented 3 months ago

what i see is in GMT image

cardigliano commented 3 months ago

This seems to be the same as https://github.com/ntop/ntopng/issues/8571 Please avoid opening multiple tickets for the same issue.

ptocadoa commented 3 months ago

Perhaps #8571 issue was not clear and was closed maybe too fast (I was getting different TZ at diferent places) Today I have forced a redeploy of the docker with the above yaml and NTOPNG does not get the TZ specified.

cardigliano commented 3 months ago

An update for the ntopng.dev image should be available on dockerhub, it seems the tzdata package was not installed which affects the timezone. Please check the new image and let us know.

ptocadoa commented 3 months ago

Although It seems I am using latest version, it says TZ=UTC image

If i connect to ntopng command line: image

cardigliano commented 3 months ago

Could you check the time to see if it is correct, regardless of the printed Timezone name? Please also provide the date output

ptocadoa commented 3 months ago

image Screenshot taken right now. Please note the local timezone at the taskbar vs the GMT timezone inside the browser.

image Please note the date at the host (above) and date inside ntopng docker.

cardigliano commented 3 months ago

Could you run apt install tzdata in the container and issue date again?

ptocadoa commented 3 months ago

image Installed tzdata in the container Date now reports correctly in bash At the botton of the ntopng page, the date is local. The dashboards, filters, graphs are still using epoch time and GMT timezone.

cardigliano commented 3 months ago

d31236f7ed4e2f3c1e7b61aa7c4a2b8db5acae30 probably fixes this, please wait for the new docker images (tomorrow)

ptocadoa commented 3 months ago

date+time seems to have been corrected: image

but as time goes by: image

graphs do not appear: image

I have tried to reset ntop preferences via: redis-cli keys "ntopng.*" | xargs redis-cli unlink

MatteoBiscosi commented 3 months ago

what are you currently using, rrd or influxdb?

ptocadoa commented 3 months ago

I am currently using RRD, cleaning redis preferences. I have just changed to Influx 1.8.10....commenting rsults in a few minutes

Changing to Influx makes unresponsive my ntopng docker. Access denied to folder/files appear: 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/-1/top_talkers/) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/-1/alerts/) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/0/top_talkers/) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/0/alerts/) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/ts_schemas) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/scripts_data) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface/interface) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/httpdocs) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/alert_endpoints) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface/network) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/http_lint) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/menu_items) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/locales) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system/active_monitoring) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/check_definitions) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/scripts) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system/system) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system/snmp_device) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/system/syslog) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/alert_definitions) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/modules) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface/flow) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/callbacks/interface/host) failed [13/Permission denied] 02/Aug/2024 12:49:46 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/scripts/templates) failed [13/Permission denied] 02/Aug/2024 12:49:49 [Utils.cpp:761] WARNING: mkdir(/var/lib/ntopng/tmp/influxdb/) failed [13/Permission denied] [admin@NAS164B9C ntopng]#

MatteoBiscosi commented 3 months ago

To do that, you need to add the option to the configuration file: --dont-change-user

ptocadoa commented 3 months ago

I have deleted the folder of my docker ntopng and recreated I had configured influxdb as backend Restarted the docker and voila, graphs appear using influxdb

cardigliano commented 3 months ago

Thank you for reporting, this seems solved