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
Grafana configuration #53874
Grafana configuration #53874
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for doing this! I recently configured a Grafana and I missed such a feature! I tested this locally in a VM and it seems fine.
Below are some review comments. Feel free to ping me if you need further assistance.
Also, please rename your commits as described in the contribution guidelines, i.e. nixos/grafana: implement dashboard & datasource provisioning
.
5e88f78
to
554ebac
Compare
@Ma27 Updated per comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in a VM, I really like it 👍
I'll write some changelog, but I guess that this should be mergable then.
Adds the ability to automatically provision datasources and dashboards.
rebased onto master and added a changelog entry. |
@atopuzov thanks! |
Thanks for the work here; declarative grafana provisioning looks really slick and I'm looking forward to trying it out in NixOS 19.03! |
I have found some bugs with this. For some reason, non of the introduced options here actually get typechecked by the nixos module system. E.g. you can omit any of the fields and it will just compile. Also if you mistype any of the fields it works, and it also works when you use the wrong type anywhere. I have a feeling the typechekcing is somehow disabled due to the custom e.g. the following config just works, whilst it's clearly wrong:
|
Nevermind I forgot to enable |
Provision data sources and dashboards declarativly
http://docs.grafana.org/administration/provisioning/
Example usage:
This adds
prometheus
as datasource to grafana and a dashboard provider path "/etc/nixos/grafana-dashboards" which is scanned by grafana and dashboards are automatically added.Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)