carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

How to regenerate grafana.ini after sercret update? #57

Closed zoide closed 4 years ago

zoide commented 4 years ago

Hi, I have edited the grafana-config secret to enable basic.auth. I do not understand how to regenerate the grafana.ini with this change. I have deleted the pod, it was recreated, but the config is still the old one.

Please help, and thanks for the great work! Cheers, udo.

carlosedp commented 4 years ago

I believe one option would be editing base_operator_stack.jsonnet parameters here:

https://github.com/carlosedp/cluster-monitoring/blob/9b175416072d29e207977637d0aac8592d1d8d57/base_operator_stack.jsonnet#L44-L58

And re-generating the manifests.

zoide commented 4 years ago

Thanks,

I've changed those vaules and had to update only the manifeste/grafana-config.yaml file. Afterwards I deleted the grafana pod. That changed the values.

carlosedp commented 4 years ago

Great!

prasenforu commented 4 years ago

Hi

for me its saying "Invalid Username or Password" I took username as admin

prasenforu commented 4 years ago

my details as follows ...

grafana.ini: |
  [auth.anonymous]
  enabled = false
  [auth.basic]
  enabled = true
  [session]
  provider = memory
  [smtp]
  enabled = true
  from_address = myemail@gmail.com
  from_name = Grafana Alert
  host = smtp-server.monitoring.svc:25
  password = 12345678
  skip_verify = true
  user = pkar

same for if I use different user

zoide commented 4 years ago

Use the same username/password that you use to log in via the web-interface. I needed this in order to access the http-api. It doesn't change the behaviour of the web-frontend. You might have a different issue here.

prasenforu commented 4 years ago

@zoide Thanks ..