| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| - name: "download grafana rpm" |
| get_url: |
| args: |
| url: https://grafanarel.s3.amazonaws.com/builds/{{ grafana_rpm }} |
| dest: /tmp/{{ grafana_rpm }} |
| checksum: "{{ grafana_checksum }}" |
| force: no |
| - name: "ensure grafana is installed" |
| yum: name=/tmp/{{ grafana_rpm }} state=present |
| - name: "configure grafana" |
| template: src=grafana.ini dest=/etc/grafana/grafana.ini |
| - name: "ensure dashboards directory exists" |
| file: path=/etc/grafana/dashboards state=directory owner=grafana group=grafana |
| - name: "add cluster dashboard configuration" |
| template: src=cluster-dashboard.json dest=/etc/grafana/dashboards/cluster-dashboard.json owner=grafana group=grafana |
| - name: "configure fluo dashboards" |
| get_url: url=https://raw.githubusercontent.com/apache/fluo/main/contrib/grafana/{{ item }} dest=/etc/grafana/dashboards/{{ item }} |
| with_items: |
| - fluo-recent-dashboard.json |
| - fluo-historical-dashboard.json |
| - name: "configure accumulo dashboards" |
| get_url: url=https://raw.githubusercontent.com/apache/fluo-uno/main/plugins/influx-metrics/accumulo-dashboard.json dest=/etc/grafana/dashboards/accumulo-dashboard.json |
| - name: "ensure owner and group are correct for /etc/grafana" |
| file: path=/etc/grafana/ recurse=yes owner=grafana group=grafana |
| - name: "ensure grafana is running (and enable it at boot)" |
| service: name=grafana-server state=started enabled=yes |
| notify: |
| - add datasources |