]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-grafana: Optionally update alert dashboard
authorZack Cerza <zack@redhat.com>
Fri, 1 Sep 2017 16:16:53 +0000 (10:16 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 5 Sep 2017 18:02:35 +0000 (12:02 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/README.md
ansible/roles/ceph-grafana/defaults/main.yml
ansible/roles/ceph-grafana/tasks/configure_grafana.yml

index 2261a5298e5dfef64d32932f2fca0a47504a2a09..78bc4c11294e3a082ddacb54e65a51e5c1be091c 100644 (file)
@@ -60,6 +60,7 @@ You may override certain variables by creating a `vars.yml` file:
         - ['1m', '30d']
         - ['15m', '5y']
     ```
+- `update_alerts`: Whether to update the alerts dashboard along with the rest. Removes any user-defined alerts. Default: false
 
 These variables are only relevent when `devel_mode` is true:
 - `use_epel`: Whether or not to use EPEL and grafana.com instead of ceph.com-sourced packages for dependencies. Default: false
index 091e3b4db3b868299dacf6dc3898742885ac0c5b..b5691401e0d8587098ec41c942121c42c1889df5 100644 (file)
@@ -3,6 +3,7 @@ defaults:
   # graphite defaults are now in the cephmetrics-common role since the
   # ceph-collectd role needs access to them
   replace_dashboards: true
+  update_alerts: false
   grafana:
     datasource: Local
     # Note: changing this value won't update the password in Grafana itself;
index b7b2ec46d364affa2b68c4660d03b58e625cfe84..de3d0474c1fd95090f293a02dc4c89dbdee403e6 100644 (file)
     - dashboards
 
 - name: Push dashboards to Grafana
-  command: "{{ dashupdate_cmd }} -m {{ dashupdate_mode }} -c /tmp/dashboard.yml -D {{ dashboard_dir }}"
+  command: "{{ dashupdate_cmd }} -m {{ dashupdate_mode }} -c /tmp/dashboard.yml -D {{ dashboard_dir }}{{ ' -A' if update_alerts else '' }}"
   tags:
     - dashboards