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: Watchdog with Reloading #12

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Feature: Watchdog with Reloading #12

merged 1 commit into from
Apr 26, 2024

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Apr 25, 2024

About

The idea of this patch is to make grafana-import support almost end-to-end dashboard-as-code authoring/editing workflows, expanding the "builder support" feature introduced by GH-10 by a "watchdog" feature.

When enabled, it watches the input dashboard for changes on disk, and, when changed, it re-uploads the dashboard to the Grafana API. It is using the watchdog package to do its job. Thanks, @gorakhargosh.

Usage

On the import action, the feature can be enabled using the --reload command line option.

Synopsis

Prepare.

wget https://github.com/grafana-toolbox/grafana-snippets/raw/main/dashboard/gd-prometheus.py
export GRAFANA_URL=http://admin:admin@localhost:3000

Watch the input dashboard for changes on disk, and re-upload it, when changed.

grafana-import import --overwrite --reload -i gd-prometheus.py

References

Copy link
Collaborator

@peekjef72 peekjef72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

@amotl amotl force-pushed the adjust-project-org-and-name branch from 34776e8 to e593218 Compare April 26, 2024 21:40
Base automatically changed from adjust-project-org-and-name to main April 26, 2024 21:40
@amotl amotl merged commit e35531d into main Apr 26, 2024
2 checks passed
@amotl amotl deleted the reload branch April 26, 2024 21:41
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

Successfully merging this pull request may close these issues.

2 participants