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