-
Notifications
You must be signed in to change notification settings - Fork 22
Grafana bridge container time different from host time
# date
Mon Jan 13 09:39:08 PM CET 2025
# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b8910c688b15 localhost/podman-pause:4.4.1-1676978277 About an hour ago Up About an hour 0.0.0.0:4242->4242/tcp, 0.0.0.0:9250->9250/tcp 9391f1192121-infra
977ac01c1de0 localhost/scale_bridge:test_8.0.2_prod sh -c python3 zim... About an hour ago Up About an hour 0.0.0.0:4242->4242/tcp, 0.0.0.0:9250->9250/tcp bridge-basic-auth-test
346a57e23572 localhost/podman-pause:4.4.1-1676978277 30 seconds ago Up 29 seconds 0.0.0.0:4243->4242/tcp, 0.0.0.0:9251->9250/tcp 3b33f10f785b-infra
7b39b67fa0d0 localhost/scale_bridge_arg:1.0_dev sh -c python zimo... 29 seconds ago Up 29 seconds 0.0.0.0:4243->4242/tcp, 0.0.0.0:9251->9250/tcp bridge-python-test
# podman exec -it 7b39b67fa0d0 /bin/bash
(app-root) bash-5.1# date
Mon Jan 13 08:41:16 PM UTC 2025
When container engines like Podman, Docker, or CRI-O run containers, they pull down the specified OCI image from a container registry. This image is built with a hardcoded link from /etc/localtime to one time zone. Usually, the time zone is set to the location where the image or base image was built, or to UTC±00:00 For more information, read the Readhat article Does your container know what time it is?
There are 2 ways you can fix this problem
- Sync time by mounting the time zone file from the host into the container.
See 'podman run' command documentation for [--tz] (https://docs.podman.io/en/stable/markdown/podman-run.1.html#tz-timezone)
# podman run -dt -p 4243:4242,9251:9250 -e "SERVER=9.152.187.254" -e "APIKEYVALUE=54dc249a-6de2-4399-bec0-6155f35ff3c7" -e "PORT=4242" -e "PROMETHEUS=9250" -e "BASICAUTHUSER=scale_admin" -e "BASICAUTHPASSW=TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==" -e "LOGLEVEL=5" -v /templog:/var/log/ibm_bridge_for_grafana --mount type=bind,src=/home/zimon/ZIMonSensors.cfg,target=/opt/IBM/zimon/ZIMonSensors.cfg,ro=true --tz CET --pod new:my-test-pod --name bridge-python-test scale_bridge_arg:1.0_dev
5121276ce494b68a49131817b7829f68701f992ffa081ac6f31f30c365778517
# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b8910c688b15 localhost/podman-pause:4.4.1-1676978277 About an hour ago Up About an hour 0.0.0.0:4242->4242/tcp, 0.0.0.0:9250->9250/tcp 9391f1192121-infra
977ac01c1de0 localhost/scale_bridge:test_8.0.2_prod sh -c python3 zim... About an hour ago Up About an hour 0.0.0.0:4242->4242/tcp, 0.0.0.0:9250->9250/tcp bridge-basic-auth-test
cfc6695d2ea1 localhost/podman-pause:4.4.1-1676978277 2 minutes ago Up 2 minutes 0.0.0.0:4243->4242/tcp, 0.0.0.0:9251->9250/tcp b8b869f6a80f-infra
5121276ce494 localhost/scale_bridge_arg:1.0_dev sh -c python zimo... 2 minutes ago Up 2 minutes 0.0.0.0:4243->4242/tcp, 0.0.0.0:9251->9250/tcp bridge-python-test
# podman exec -it 5121276ce494 /bin/bash
(app-root) bash-5.1# date
Mon Jan 13 09:46:10 PM CET 2025
- Set a system-wide default timezone for all your containers using containers.conf.
Step-by-step instructions are described in the Readhat article Does your container know what time it is?
Visit the IBM Storage Scale Knowledge Center for getting more info about the latest product updates
-
- Setup classic Grafana
- Make usage of Grafana Provisioning feature
-
- Installing RedHat community-powered Grafana operator from OperatorHub
- Creating Grafana instance using the RedHat community-powered Grafana-operator
- Creating Grafana Datasorce instance from Custom Resource managed by the RedHat community powered Grafana operator
- Importing the predefined dashboard from the example dashboards collection
- Exploring Grafana WEB interface for CNSA project in a k8s OCP environment
- How to setup Grafana instance to monitor multiple IBM Storage Scale clusters running in a cloud or mixed environment
- API key authentication
- Configurable bridge settings
- CherryPy builtin HTTP server settings
- How to setup HTTPS(SSL) connection
- Start and stop grafana-bridge with systemd
- Refresh IBM Storage Scale cluster configuration data cached by grafana bridge
- Accelerate the PrometheusExporter data retrieval time
- Optimize the performance of PrometheusExporter by using scrape_job params settings
- Grafana Dashboard Panel shows no metric values for a particular entity
- Missing Grafana-Operator on an OpenShift cluster
- Missing CherryPy packages
- What to do if your system is on Python < 3.8
- Grafana-bridge fails to start with Python3.8
- Grafana-bridge container time is different from a host time
- Verify that the grafana-bridge returns data as expected