Code Monkey home page Code Monkey logo

Comments (14)

guilhermesteinmuller avatar guilhermesteinmuller commented on August 15, 2024 1

Hey there! Pretty good feature would be.

We switched our grafana repo to cloudalchemy recently. In ours, we used to push the dashboards locally.

So, I'd appreciate if you guys could take a look and if thinks is interesting, I can find some time to implement like we used to do :)

from ansible-grafana.

guilhermesteinmuller avatar guilhermesteinmuller commented on August 15, 2024 1

Sorry, I didn't pay attention to this.

I will take a look @paulfantom and I would love to contribute. I'll give a position asap! :-D

cheers

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

You're right. It should be implemented as a part of #30 but right now I don't have time to do this. Feel free to implement it 😄

Grafana even mentions this in their docs: http://docs.grafana.org/administration/provisioning/#dashboards

from ansible-grafana.

aman0019 avatar aman0019 commented on August 15, 2024

So was your plan to scrap how the role is provisioning dashboards altogether and move towards using Grafana's documented way i.e. YML config files in provisioning/dashboards?

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

That's right. However I planned to have both methods for some time since the new method is available only since grafana 5.0

from ansible-grafana.

aman0019 avatar aman0019 commented on August 15, 2024

Yes; also if I understood well if we move towards the YML file provisioning we would need to delay restarting Grafana until after the dashboard tasks are completed since as opposed to the API; YML provisioning files are only picked up at startup. Is that your understanding as well?

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

I haven't tried this method yet, so I am not 100% sure how this is handled by grafana.
In the docs it is said that grafana polls on the specified path and checks for changes. This means that we won't have to restart grafana on every new dashboard, but only when new YML providers file is created or changed.
I would like to limit restarts as much as I can.

from ansible-grafana.

aman0019 avatar aman0019 commented on August 15, 2024

I would like to limit restarts as much as I can.

makes sense

Apologies for asking twenty questions; just want to make sure I get this right. The API does support adding dashboards to folders...what are the benefits to be gained by moving to the 'provisioning by file' method?

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

For example, right now we don't have any method to copy custom dashboards and we rely only on grafana.net. By using 'provsioning by file' we can easily copy dashboards and as a bonus we could use ansible internals for detecting changes.

from ansible-grafana.

aman0019 avatar aman0019 commented on August 15, 2024

Agreed that detecting changes for dashboards provisioned through files is the most obvious benefit. As Grafana's documentation states; the other benefit is that one can push changes whilst Grafana is not running and these would be picked up on startup. However, whilst dashboard JSON files can be added/changed at runtime; the config file that defines dashboard providers would only be processed at startup and as such this needs to be provisioned before Grafana is restarted. Do you agree that we should provision a YAML config file that defines the ansible file dashboard provider before startup? and then we can provision dashboards using files in the dashboard.yml play.

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

Basically this is the same to what I had in mind. However we don't have to do anything before startup as we could apply handler task to restart grafana when dashboard providers are changed. This way we don't have to change order of included files in ansible role and still have dashboards.yml after task which starts grafana.

It would be awesome if grafana could react on SIGHUP to reload its config, this would allow easier provisioning without interrupts.

from ansible-grafana.

stale avatar stale commented on August 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ansible-grafana.

paulfantom avatar paulfantom commented on August 15, 2024

@guilhermesteinmuller wouldn't it be simpler to use http://docs.grafana.org/administration/provisioning/#dashboards ?

I am open to all contributions!

from ansible-grafana.

lock avatar lock commented on August 15, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from ansible-grafana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.