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

[kube-prometheus-stack] How to change Timezone of Alert Manager UI? #4451

Open
rwlove opened this issue Apr 14, 2024 · 2 comments
Open

[kube-prometheus-stack] How to change Timezone of Alert Manager UI? #4451

rwlove opened this issue Apr 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rwlove
Copy link

rwlove commented Apr 14, 2024

Describe the bug a clear and concise description of what the bug is.

How do you change the timezone of the Alert Manager Web UI via values.yaml for kube-prometheus-stack.

I didn't see another place to ask questions. Apologies if this is the wrong place.

What's your helm version?

version.BuildInfo{Version:"v3.11", GitCommit:"", GitTreeState:"", GoVersion:"go1.20.1"}

What's your kubectl version?

1.29.2

Which chart?

kube-prometheus-stack

What's the chart version?

57.2.1

What happened?

TZ is UTC

What you expected to happen?

TZ is my actual timezone

How to reproduce it?

look at the web ui

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

View the Web UI. Alerts are in UTC.

Anything else we need to know?

no

@rwlove rwlove added the bug Something isn't working label Apr 14, 2024
@jkroepke
Copy link
Member

Try to set TZ environment variable on that container, like TZ=Europe/Berlin

@rwlove
Copy link
Author

rwlove commented Apr 15, 2024

OK, I guess I'll give this a shot.

diff --git a/kubernetes/main/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml b/kubernetes/main/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml
index 12601c24c..b0daabfaa 100644
--- a/kubernetes/main/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml
+++ b/kubernetes/main/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml
@@ -118,6 +118,8 @@ spec:
 
       alertmanagerSpec:
         replicas: 3
+        env:
+          TZ: "${TIMEZONE}"
         storage:
           volumeClaimTemplate:
             spec:

I do have TIMEZONE defined in my cluster I use it with many other charts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants