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

[FEATURE] Add a mix task to render the json for manual import into Grafana #135

Open
nacengineer opened this issue Apr 11, 2022 · 2 comments
Assignees

Comments

@nacengineer
Copy link
Contributor

Thanks for all the work on this mix module.

This might be a dumb request but our production servers don't have access to our Grafana instance so auto publishing to Grafana, while nice, isn't really something we can do.

I think I see the dashbaords in the /priv directory with a little EEX inject but IMO it would be nice to have a mix task that just spits out the dashboards into STDOUT for copy and paste into Grafana. Automation is always nice right up until it isn't. 😀

@lairtonlelis
Copy link

I was able to generate each dashboard that I was using individually by using the following mix task:

mix prom_ex.dashboard.export --dashboard application.json --file-path application.json

You need to replace application with the dashboard you want to export. This will generate a file in priv/application.json that you can use to import to Grafana.

@lairtonlelis
Copy link

You can find the documentation for this command here:

https://hexdocs.pm/prom_ex/Mix.Tasks.PromEx.Dashboard.Export.html

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

3 participants