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

Changed db, saved rules through provisioning api properly, but wouldnt appear in grafana alerting rule list #279

Open
haileymoon opened this issue Sep 30, 2022 · 0 comments

Comments

@haileymoon
Copy link

haileymoon commented Sep 30, 2022

  • What Grafana version and what operating system are you using?
    9.0.2

  • What are you trying to achieve?
    i want to see rules i've created by provisioning api in grafana.

Before i changed the grafana default db, when i used the provisioning api i was able to see the rule list right away. But once i changed the default db to mysql, the data does go in the db, but the grafana would display nothing.
image

  • How are you trying to achieve it?
    I used helm to install grafana, and in my deployment yaml file, i've changed the database part to mysql and its configs.
    grafana seems to know that the db changed, because it had no data when i deployed it with the new db (if i change it to sqlite, it still has the old data)
    But in the config>default.ini, the database setting is still set to sqlite, also the sample.ini.
    how would i properly change the db and make it read?(in the kubernetes environment?)
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    according to kubectl logs, for my get and post request, every request succeeded

the yaml file part that i edited goes like this (the ones with brackets are replaced with false values):

grafana.ini:
  database:
    type: mysql
    host: {theHost}
    name: {name}
    user: {user}
    password: {pwd}
    ssl_mode: false
    

  paths:
    data: /var/lib/grafana
    logs: /var/log/grafana
    plugins: /var/lib/grafana/plugins
    provisioning: /etc/grafana/provisioning
  analytics:
    check_for_updates: true
  log:
    mode: console
  log.console:
    format: json
  grafana_net:
    url: https://grafana.net
  server:
    protocol: http
    http_port: 3000
    domain: {my-domain}
    root_url: "%(protocol)s://%(domain)s/board/"
    serve_from_sub_path: true
    router_logging: true
    cert_file: /etc/secrets/tls.crt
    cert_key: /etc/secrets/tls.key
  auth:
    disable_login_form: false
  security:
    allow_embedding: true
    disable_gravatar: true
    x_content_type_options: true
  users:
    viewers_can_edit: false
  auth.anonymous:
    enabled: true
    org_name: Main Org.
    org_role: Editor
  auth.proxy:
    enabled: true
    header_name: {headername}
    header_property: email
    auto_sign_up: true
    sync_ttl: 60
    # headers: Email:X-User-Email, Name:X-User-Name
    # Read the auth proxy docs for details on what the setting below enables
    enable_login_token: false
  feature_toggles:
    enable: tempoSearch,tempoBackendSearch,newNavigation
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

1 participant