jakubplichta / grafana-dashboard-builder

Generate Grafana dashboards with YAML
Apache License 2.0
147 stars 42 forks source link

Create custom template from variable #64

Closed t-8ch closed 8 years ago

t-8ch commented 9 years ago

It seems at the moment it is impossible to create a custom template variable in the dashboard from a variable defined in the builder yaml file.

jakubplichta commented 8 years ago

@t-8ch can you please provide example of what you are trying to accomplish? Thanks!

t-8ch commented 8 years ago

@jakubplichta This works:

- name: 'some template'
  templates:
    - custom:
        - name: 'var'
          options:
            - a
            - b

What I would like to use:

- name: 'some dashboard'
  dashboard:
    - templates:
      - another-template:
          choices: '{nodes}'
    # actually this would get passed down from further up in my case
    nodes:
      - x
      - y

- name: 'another-template'
  templates:
    - custom:
        - name: 'choice'
          options: '{choices}'
jakubplichta commented 8 years ago

I see, actually this looks very similar to #61 . I'll try to handle it soon.