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

No data displayed... because of timezone mismatch between grafana and cAdvisor #29

Closed
ebreton opened this issue Dec 22, 2016 · 6 comments

Comments

@ebreton
Copy link

ebreton commented Dec 22, 2016

Hi guys,

I have encountered the same symptom as a few earlier: no data displayed in my grafana dashboard.

When looking closer, I found out that grafana was using the timezone of my Mac (UTC) whereas cAdvisor was pushing its metrics with a 9:30 hours shift...

Therefore, data appears on Grafana... but in the past.. :)

Do you know any way to fix this ?

I have post a question on cAdvisor (google/cadvisor#1562) but may be you know faster ^^

Cheers
Manu

@llitfkitfk
Copy link
Collaborator

can you volume the host timezone to cAdvisor and try again?

@ebreton
Copy link
Author

ebreton commented Dec 22, 2016

sorry, I don't get what I have to do :(

@llitfkitfk
Copy link
Collaborator

docker run -it alpine:3.4 sh

https://wiki.alpinelinux.org/wiki/Setting_the_timezone

use docker cp copy the right timezone of the alpine container to host

run cAdvisor -v /host/alpine-timezone:/cadvisor-container-timezone

@ebreton
Copy link
Author

ebreton commented Dec 22, 2016

I have modified the alpine image as suggested. And the docker-compose down and up again.

It now works as expected :)

But is there a way to automate this ? It is not very satisfying this way...

@llitfkitfk
Copy link
Collaborator

llitfkitfk commented Dec 23, 2016

@ebreton this is the only way to change container timezone.

Or you can make you own Dockerfile:

FROM cadvisor
ADD ./expected-timezone /container-timezone

I think you can close this issue.

@ebreton
Copy link
Author

ebreton commented Dec 28, 2016

yep. good advice for the Dockerfile. Cheers !

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