Ales Komarek | 4b6c866 | 2014-02-24 21:48:29 +0100 | [diff] [blame] | 1 | |
Ales Komarek | 8649089 | 2015-12-04 16:43:48 +0100 | [diff] [blame] | 2 | ======= |
| 3 | Grafana |
| 4 | ======= |
Ales Komarek | 4b6c866 | 2014-02-24 21:48:29 +0100 | [diff] [blame] | 5 | |
| 6 | A beautiful, easy to use and feature rich Graphite dashboard replacement and graph editor. |
| 7 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 8 | |
Ales Komarek | 5a23b51 | 2015-12-08 11:20:02 +0100 | [diff] [blame] | 9 | Sample pillars |
| 10 | ============== |
Ales Komarek | 4b6c866 | 2014-02-24 21:48:29 +0100 | [diff] [blame] | 11 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 12 | |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 13 | Server deployments |
| 14 | ------------------ |
| 15 | |
| 16 | Server installed from system package |
| 17 | |
| 18 | .. code-block:: yaml |
Michael Kutý | a79bbdb | 2014-03-03 20:46:34 +0100 | [diff] [blame] | 19 | |
| 20 | grafana: |
| 21 | server: |
| 22 | enabled: true |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 23 | admin: |
| 24 | user: admin |
| 25 | password: passwd |
| 26 | database: |
| 27 | engine: sqlite |
| 28 | |
| 29 | Server installed with PostgreSQL database |
| 30 | |
| 31 | .. code-block:: yaml |
| 32 | |
| 33 | grafana: |
| 34 | server: |
| 35 | enabled: true |
| 36 | admin: |
| 37 | user: admin |
| 38 | password: passwd |
Ales Komarek | 9858822 | 2015-12-08 10:43:59 +0100 | [diff] [blame] | 39 | database: |
| 40 | engine: postgresql |
Michael Kutý | a79bbdb | 2014-03-03 20:46:34 +0100 | [diff] [blame] | 41 | host: localhost |
Ales Komarek | 9858822 | 2015-12-08 10:43:59 +0100 | [diff] [blame] | 42 | port: 5432 |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 43 | name: grafana |
| 44 | user: grafana |
| 45 | password: passwd |
| 46 | |
Guillaume Thouvenin | 70ca667 | 2016-10-26 11:25:37 +0200 | [diff] [blame] | 47 | Server installed with default StackLight JSON dashboards |
| 48 | |
| 49 | .. code-block:: yaml |
| 50 | |
| 51 | grafana: |
| 52 | server: |
| 53 | enabled: true |
| 54 | admin: |
| 55 | user: admin |
| 56 | password: passwd |
| 57 | dashboards: |
| 58 | enabled: true |
| 59 | path: /var/lib/grafana/dashboards |
| 60 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 61 | |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 62 | Collector setup |
| 63 | --------------- |
| 64 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 65 | Used to aggregate dashboards from monitoring node. |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 66 | |
| 67 | .. code-block:: yaml |
| 68 | |
| 69 | grafana: |
| 70 | collector: |
| 71 | enabled: true |
| 72 | |
| 73 | |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 74 | Client setups |
| 75 | ------------- |
| 76 | |
| 77 | Client enforced data sources |
| 78 | |
| 79 | .. code-block:: yaml |
| 80 | |
| 81 | grafana: |
| 82 | client: |
| 83 | enabled: true |
| 84 | server: |
| 85 | protocol: https |
| 86 | host: grafana.host |
| 87 | port: 3000 |
| 88 | token: token |
| 89 | datasource: |
| 90 | graphite: |
| 91 | type: graphite |
| 92 | host: mtr01.domain.com |
| 93 | protocol: https |
Ales Komarek | 9858822 | 2015-12-08 10:43:59 +0100 | [diff] [blame] | 94 | port: 443 |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 95 | elasticsearch: |
| 96 | type: elasticsearch |
| 97 | host: log01.domain.com |
Ales Komarek | 5a23b51 | 2015-12-08 11:20:02 +0100 | [diff] [blame] | 98 | port: 80 |
Ales Komarek | 5a23b51 | 2015-12-08 11:20:02 +0100 | [diff] [blame] | 99 | index: grafana-dash |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 100 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 101 | Client defined and enforced dashboard |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 102 | |
| 103 | .. code-block:: yaml |
| 104 | |
| 105 | grafana: |
| 106 | client: |
| 107 | enabled: true |
| 108 | server: |
| 109 | host: grafana.host |
| 110 | port: 3000 |
| 111 | token: token |
| 112 | dashboard: |
| 113 | system_metrics: |
| 114 | title: "Generic system metrics" |
| 115 | style: dark |
| 116 | editable: false |
| 117 | row: |
| 118 | top: |
| 119 | title: "First row" |
| 120 | |
| 121 | Client enforced dashboards defined in salt-mine |
| 122 | |
| 123 | .. code-block:: yaml |
| 124 | |
| 125 | grafana: |
| 126 | client: |
| 127 | enabled: true |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 128 | remote_data: |
| 129 | engine: salt_mine |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 130 | server: |
| 131 | host: grafana.host |
| 132 | port: 3000 |
| 133 | token: token |
| 134 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 135 | |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 136 | Usage |
| 137 | ===== |
| 138 | |
Ales Komarek | d125d51 | 2016-10-24 11:00:40 +0200 | [diff] [blame] | 139 | There's a difference between JSON dashboard representation and models we us. |
| 140 | The lists used in JSON format [for rows, panels and target] were replaced by |
| 141 | dictionaries. This form of serialization allows better merging and overrides |
| 142 | of hierarchical data structures that dashboard models are. |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 143 | |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 144 | The default format of Grafana dashboards with lists for rows, panels and targets. |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 145 | |
| 146 | .. code-block:: yaml |
| 147 | |
| 148 | system_metrics: |
| 149 | title: graph |
| 150 | editable: true |
| 151 | hideControls: false |
| 152 | rows: |
| 153 | - title: Usage |
| 154 | height: 250px |
| 155 | panels: |
| 156 | - title: Panel Title |
| 157 | span: 6 |
| 158 | editable: false |
| 159 | type: graph |
| 160 | targets: |
| 161 | - refId: A |
| 162 | target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle" |
| 163 | datasource: graphite01 |
| 164 | renderer: flot |
| 165 | showTitle: true |
| 166 | |
Ales Komarek | d125d51 | 2016-10-24 11:00:40 +0200 | [diff] [blame] | 167 | The modified version of Grafana dashboard format with dictionary declarations. |
| 168 | Please note that dictionary keys are only for logical separation and are not |
| 169 | displayed in generated dashboards. |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 170 | |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 171 | .. code-block:: yaml |
| 172 | |
| 173 | system_metrics: |
Ales Komarek | 7a593fa | 2016-10-22 17:32:35 +0200 | [diff] [blame] | 174 | system_metrics2: |
| 175 | title: graph |
| 176 | editable: true |
| 177 | hideControls: false |
| 178 | row: |
| 179 | usage: |
| 180 | title: Usage |
| 181 | height: 250px |
| 182 | panel: |
| 183 | usage-panel: |
| 184 | title: Panel Title |
| 185 | span: 6 |
| 186 | editable: false |
| 187 | type: graph |
| 188 | target: |
| 189 | A: |
| 190 | refId: A |
| 191 | target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle" |
| 192 | datasource: graphite01 |
| 193 | renderer: flot |
| 194 | showTitle: true |
Ales Komarek | ae47c9f | 2016-10-22 12:30:30 +0200 | [diff] [blame] | 195 | |
Ales Komarek | 9e05491 | 2016-10-22 00:36:50 +0200 | [diff] [blame] | 196 | |
Ales Komarek | 8649089 | 2015-12-04 16:43:48 +0100 | [diff] [blame] | 197 | Read more |
| 198 | ========= |
Ales Komarek | 4b6c866 | 2014-02-24 21:48:29 +0100 | [diff] [blame] | 199 | |
| 200 | * http://grafana.org/ |
Ales Komarek | 5a23b51 | 2015-12-08 11:20:02 +0100 | [diff] [blame] | 201 | * http://docs.grafana.org/reference/export_import/ |