├── LICENSE ├── README.md ├── build finished successful.png ├── docker-compose.yml ├── grafana ├── Dockerfile ├── config.ini ├── dashboards │ ├── docker containers.json │ └── system metrics.json └── provisioning │ ├── dashboards │ └── all.yml │ └── datasources │ └── all.yml ├── influxdb ├── Dockerfile ├── influxdb.conf └── my_entrypoint.sh ├── nginx ├── Dockerfile └── nginx.conf ├── node-red-test ├── Dockerfile └── settings.js ├── node-red ├── Dockerfile └── settings.js ├── system_metrics_dashboard_1_of_2.png ├── system_metrics_dashboard_2_of_2.png └── telegraf ├── Dockerfile └── telegraf.conf /LICENSE: -------------------------------------------------------------------------------- 1 | Eclipse Public License - v 2.0 2 | 3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 4 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 5 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 6 | 7 | 1. DEFINITIONS 8 | 9 | "Contribution" means: 10 | 11 | a) in the case of the initial Contributor, the initial content 12 | Distributed under this Agreement, and 13 | 14 | b) in the case of each subsequent Contributor: 15 | i) changes to the Program, and 16 | ii) additions to the Program; 17 | where such changes and/or additions to the Program originate from 18 | and are Distributed by that particular Contributor. A Contribution 19 | "originates" from a Contributor if it was added to the Program by 20 | such Contributor itself or anyone acting on such Contributor's behalf. 21 | Contributions do not include changes or additions to the Program that 22 | are not Modified Works. 23 | 24 | "Contributor" means any person or entity that Distributes the Program. 25 | 26 | "Licensed Patents" mean patent claims licensable by a Contributor which 27 | are necessarily infringed by the use or sale of its Contribution alone 28 | or when combined with the Program. 29 | 30 | "Program" means the Contributions Distributed in accordance with this 31 | Agreement. 32 | 33 | "Recipient" means anyone who receives the Program under this Agreement 34 | or any Secondary License (as applicable), including Contributors. 35 | 36 | "Derivative Works" shall mean any work, whether in Source Code or other 37 | form, that is based on (or derived from) the Program and for which the 38 | editorial revisions, annotations, elaborations, or other modifications 39 | represent, as a whole, an original work of authorship. 40 | 41 | "Modified Works" shall mean any work in Source Code or other form that 42 | results from an addition to, deletion from, or modification of the 43 | contents of the Program, including, for purposes of clarity any new file 44 | in Source Code form that contains any contents of the Program. Modified 45 | Works shall not include works that contain only declarations, 46 | interfaces, types, classes, structures, or files of the Program solely 47 | in each case in order to link to, bind by name, or subclass the Program 48 | or Modified Works thereof. 49 | 50 | "Distribute" means the acts of a) distributing or b) making available 51 | in any manner that enables the transfer of a copy. 52 | 53 | "Source Code" means the form of a Program preferred for making 54 | modifications, including but not limited to software source code, 55 | documentation source, and configuration files. 56 | 57 | "Secondary License" means either the GNU General Public License, 58 | Version 2.0, or any later versions of that license, including any 59 | exceptions or additional permissions as identified by the initial 60 | Contributor. 61 | 62 | 2. GRANT OF RIGHTS 63 | 64 | a) Subject to the terms of this Agreement, each Contributor hereby 65 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 66 | license to reproduce, prepare Derivative Works of, publicly display, 67 | publicly perform, Distribute and sublicense the Contribution of such 68 | Contributor, if any, and such Derivative Works. 69 | 70 | b) Subject to the terms of this Agreement, each Contributor hereby 71 | grants Recipient a non-exclusive, worldwide, royalty-free patent 72 | license under Licensed Patents to make, use, sell, offer to sell, 73 | import and otherwise transfer the Contribution of such Contributor, 74 | if any, in Source Code or other form. This patent license shall 75 | apply to the combination of the Contribution and the Program if, at 76 | the time the Contribution is added by the Contributor, such addition 77 | of the Contribution causes such combination to be covered by the 78 | Licensed Patents. The patent license shall not apply to any other 79 | combinations which include the Contribution. No hardware per se is 80 | licensed hereunder. 81 | 82 | c) Recipient understands that although each Contributor grants the 83 | licenses to its Contributions set forth herein, no assurances are 84 | provided by any Contributor that the Program does not infringe the 85 | patent or other intellectual property rights of any other entity. 86 | Each Contributor disclaims any liability to Recipient for claims 87 | brought by any other entity based on infringement of intellectual 88 | property rights or otherwise. As a condition to exercising the 89 | rights and licenses granted hereunder, each Recipient hereby 90 | assumes sole responsibility to secure any other intellectual 91 | property rights needed, if any. For example, if a third party 92 | patent license is required to allow Recipient to Distribute the 93 | Program, it is Recipient's responsibility to acquire that license 94 | before distributing the Program. 95 | 96 | d) Each Contributor represents that to its knowledge it has 97 | sufficient copyright rights in its Contribution, if any, to grant 98 | the copyright license set forth in this Agreement. 99 | 100 | e) Notwithstanding the terms of any Secondary License, no 101 | Contributor makes additional grants to any Recipient (other than 102 | those set forth in this Agreement) as a result of such Recipient's 103 | receipt of the Program under the terms of a Secondary License 104 | (if permitted under the terms of Section 3). 105 | 106 | 3. REQUIREMENTS 107 | 108 | 3.1 If a Contributor Distributes the Program in any form, then: 109 | 110 | a) the Program must also be made available as Source Code, in 111 | accordance with section 3.2, and the Contributor must accompany 112 | the Program with a statement that the Source Code for the Program 113 | is available under this Agreement, and informs Recipients how to 114 | obtain it in a reasonable manner on or through a medium customarily 115 | used for software exchange; and 116 | 117 | b) the Contributor may Distribute the Program under a license 118 | different than this Agreement, provided that such license: 119 | i) effectively disclaims on behalf of all other Contributors all 120 | warranties and conditions, express and implied, including 121 | warranties or conditions of title and non-infringement, and 122 | implied warranties or conditions of merchantability and fitness 123 | for a particular purpose; 124 | 125 | ii) effectively excludes on behalf of all other Contributors all 126 | liability for damages, including direct, indirect, special, 127 | incidental and consequential damages, such as lost profits; 128 | 129 | iii) does not attempt to limit or alter the recipients' rights 130 | in the Source Code under section 3.2; and 131 | 132 | iv) requires any subsequent distribution of the Program by any 133 | party to be under a license that satisfies the requirements 134 | of this section 3. 135 | 136 | 3.2 When the Program is Distributed as Source Code: 137 | 138 | a) it must be made available under this Agreement, or if the 139 | Program (i) is combined with other material in a separate file or 140 | files made available under a Secondary License, and (ii) the initial 141 | Contributor attached to the Source Code the notice described in 142 | Exhibit A of this Agreement, then the Program may be made available 143 | under the terms of such Secondary Licenses, and 144 | 145 | b) a copy of this Agreement must be included with each copy of 146 | the Program. 147 | 148 | 3.3 Contributors may not remove or alter any copyright, patent, 149 | trademark, attribution notices, disclaimers of warranty, or limitations 150 | of liability ("notices") contained within the Program from any copy of 151 | the Program which they Distribute, provided that Contributors may add 152 | their own appropriate notices. 153 | 154 | 4. COMMERCIAL DISTRIBUTION 155 | 156 | Commercial distributors of software may accept certain responsibilities 157 | with respect to end users, business partners and the like. While this 158 | license is intended to facilitate the commercial use of the Program, 159 | the Contributor who includes the Program in a commercial product 160 | offering should do so in a manner which does not create potential 161 | liability for other Contributors. Therefore, if a Contributor includes 162 | the Program in a commercial product offering, such Contributor 163 | ("Commercial Contributor") hereby agrees to defend and indemnify every 164 | other Contributor ("Indemnified Contributor") against any losses, 165 | damages and costs (collectively "Losses") arising from claims, lawsuits 166 | and other legal actions brought by a third party against the Indemnified 167 | Contributor to the extent caused by the acts or omissions of such 168 | Commercial Contributor in connection with its distribution of the Program 169 | in a commercial product offering. The obligations in this section do not 170 | apply to any claims or Losses relating to any actual or alleged 171 | intellectual property infringement. In order to qualify, an Indemnified 172 | Contributor must: a) promptly notify the Commercial Contributor in 173 | writing of such claim, and b) allow the Commercial Contributor to control, 174 | and cooperate with the Commercial Contributor in, the defense and any 175 | related settlement negotiations. The Indemnified Contributor may 176 | participate in any such claim at its own expense. 177 | 178 | For example, a Contributor might include the Program in a commercial 179 | product offering, Product X. That Contributor is then a Commercial 180 | Contributor. If that Commercial Contributor then makes performance 181 | claims, or offers warranties related to Product X, those performance 182 | claims and warranties are such Commercial Contributor's responsibility 183 | alone. Under this section, the Commercial Contributor would have to 184 | defend claims against the other Contributors related to those performance 185 | claims and warranties, and if a court requires any other Contributor to 186 | pay any damages as a result, the Commercial Contributor must pay 187 | those damages. 188 | 189 | 5. NO WARRANTY 190 | 191 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 192 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 193 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 194 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 195 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 196 | PURPOSE. Each Recipient is solely responsible for determining the 197 | appropriateness of using and distributing the Program and assumes all 198 | risks associated with its exercise of rights under this Agreement, 199 | including but not limited to the risks and costs of program errors, 200 | compliance with applicable laws, damage to or loss of data, programs 201 | or equipment, and unavailability or interruption of operations. 202 | 203 | 6. DISCLAIMER OF LIABILITY 204 | 205 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 206 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 207 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 209 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 210 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 211 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 212 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 213 | POSSIBILITY OF SUCH DAMAGES. 214 | 215 | 7. GENERAL 216 | 217 | If any provision of this Agreement is invalid or unenforceable under 218 | applicable law, it shall not affect the validity or enforceability of 219 | the remainder of the terms of this Agreement, and without further 220 | action by the parties hereto, such provision shall be reformed to the 221 | minimum extent necessary to make such provision valid and enforceable. 222 | 223 | If Recipient institutes patent litigation against any entity 224 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 225 | Program itself (excluding combinations of the Program with other software 226 | or hardware) infringes such Recipient's patent(s), then such Recipient's 227 | rights granted under Section 2(b) shall terminate as of the date such 228 | litigation is filed. 229 | 230 | All Recipient's rights under this Agreement shall terminate if it 231 | fails to comply with any of the material terms or conditions of this 232 | Agreement and does not cure such failure in a reasonable period of 233 | time after becoming aware of such noncompliance. If all Recipient's 234 | rights under this Agreement terminate, Recipient agrees to cease use 235 | and distribution of the Program as soon as reasonably practicable. 236 | However, Recipient's obligations under this Agreement and any licenses 237 | granted by Recipient relating to the Program shall continue and survive. 238 | 239 | Everyone is permitted to copy and distribute copies of this Agreement, 240 | but in order to avoid inconsistency the Agreement is copyrighted and 241 | may only be modified in the following manner. The Agreement Steward 242 | reserves the right to publish new versions (including revisions) of 243 | this Agreement from time to time. No one other than the Agreement 244 | Steward has the right to modify this Agreement. The Eclipse Foundation 245 | is the initial Agreement Steward. The Eclipse Foundation may assign the 246 | responsibility to serve as the Agreement Steward to a suitable separate 247 | entity. Each new version of the Agreement will be given a distinguishing 248 | version number. The Program (including Contributions) may always be 249 | Distributed subject to the version of the Agreement under which it was 250 | received. In addition, after a new version of the Agreement is published, 251 | Contributor may elect to Distribute the Program (including its 252 | Contributions) under the new version. 253 | 254 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 255 | receives no rights or licenses to the intellectual property of any 256 | Contributor under this Agreement, whether expressly, by implication, 257 | estoppel or otherwise. All rights in the Program not expressly granted 258 | under this Agreement are reserved. Nothing in this Agreement is intended 259 | to be enforceable by any entity that is not a Contributor or Recipient. 260 | No third-party beneficiary rights are created under this Agreement. 261 | 262 | Exhibit A - Form of Secondary Licenses Notice 263 | 264 | "This Source Code may also be made available under the following 265 | Secondary Licenses when the conditions for such availability set forth 266 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 267 | version(s), and exceptions or additional permissions here}." 268 | 269 | Simply including a copy of this Agreement, including this Exhibit A 270 | is not sufficient to license the Source Code under Secondary Licenses. 271 | 272 | If it is not possible or desirable to put the notice in a particular 273 | file, then You may include the notice in a location (such as a LICENSE 274 | file in a relevant directory) where a recipient would be likely to 275 | look for such a notice. 276 | 277 | You may add additional accurate notices of copyright ownership. 278 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Composite docker application with _"8"_ containers (2x Node-RED, 2x MQTT broker, Telegraf, InfluxDb, Grafana, Nginx) deployed on Raspberry Pi through [Balena](https://www.balena.io). 2 | 3 | ## Features 4 | This project is actually a proof of concept to demonstrate the following features: 5 | 1. The ability to run **many** containers on a **Raspberry Pi 3 Model B+** (see [section 1. What](#1-what)). 6 | 2. The Built and Deployment of this multi container application using the **BalenaCloud** services (see [section 2. How to install ...](#2-how-to-install-this-application-on-an-edge-device)). 7 | 3. Monitoring the system resources of the raspberry pi using the **TIG** stack (see [section 3. System resource monitoring ...](#3-system-resource-monitoring-using-the-tig-stack-telegraf-influxdb--grafana)): 8 | 4. That **Grafana** is very nice and powerful tool to create dashboards (see [section 4. Grafana](#4-grafana)) and that it is easy to create or update those dashboards (see [section 4.1 Updating and adding ...](#41-updating--adding-new-grafana-dashboards)). 9 | 5. It is possible to run **multiple Node-RED instances** on the same device (see [section 5. Node-RED](#5-node-red)). 10 | 6. It is possible to run **multiple MQTT brokers** on the same device (see [section 6. MQTT brokers](#6-mqtt-broker)). 11 | 7. A **USB memory stick** connected to the pi can be used for storing specific data (in this case it is the influxdb data) (see [section 7. USB memory stick](#7-setup-of-the-usb-memory-stick-for-influxdb)). 12 | 8. It is possible to access the Grafana user interface and the 2 Node-RED editors **via the internet** (see [see section 8. Internet Access](#8-internet-access-via-balenas-public-url-and-nginx)). 13 | 14 | ## 1. What 15 | This github repository describes a composite docker application consisting of **"8"** containers that can be deployed through [BalenaCloud](https://www.balena.io/) on any arm device (e.g. a [Raspberry Pi 3 Model B+](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/)) running the [balena OS](https://www.balena.io/os/). 16 | 17 | So, this application consists of the following 8 docker containers (= TIG stack + 2x Node-RED + 2x MQTT broker + Nginx ) 18 | 1. [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) - agent for collecting and reporting metrics and events 19 | 2. [Influxdb](https://www.influxdata.com/) - Time Series Database 20 | 3. [Grafana](https://grafana.com/) - create, explore and share dashboards 21 | 4. 2x [Node-RED](https://nodered.org/) - flow based programming for the Internet of Things (accessible through path `/nodered` ) 22 | 5. 2x [MQTT-broker](https://mosquitto.org/) - lightweight message broker 23 | 4. [nginx](http://nginx.org/en/docs/) - is open source software for web serving, reverse proxying, caching, load balancing,.... 24 | 25 | 26 | ## 2. How to install this application on an edge device 27 | It is very easy to install this application using the [BalenaCloud](https://www.balena.io/) services through following steps: 28 | 1. [Balena Setup](https://www.balena.io/): you need a BalenaCloud account and your edge device must be running the BalenaOs. You also need to create an application in your balena dashboard and associate your edge device to it (see balena documentation). 29 | 2. clone this github repository (this can be done on any device where git is installed) through the following command `git clone https://github.com/janvda/balena-node-red-mqtt-nginx-TIG-stack.git` (instead of directly cloning the repository it migh be better to fork the github repository and then clone this forked repository). 30 | 3. Move into this repository by command `cd balena-edge-device-monitoring` 31 | 4. Add balena git remote endpoint by running a command like `git remote add balena @git.www.balena.io:/.git` 32 | 5. push the repository to balena by the command `git push balena master` (maybe you need to add the option `--force` the first time you are deploying). 33 | 34 | ![build finished successful](./build%20finished%20successful.png) 35 | 36 | ## 3. System resource monitoring using the TIG Stack (Telegraf, Influxdb & Grafana) 37 | The system resource monitoring is realized by the TIG stack and happens as follows: 38 | 1. The [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) container collects the system resource metrics (memory, CPU, disk, network, ...) of the raspberry pi device and sends them to 39 | 2. the [Influxdb](https://www.influxdata.com/) container that will store them in the influx database. 40 | 3. The [Grafana](https://grafana.com/) container has a dashboard (see screenshot below) showing these system metrics that it has retrieved from the influxdb. 41 | 42 | ## 3.1 Telegraf 43 | The table below specifies the environment variables that can be set in the Balena Device Service Variables panel for the Telegraf Service. Note that the `Default Value` is defined in `docker-compose.yml` 44 | 45 | | Name | Default Value | Description | 46 | |------------------------- | -------------- |-------------------------------------------------| 47 | | **interval** | `60s` | Frequency at which metrics are collected | 48 | | **flush_interval** | `60s` | Flushing interval (should not set < `interval`) | 49 | 50 | ## 4. Grafana 51 | The [Grafana](https://grafana.com/) user interface can be accessed at port 3000 of the host OS. 52 | The login and password is `admin`. 53 | The name of the dashboard is `system metrics`. 54 | 55 | Here below a screenshot of the `system metrics` dashboard that is also provisioned by this application ( file is `grafana\dashboards\system metrics.json`) 56 | 57 | ![system metrics example top part](./system_metrics_dashboard_1_of_2.png) 58 | ![system metrics example bottom part](./system_metrics_dashboard_2_of_2.png) 59 | 60 | ## 4.1. Updating / Adding new Grafana Dashboards 61 | 62 | If you want to add a new Grafana dashboard then this can be done through following steps (Updating an existing dashboard can be done in a similar way): 63 | 64 | 1. Create the new dashboard using the Grafana UI. 65 | 2. From the settings menu in Grafana UI select `View JSON` and copy the complete json file (**don't use the grafana UI `export` feature** as this will template the datasource and will not work due to that). 66 | 3. Save the json contents you have copied in previous step into a new file in folder `grafana\dashboards` with extension .json (e.g. `mydashboard-02.json`) 67 | 4. Substitute the ID number you can find in that file just after field `"graphTooltip"` by `null`. E.g. ` "id": 1,` should be changed into ` "id": null,` 68 | 5. Commit your changes in git and push them to your balena git remote endpoint (`git push balena master`) 69 | 70 | ## 5. Node-RED 71 | The application consists of 2 [Node-RED](https://nodered.org/) containers: 72 | 1. **node-red**: its editor is accessble through Host OS port and path : `:1880/node-red/` 73 | 2. **node-red-test** : its editor is accessble through Host OS port and path : `:1882/node-red-test/` 74 | 75 | Note that both Node-RED editors are protected by a user name and a **hashed** password that must be set through the environment variables `USERNAME` and `PASSWORD`. The [Node-RED security page](https://nodered.org/docs/security) describes how a password hash can be generated. You can set these environment variables using your [Balena dashboard](https://dashboard.balena-cloud.com) either under: 76 | - *Application Environment Variables (E(X))* - this implies that both Node-RED instances will have the same username and password. 77 | - *Service Variables (S(X))* 78 | 79 | *Notes:* 80 | 1. `node-red-data` and `node-red-test-data` are 2 named volumed used for the `\data` folder of respectively *node-red* and *node-red-test*. Take care that the `settings.js` is only copied during the initial deployment of the application. So when the application is redeployed e.g. due to changes, then the `settings.js` is not recopied to the `\data` folder. (see also [How to copy a file to a named volume?](https://forums.balena.io/t/how-to-copy-a-file-to-a-named-volume/4331)) 81 | 2. In order to assure that nodes installed through `npm install` are not lost after a restart of the container, you must assure that they are installed in the `\data` directory. So you must first do a `cd \data` and then execute the `npm install ....` command. This will assure that the node is correctly installed under folder `\data\node_modules\` and that it will persist after restarts of the container. 82 | 83 | ## 6. MQTT broker 84 | This application consist of 2 [Mosquitto MQTT-brokers](https://mosquitto.org/): 85 | 1. **mqtt** which is listening to Host OS port 1883 86 | 2. **mqtt-test** which is listening to Host OS port 1884 87 | 88 | ## 7. Setup of the USB memory Stick for Influxdb 89 | The data of the influxdb will be stored in the mount location `\mnt\influxdb`. 90 | The *influxdb* container is configured (see Dockerfile and my_entrypoint.sh) so that a USB drive (e.g. a USB memory stick) with label `influxdb` will be mounted to this mount location. It is currently also expecting (see Dockerfile) that this USB drive is formatted in `ext4` format. 91 | 92 | If no USB drive (or memory stick) with label `influxdb` is connected to the raspberry pi then the named volume `influxdb-data` will be mounted to this location as is specified in the `docker-compose.yml` file. 93 | 94 | Notes 95 | 1. the current *Balena* version doesn't yet support the definition of a volume for such a mounted drive in the docker compose yaml file therefore this is handled through the influxdb container setup as described here above. 96 | 2. It is not possible to mount the same USB drive also in telegraf container (I have tried that) and consequently telegraf is not able to report the `disk` metrics for this USB drive. 97 | 98 | ## 8. Internet access via Balena's public URL and Nginx. 99 | The [nginx](http://nginx.org/en/docs/) container has been configured so that when you enable the Balena public device URL that you can access the following applications over the internet: 100 | - *Grafana* User Interface via `` 101 | - Node-RED editor of the container *node-red* via `\node-red` 102 | - Node-Red dashboard UI of the container *node-red* via `\node-red\ui` 103 | - Node-RED editor of the container *node-red-test* via `\node-red-test` 104 | - Node-RED dashboard UI of the container *node-red-test* via `\node-red-test\ui` 105 | 106 | In case you get a `502 Bad Gateway`error or a message like `Cannot GET /node-red-test/` when trying to access the above public URLs then this might be fixed by restarting the nginx container ! 107 | 108 | ## Credits 109 | 1. [Initializing Grafana with preconfigured dashboards](https://ops.tips/blog/initialize-grafana-with-preconfigured-dashboards/) [(github repository)](https://github.com/cirocosta/sample-grafana) 110 | 2. [InfluxDB system metrics dashboard](https://grafana.com/dashboards/1138) 111 | 3. [Grafana Series Part 1: Setting up InfluxDB, Grafana and Telegraf with Docker on Linux](https://blog.linuxserver.io/2017/11/25/how-to-monitor-your-server-using-grafana-influxdb-and-telegraf/) 112 | -------------------------------------------------------------------------------- /build finished successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janvda/balena-node-red-mqtt-nginx-TIG-stack/126b5768d7f720b69b11aed83ea29733db11a29e/build finished successful.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | volumes: 3 | node-red-data: 4 | node-red-test-data: 5 | influxdb-data: 6 | services: 7 | influxdb: 8 | build: influxdb 9 | container_name: influxdb 10 | # privileged added so usb drive can be mounted. 11 | privileged: true 12 | volumes: 13 | # take care that the mount location "/mnt/influxdb" becomes overwritten 14 | # by the mount location specified in the influxdb Dockerfile. 15 | - 'influxdb-data:/mnt/influxdb' 16 | ports: 17 | # The API for InfluxDB is served on port 8086 18 | - "8082:8082" 19 | - "8086:8086" 20 | # UDP Port 21 | - "8089:8089" 22 | restart: always 23 | telegraf: 24 | # Full tag list: https://hub.docker.com/r/library/telegraf/tags/ 25 | build : telegraf 26 | pid: "host" 27 | network_mode: "host" 28 | privileged: true 29 | labels: 30 | io.resin.features.balena-socket: '1' 31 | depends_on: 32 | - influxdb 33 | restart: always 34 | environment: 35 | - interval=60s 36 | - flush_interval=60s 37 | grafana: 38 | build: grafana 39 | ports: 40 | - "3000:3000" 41 | depends_on: 42 | - influxdb 43 | restart: always 44 | mqtt: 45 | image: panuwitp/mosquitto-arm 46 | ports: 47 | - "1883:1883" 48 | mqtt-test: 49 | image: panuwitp/mosquitto-arm 50 | ports: 51 | - "1884:1883" 52 | node-red: 53 | build: node-red 54 | volumes: 55 | - 'node-red-data:/data' 56 | ports: 57 | - "1880:1880" 58 | depends_on: 59 | - mqtt 60 | restart: always 61 | node-red-test: 62 | build: node-red-test 63 | volumes: 64 | - 'node-red-test-data:/data' 65 | ports: 66 | - "1882:1880" 67 | depends_on: 68 | - mqtt-test 69 | restart: always 70 | nginx: 71 | build : nginx 72 | depends_on: 73 | - grafana 74 | - node-red 75 | - node-red-test 76 | ports: 77 | - "80:80" 78 | - "443:443" 79 | restart: always 80 | 81 | -------------------------------------------------------------------------------- /grafana/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fg2it/grafana-armhf:v5.1.4 2 | ADD ./provisioning /etc/grafana/provisioning 3 | ADD ./config.ini /etc/grafana/config.ini 4 | ADD ./dashboards /var/lib/grafana/dashboards -------------------------------------------------------------------------------- /grafana/config.ini: -------------------------------------------------------------------------------- 1 | [paths] 2 | provisioning = /etc/grafana/provisioning 3 | 4 | [server] 5 | enable_gzip = true 6 | 7 | [users] 8 | default_theme = light 9 | -------------------------------------------------------------------------------- /grafana/dashboards/docker containers.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "$$hashKey": "object:838", 6 | "builtIn": 1, 7 | "datasource": "-- Grafana --", 8 | "enable": true, 9 | "hide": true, 10 | "iconColor": "rgba(0, 211, 255, 1)", 11 | "name": "Annotations & Alerts", 12 | "type": "dashboard" 13 | } 14 | ] 15 | }, 16 | "editable": true, 17 | "gnetId": 1150, 18 | "graphTooltip": 0, 19 | "id": null, 20 | "iteration": 1543436369641, 21 | "links": [], 22 | "panels": [ 23 | { 24 | "cacheTimeout": null, 25 | "colorBackground": false, 26 | "colorValue": true, 27 | "colors": [ 28 | "rgba(50, 172, 45, 0.97)", 29 | "rgba(237, 129, 40, 0.89)", 30 | "rgba(245, 54, 54, 0.9)" 31 | ], 32 | "datasource": "telegraf_ds", 33 | "editable": true, 34 | "error": false, 35 | "format": "percent", 36 | "gauge": { 37 | "maxValue": 100, 38 | "minValue": 0, 39 | "show": true, 40 | "thresholdLabels": false, 41 | "thresholdMarkers": true 42 | }, 43 | "gridPos": { 44 | "h": 4, 45 | "w": 3, 46 | "x": 0, 47 | "y": 0 48 | }, 49 | "id": 4, 50 | "interval": null, 51 | "links": [], 52 | "mappingType": 1, 53 | "mappingTypes": [ 54 | { 55 | "name": "value to text", 56 | "value": 1 57 | }, 58 | { 59 | "name": "range to text", 60 | "value": 2 61 | } 62 | ], 63 | "maxDataPoints": 100, 64 | "nullPointMode": "connected", 65 | "nullText": null, 66 | "postfix": "", 67 | "postfixFontSize": "50%", 68 | "prefix": "", 69 | "prefixFontSize": "50%", 70 | "rangeMaps": [ 71 | { 72 | "from": "null", 73 | "text": "N/A", 74 | "to": "null" 75 | } 76 | ], 77 | "sparkline": { 78 | "fillColor": "rgba(31, 118, 189, 0.18)", 79 | "full": false, 80 | "lineColor": "rgb(31, 120, 193)", 81 | "show": false 82 | }, 83 | "tableColumn": "", 84 | "targets": [ 85 | { 86 | "dsType": "influxdb", 87 | "expr": "", 88 | "groupBy": [ 89 | { 90 | "params": [ 91 | "$interval" 92 | ], 93 | "type": "time" 94 | }, 95 | { 96 | "params": [ 97 | "null" 98 | ], 99 | "type": "fill" 100 | } 101 | ], 102 | "intervalFactor": 2, 103 | "measurement": "docker_container_mem", 104 | "policy": "default", 105 | "refId": "A", 106 | "resultFormat": "time_series", 107 | "select": [ 108 | [ 109 | { 110 | "params": [ 111 | "usage_percent" 112 | ], 113 | "type": "field" 114 | }, 115 | { 116 | "params": [], 117 | "type": "mean" 118 | } 119 | ] 120 | ], 121 | "tags": [ 122 | { 123 | "key": "host", 124 | "operator": "=~", 125 | "value": "/^$host$/" 126 | }, 127 | { 128 | "condition": "AND", 129 | "key": "container_name", 130 | "operator": "=~", 131 | "value": "/^$container$/" 132 | } 133 | ] 134 | } 135 | ], 136 | "thresholds": "20,80", 137 | "title": "Memory usage % for $container", 138 | "type": "singlestat", 139 | "valueFontSize": "80%", 140 | "valueMaps": [ 141 | { 142 | "op": "=", 143 | "text": "N/A", 144 | "value": "null" 145 | } 146 | ], 147 | "valueName": "avg" 148 | }, 149 | { 150 | "cacheTimeout": null, 151 | "colorBackground": false, 152 | "colorValue": false, 153 | "colors": [ 154 | "rgba(245, 54, 54, 0.9)", 155 | "rgba(237, 129, 40, 0.89)", 156 | "rgba(50, 172, 45, 0.97)" 157 | ], 158 | "datasource": "telegraf_ds", 159 | "editable": true, 160 | "error": false, 161 | "format": "none", 162 | "gauge": { 163 | "maxValue": 100, 164 | "minValue": 0, 165 | "show": false, 166 | "thresholdLabels": false, 167 | "thresholdMarkers": true 168 | }, 169 | "gridPos": { 170 | "h": 4, 171 | "w": 4, 172 | "x": 3, 173 | "y": 0 174 | }, 175 | "id": 7, 176 | "interval": null, 177 | "links": [], 178 | "mappingType": 1, 179 | "mappingTypes": [ 180 | { 181 | "name": "value to text", 182 | "value": 1 183 | }, 184 | { 185 | "name": "range to text", 186 | "value": 2 187 | } 188 | ], 189 | "maxDataPoints": 100, 190 | "nullPointMode": "connected", 191 | "nullText": null, 192 | "postfix": "", 193 | "postfixFontSize": "50%", 194 | "prefix": "", 195 | "prefixFontSize": "50%", 196 | "rangeMaps": [ 197 | { 198 | "from": "null", 199 | "text": "N/A", 200 | "to": "null" 201 | } 202 | ], 203 | "sparkline": { 204 | "fillColor": "rgba(31, 118, 189, 0.18)", 205 | "full": false, 206 | "lineColor": "rgb(31, 120, 193)", 207 | "show": false 208 | }, 209 | "tableColumn": "", 210 | "targets": [ 211 | { 212 | "dsType": "influxdb", 213 | "expr": "", 214 | "groupBy": [ 215 | { 216 | "params": [ 217 | "$interval" 218 | ], 219 | "type": "time" 220 | }, 221 | { 222 | "params": [ 223 | "null" 224 | ], 225 | "type": "fill" 226 | } 227 | ], 228 | "intervalFactor": 2, 229 | "measurement": "docker", 230 | "policy": "default", 231 | "refId": "A", 232 | "resultFormat": "time_series", 233 | "select": [ 234 | [ 235 | { 236 | "params": [ 237 | "n_images" 238 | ], 239 | "type": "field" 240 | }, 241 | { 242 | "params": [], 243 | "type": "mean" 244 | } 245 | ] 246 | ], 247 | "tags": [ 248 | { 249 | "key": "host", 250 | "operator": "=~", 251 | "value": "/^$host$/" 252 | } 253 | ] 254 | } 255 | ], 256 | "thresholds": "", 257 | "title": "Number of images on $host", 258 | "type": "singlestat", 259 | "valueFontSize": "80%", 260 | "valueMaps": [ 261 | { 262 | "op": "=", 263 | "text": "N/A", 264 | "value": "null" 265 | } 266 | ], 267 | "valueName": "avg" 268 | }, 269 | { 270 | "cacheTimeout": null, 271 | "colorBackground": false, 272 | "colorValue": false, 273 | "colors": [ 274 | "rgba(245, 54, 54, 0.9)", 275 | "rgba(237, 129, 40, 0.89)", 276 | "rgba(50, 172, 45, 0.97)" 277 | ], 278 | "datasource": "telegraf_ds", 279 | "editable": true, 280 | "error": false, 281 | "format": "none", 282 | "gauge": { 283 | "maxValue": 100, 284 | "minValue": 0, 285 | "show": false, 286 | "thresholdLabels": false, 287 | "thresholdMarkers": true 288 | }, 289 | "gridPos": { 290 | "h": 4, 291 | "w": 4, 292 | "x": 7, 293 | "y": 0 294 | }, 295 | "id": 6, 296 | "interval": null, 297 | "links": [], 298 | "mappingType": 1, 299 | "mappingTypes": [ 300 | { 301 | "name": "value to text", 302 | "value": 1 303 | }, 304 | { 305 | "name": "range to text", 306 | "value": 2 307 | } 308 | ], 309 | "maxDataPoints": 100, 310 | "nullPointMode": "connected", 311 | "nullText": null, 312 | "postfix": "", 313 | "postfixFontSize": "50%", 314 | "prefix": "", 315 | "prefixFontSize": "50%", 316 | "rangeMaps": [ 317 | { 318 | "from": "null", 319 | "text": "N/A", 320 | "to": "null" 321 | } 322 | ], 323 | "sparkline": { 324 | "fillColor": "rgba(31, 118, 189, 0.18)", 325 | "full": true, 326 | "lineColor": "rgb(31, 120, 193)", 327 | "show": true 328 | }, 329 | "tableColumn": "", 330 | "targets": [ 331 | { 332 | "dsType": "influxdb", 333 | "expr": "", 334 | "groupBy": [ 335 | { 336 | "params": [ 337 | "$interval" 338 | ], 339 | "type": "time" 340 | }, 341 | { 342 | "params": [ 343 | "null" 344 | ], 345 | "type": "fill" 346 | } 347 | ], 348 | "intervalFactor": 2, 349 | "measurement": "docker", 350 | "policy": "default", 351 | "refId": "A", 352 | "resultFormat": "time_series", 353 | "select": [ 354 | [ 355 | { 356 | "params": [ 357 | "n_containers" 358 | ], 359 | "type": "field" 360 | }, 361 | { 362 | "params": [], 363 | "type": "mean" 364 | } 365 | ] 366 | ], 367 | "tags": [ 368 | { 369 | "key": "host", 370 | "operator": "=~", 371 | "value": "/^$host$/" 372 | } 373 | ] 374 | } 375 | ], 376 | "thresholds": "", 377 | "title": "Number of container on $host", 378 | "type": "singlestat", 379 | "valueFontSize": "80%", 380 | "valueMaps": [ 381 | { 382 | "op": "=", 383 | "text": "N/A", 384 | "value": "null" 385 | } 386 | ], 387 | "valueName": "avg" 388 | }, 389 | { 390 | "aliasColors": {}, 391 | "bars": false, 392 | "dashLength": 10, 393 | "dashes": false, 394 | "datasource": "telegraf_ds", 395 | "editable": true, 396 | "error": false, 397 | "fill": 1, 398 | "gridPos": { 399 | "h": 4, 400 | "w": 13, 401 | "x": 11, 402 | "y": 0 403 | }, 404 | "id": 5, 405 | "legend": { 406 | "avg": false, 407 | "current": false, 408 | "max": false, 409 | "min": false, 410 | "show": true, 411 | "total": false, 412 | "values": false 413 | }, 414 | "lines": true, 415 | "linewidth": 1, 416 | "links": [], 417 | "nullPointMode": "connected", 418 | "percentage": false, 419 | "pointradius": 5, 420 | "points": false, 421 | "renderer": "flot", 422 | "seriesOverrides": [], 423 | "spaceLength": 10, 424 | "stack": false, 425 | "steppedLine": false, 426 | "targets": [ 427 | { 428 | "alias": "Running containers", 429 | "dsType": "influxdb", 430 | "expr": "", 431 | "groupBy": [ 432 | { 433 | "params": [ 434 | "$interval" 435 | ], 436 | "type": "time" 437 | }, 438 | { 439 | "params": [ 440 | "null" 441 | ], 442 | "type": "fill" 443 | } 444 | ], 445 | "intervalFactor": 2, 446 | "measurement": "docker", 447 | "policy": "default", 448 | "query": "SELECT mean(\"n_containers_running\") FROM \"docker\" WHERE \"host\" =~ /^$host$/ AND $timeFilter GROUP BY time($interval) fill(null)", 449 | "rawQuery": false, 450 | "refId": "A", 451 | "resultFormat": "time_series", 452 | "select": [ 453 | [ 454 | { 455 | "params": [ 456 | "n_containers_running" 457 | ], 458 | "type": "field" 459 | }, 460 | { 461 | "params": [], 462 | "type": "mean" 463 | } 464 | ] 465 | ], 466 | "tags": [ 467 | { 468 | "key": "host", 469 | "operator": "=~", 470 | "value": "/^$host$/" 471 | } 472 | ] 473 | }, 474 | { 475 | "alias": "Paused containers", 476 | "dsType": "influxdb", 477 | "expr": "", 478 | "groupBy": [ 479 | { 480 | "params": [ 481 | "$interval" 482 | ], 483 | "type": "time" 484 | }, 485 | { 486 | "params": [ 487 | "null" 488 | ], 489 | "type": "fill" 490 | } 491 | ], 492 | "intervalFactor": 2, 493 | "measurement": "docker", 494 | "policy": "default", 495 | "query": "SELECT mean(\"n_containers_running\") FROM \"docker\" WHERE \"host\" =~ /^$host$/ AND $timeFilter GROUP BY time($interval) fill(null)", 496 | "rawQuery": false, 497 | "refId": "B", 498 | "resultFormat": "time_series", 499 | "select": [ 500 | [ 501 | { 502 | "params": [ 503 | "n_containers_paused" 504 | ], 505 | "type": "field" 506 | }, 507 | { 508 | "params": [], 509 | "type": "mean" 510 | } 511 | ] 512 | ], 513 | "tags": [ 514 | { 515 | "key": "host", 516 | "operator": "=~", 517 | "value": "/^$host$/" 518 | } 519 | ] 520 | }, 521 | { 522 | "alias": "Stopped containers", 523 | "dsType": "influxdb", 524 | "expr": "", 525 | "groupBy": [ 526 | { 527 | "params": [ 528 | "$interval" 529 | ], 530 | "type": "time" 531 | }, 532 | { 533 | "params": [ 534 | "null" 535 | ], 536 | "type": "fill" 537 | } 538 | ], 539 | "intervalFactor": 2, 540 | "measurement": "docker", 541 | "policy": "default", 542 | "query": "SELECT mean(\"n_containers_running\") FROM \"docker\" WHERE \"host\" =~ /^$host$/ AND $timeFilter GROUP BY time($interval) fill(null)", 543 | "rawQuery": false, 544 | "refId": "C", 545 | "resultFormat": "time_series", 546 | "select": [ 547 | [ 548 | { 549 | "params": [ 550 | "n_containers_stopped" 551 | ], 552 | "type": "field" 553 | }, 554 | { 555 | "params": [], 556 | "type": "mean" 557 | } 558 | ] 559 | ], 560 | "tags": [ 561 | { 562 | "key": "host", 563 | "operator": "=~", 564 | "value": "/^$host$/" 565 | } 566 | ] 567 | } 568 | ], 569 | "thresholds": [], 570 | "timeFrom": null, 571 | "timeShift": null, 572 | "title": "Container status for $host", 573 | "tooltip": { 574 | "msResolution": false, 575 | "shared": true, 576 | "sort": 0, 577 | "value_type": "individual" 578 | }, 579 | "type": "graph", 580 | "xaxis": { 581 | "buckets": null, 582 | "mode": "time", 583 | "name": null, 584 | "show": true, 585 | "values": [] 586 | }, 587 | "yaxes": [ 588 | { 589 | "format": "short", 590 | "label": null, 591 | "logBase": 1, 592 | "max": null, 593 | "min": null, 594 | "show": true 595 | }, 596 | { 597 | "format": "short", 598 | "label": null, 599 | "logBase": 1, 600 | "max": null, 601 | "min": null, 602 | "show": true 603 | } 604 | ], 605 | "yaxis": { 606 | "align": false, 607 | "alignLevel": null 608 | } 609 | }, 610 | { 611 | "aliasColors": {}, 612 | "bars": false, 613 | "dashLength": 10, 614 | "dashes": false, 615 | "datasource": "telegraf_ds", 616 | "editable": true, 617 | "error": false, 618 | "fill": 1, 619 | "gridPos": { 620 | "h": 7, 621 | "w": 9, 622 | "x": 0, 623 | "y": 4 624 | }, 625 | "id": 1, 626 | "legend": { 627 | "avg": false, 628 | "current": false, 629 | "max": false, 630 | "min": false, 631 | "show": true, 632 | "total": false, 633 | "values": false 634 | }, 635 | "lines": true, 636 | "linewidth": 1, 637 | "links": [], 638 | "nullPointMode": "connected", 639 | "percentage": false, 640 | "pointradius": 5, 641 | "points": false, 642 | "renderer": "flot", 643 | "seriesOverrides": [], 644 | "spaceLength": 10, 645 | "stack": false, 646 | "steppedLine": false, 647 | "targets": [ 648 | { 649 | "$$hashKey": "object:433", 650 | "alias": "$container", 651 | "dsType": "influxdb", 652 | "expr": "", 653 | "groupBy": [ 654 | { 655 | "params": [ 656 | "$interval" 657 | ], 658 | "type": "time" 659 | }, 660 | { 661 | "params": [ 662 | "null" 663 | ], 664 | "type": "fill" 665 | } 666 | ], 667 | "intervalFactor": 2, 668 | "measurement": "docker_container_mem", 669 | "orderByTime": "ASC", 670 | "policy": "default", 671 | "refId": "A", 672 | "resultFormat": "time_series", 673 | "select": [ 674 | [ 675 | { 676 | "params": [ 677 | "usage" 678 | ], 679 | "type": "field" 680 | }, 681 | { 682 | "params": [], 683 | "type": "mean" 684 | } 685 | ] 686 | ], 687 | "tags": [ 688 | { 689 | "key": "host", 690 | "operator": "=~", 691 | "value": "/^$host$/" 692 | }, 693 | { 694 | "condition": "AND", 695 | "key": "container_name", 696 | "operator": "=~", 697 | "value": "/^$container$/" 698 | } 699 | ] 700 | } 701 | ], 702 | "thresholds": [], 703 | "timeFrom": null, 704 | "timeShift": null, 705 | "title": "Memory $container", 706 | "tooltip": { 707 | "msResolution": false, 708 | "shared": true, 709 | "sort": 0, 710 | "value_type": "individual" 711 | }, 712 | "transparent": true, 713 | "type": "graph", 714 | "xaxis": { 715 | "buckets": null, 716 | "mode": "time", 717 | "name": null, 718 | "show": true, 719 | "values": [] 720 | }, 721 | "yaxes": [ 722 | { 723 | "$$hashKey": "object:642", 724 | "format": "bytes", 725 | "label": null, 726 | "logBase": 1, 727 | "max": null, 728 | "min": "0", 729 | "show": true 730 | }, 731 | { 732 | "$$hashKey": "object:643", 733 | "format": "short", 734 | "label": null, 735 | "logBase": 1, 736 | "max": null, 737 | "min": null, 738 | "show": true 739 | } 740 | ], 741 | "yaxis": { 742 | "align": false, 743 | "alignLevel": null 744 | } 745 | }, 746 | { 747 | "aliasColors": {}, 748 | "bars": false, 749 | "dashLength": 10, 750 | "dashes": false, 751 | "datasource": "telegraf_ds", 752 | "editable": true, 753 | "error": false, 754 | "fill": 2, 755 | "gridPos": { 756 | "h": 7, 757 | "w": 15, 758 | "x": 9, 759 | "y": 4 760 | }, 761 | "id": 9, 762 | "legend": { 763 | "alignAsTable": true, 764 | "avg": false, 765 | "current": true, 766 | "hideEmpty": false, 767 | "max": true, 768 | "min": true, 769 | "rightSide": true, 770 | "show": true, 771 | "total": false, 772 | "values": true 773 | }, 774 | "lines": true, 775 | "linewidth": 1, 776 | "links": [], 777 | "nullPointMode": "connected", 778 | "percentage": false, 779 | "pointradius": 5, 780 | "points": false, 781 | "renderer": "flot", 782 | "seriesOverrides": [], 783 | "spaceLength": 10, 784 | "stack": true, 785 | "steppedLine": false, 786 | "targets": [ 787 | { 788 | "$$hashKey": "object:721", 789 | "alias": "$tag_container_name", 790 | "dsType": "influxdb", 791 | "expr": "", 792 | "groupBy": [ 793 | { 794 | "params": [ 795 | "$interval" 796 | ], 797 | "type": "time" 798 | }, 799 | { 800 | "params": [ 801 | "container_name" 802 | ], 803 | "type": "tag" 804 | }, 805 | { 806 | "params": [ 807 | "null" 808 | ], 809 | "type": "fill" 810 | } 811 | ], 812 | "intervalFactor": 2, 813 | "measurement": "docker_container_mem", 814 | "orderByTime": "ASC", 815 | "policy": "default", 816 | "refId": "A", 817 | "resultFormat": "time_series", 818 | "select": [ 819 | [ 820 | { 821 | "params": [ 822 | "usage" 823 | ], 824 | "type": "field" 825 | }, 826 | { 827 | "params": [], 828 | "type": "mean" 829 | } 830 | ] 831 | ], 832 | "tags": [ 833 | { 834 | "key": "host", 835 | "operator": "=~", 836 | "value": "/^$host$/" 837 | } 838 | ] 839 | } 840 | ], 841 | "thresholds": [], 842 | "timeFrom": null, 843 | "timeShift": null, 844 | "title": "Memory usage per container (stacked) for $host", 845 | "tooltip": { 846 | "msResolution": false, 847 | "shared": true, 848 | "sort": 0, 849 | "value_type": "individual" 850 | }, 851 | "type": "graph", 852 | "xaxis": { 853 | "buckets": null, 854 | "mode": "time", 855 | "name": null, 856 | "show": true, 857 | "values": [] 858 | }, 859 | "yaxes": [ 860 | { 861 | "format": "bytes", 862 | "label": null, 863 | "logBase": 1, 864 | "max": null, 865 | "min": null, 866 | "show": true 867 | }, 868 | { 869 | "format": "short", 870 | "label": null, 871 | "logBase": 1, 872 | "max": null, 873 | "min": null, 874 | "show": true 875 | } 876 | ], 877 | "yaxis": { 878 | "align": false, 879 | "alignLevel": null 880 | } 881 | }, 882 | { 883 | "aliasColors": {}, 884 | "bars": false, 885 | "dashLength": 10, 886 | "dashes": false, 887 | "datasource": "telegraf_ds", 888 | "editable": true, 889 | "error": false, 890 | "fill": 1, 891 | "gridPos": { 892 | "h": 7, 893 | "w": 9, 894 | "x": 0, 895 | "y": 11 896 | }, 897 | "id": 10, 898 | "legend": { 899 | "avg": false, 900 | "current": false, 901 | "max": false, 902 | "min": false, 903 | "show": true, 904 | "total": false, 905 | "values": false 906 | }, 907 | "lines": true, 908 | "linewidth": 1, 909 | "links": [], 910 | "nullPointMode": "connected", 911 | "percentage": false, 912 | "pointradius": 5, 913 | "points": false, 914 | "renderer": "flot", 915 | "seriesOverrides": [], 916 | "spaceLength": 10, 917 | "stack": false, 918 | "steppedLine": false, 919 | "targets": [ 920 | { 921 | "$$hashKey": "object:1039", 922 | "alias": "$container", 923 | "dsType": "influxdb", 924 | "expr": "", 925 | "groupBy": [ 926 | { 927 | "params": [ 928 | "$interval" 929 | ], 930 | "type": "time" 931 | }, 932 | { 933 | "params": [ 934 | "null" 935 | ], 936 | "type": "fill" 937 | } 938 | ], 939 | "intervalFactor": 2, 940 | "measurement": "docker_container_cpu", 941 | "orderByTime": "ASC", 942 | "policy": "default", 943 | "refId": "A", 944 | "resultFormat": "time_series", 945 | "select": [ 946 | [ 947 | { 948 | "params": [ 949 | "usage_percent" 950 | ], 951 | "type": "field" 952 | }, 953 | { 954 | "params": [], 955 | "type": "mean" 956 | } 957 | ] 958 | ], 959 | "tags": [ 960 | { 961 | "key": "host", 962 | "operator": "=~", 963 | "value": "/^$host$/" 964 | }, 965 | { 966 | "condition": "AND", 967 | "key": "container_name", 968 | "operator": "=~", 969 | "value": "/^$container$/" 970 | } 971 | ] 972 | } 973 | ], 974 | "thresholds": [], 975 | "timeFrom": null, 976 | "timeShift": null, 977 | "title": "CPU $container", 978 | "tooltip": { 979 | "msResolution": false, 980 | "shared": true, 981 | "sort": 0, 982 | "value_type": "individual" 983 | }, 984 | "transparent": true, 985 | "type": "graph", 986 | "xaxis": { 987 | "buckets": null, 988 | "mode": "time", 989 | "name": null, 990 | "show": true, 991 | "values": [] 992 | }, 993 | "yaxes": [ 994 | { 995 | "$$hashKey": "object:1533", 996 | "format": "percent", 997 | "label": null, 998 | "logBase": 1, 999 | "max": null, 1000 | "min": "0", 1001 | "show": true 1002 | }, 1003 | { 1004 | "$$hashKey": "object:1534", 1005 | "format": "short", 1006 | "label": null, 1007 | "logBase": 1, 1008 | "max": null, 1009 | "min": null, 1010 | "show": true 1011 | } 1012 | ], 1013 | "yaxis": { 1014 | "align": false, 1015 | "alignLevel": null 1016 | } 1017 | }, 1018 | { 1019 | "aliasColors": {}, 1020 | "bars": false, 1021 | "dashLength": 10, 1022 | "dashes": false, 1023 | "datasource": "telegraf_ds", 1024 | "editable": true, 1025 | "error": false, 1026 | "fill": 1, 1027 | "gridPos": { 1028 | "h": 7, 1029 | "w": 15, 1030 | "x": 9, 1031 | "y": 11 1032 | }, 1033 | "id": 3, 1034 | "legend": { 1035 | "alignAsTable": true, 1036 | "avg": true, 1037 | "current": true, 1038 | "max": true, 1039 | "min": false, 1040 | "rightSide": true, 1041 | "show": true, 1042 | "total": false, 1043 | "values": true 1044 | }, 1045 | "lines": true, 1046 | "linewidth": 1, 1047 | "links": [], 1048 | "nullPointMode": "connected", 1049 | "percentage": false, 1050 | "pointradius": 5, 1051 | "points": false, 1052 | "renderer": "flot", 1053 | "seriesOverrides": [], 1054 | "spaceLength": 10, 1055 | "stack": false, 1056 | "steppedLine": false, 1057 | "targets": [ 1058 | { 1059 | "$$hashKey": "object:949", 1060 | "alias": "$tag_container_name", 1061 | "dsType": "influxdb", 1062 | "expr": "", 1063 | "groupBy": [ 1064 | { 1065 | "params": [ 1066 | "$interval" 1067 | ], 1068 | "type": "time" 1069 | }, 1070 | { 1071 | "params": [ 1072 | "container_name" 1073 | ], 1074 | "type": "tag" 1075 | }, 1076 | { 1077 | "params": [ 1078 | "null" 1079 | ], 1080 | "type": "fill" 1081 | } 1082 | ], 1083 | "intervalFactor": 2, 1084 | "measurement": "docker_container_cpu", 1085 | "orderByTime": "ASC", 1086 | "policy": "default", 1087 | "refId": "A", 1088 | "resultFormat": "time_series", 1089 | "select": [ 1090 | [ 1091 | { 1092 | "params": [ 1093 | "usage_percent" 1094 | ], 1095 | "type": "field" 1096 | }, 1097 | { 1098 | "params": [], 1099 | "type": "mean" 1100 | } 1101 | ] 1102 | ], 1103 | "tags": [ 1104 | { 1105 | "key": "host", 1106 | "operator": "=~", 1107 | "value": "/^$host$/" 1108 | } 1109 | ] 1110 | } 1111 | ], 1112 | "thresholds": [], 1113 | "timeFrom": null, 1114 | "timeShift": null, 1115 | "title": "CPU per container for $host", 1116 | "tooltip": { 1117 | "msResolution": false, 1118 | "shared": true, 1119 | "sort": 0, 1120 | "value_type": "individual" 1121 | }, 1122 | "transparent": true, 1123 | "type": "graph", 1124 | "xaxis": { 1125 | "buckets": null, 1126 | "mode": "time", 1127 | "name": null, 1128 | "show": true, 1129 | "values": [] 1130 | }, 1131 | "yaxes": [ 1132 | { 1133 | "format": "percent", 1134 | "label": null, 1135 | "logBase": 1, 1136 | "max": null, 1137 | "min": null, 1138 | "show": true 1139 | }, 1140 | { 1141 | "format": "short", 1142 | "label": null, 1143 | "logBase": 1, 1144 | "max": null, 1145 | "min": null, 1146 | "show": true 1147 | } 1148 | ], 1149 | "yaxis": { 1150 | "align": false, 1151 | "alignLevel": null 1152 | } 1153 | }, 1154 | { 1155 | "aliasColors": {}, 1156 | "bars": false, 1157 | "dashLength": 10, 1158 | "dashes": false, 1159 | "datasource": "telegraf_ds", 1160 | "editable": true, 1161 | "error": false, 1162 | "fill": 1, 1163 | "gridPos": { 1164 | "h": 10, 1165 | "w": 9, 1166 | "x": 0, 1167 | "y": 18 1168 | }, 1169 | "id": 11, 1170 | "legend": { 1171 | "avg": false, 1172 | "current": false, 1173 | "max": false, 1174 | "min": false, 1175 | "show": true, 1176 | "total": false, 1177 | "values": false 1178 | }, 1179 | "lines": true, 1180 | "linewidth": 1, 1181 | "links": [], 1182 | "nullPointMode": "connected", 1183 | "percentage": false, 1184 | "pointradius": 5, 1185 | "points": false, 1186 | "renderer": "flot", 1187 | "seriesOverrides": [ 1188 | { 1189 | "$$hashKey": "object:2292", 1190 | "alias": "/^.* OUT$/", 1191 | "transform": "negative-Y" 1192 | } 1193 | ], 1194 | "spaceLength": 10, 1195 | "stack": false, 1196 | "steppedLine": false, 1197 | "targets": [ 1198 | { 1199 | "$$hashKey": "object:1039", 1200 | "alias": "$container OUT", 1201 | "dsType": "influxdb", 1202 | "expr": "", 1203 | "groupBy": [ 1204 | { 1205 | "params": [ 1206 | "$interval" 1207 | ], 1208 | "type": "time" 1209 | }, 1210 | { 1211 | "params": [ 1212 | "null" 1213 | ], 1214 | "type": "fill" 1215 | } 1216 | ], 1217 | "intervalFactor": 2, 1218 | "measurement": "docker_container_net", 1219 | "orderByTime": "ASC", 1220 | "policy": "default", 1221 | "refId": "A", 1222 | "resultFormat": "time_series", 1223 | "select": [ 1224 | [ 1225 | { 1226 | "params": [ 1227 | "tx_bytes" 1228 | ], 1229 | "type": "field" 1230 | }, 1231 | { 1232 | "params": [], 1233 | "type": "mean" 1234 | }, 1235 | { 1236 | "params": [ 1237 | "10s" 1238 | ], 1239 | "type": "derivative" 1240 | }, 1241 | { 1242 | "params": [ 1243 | " / 10" 1244 | ], 1245 | "type": "math" 1246 | } 1247 | ] 1248 | ], 1249 | "tags": [ 1250 | { 1251 | "key": "host", 1252 | "operator": "=~", 1253 | "value": "/^$host$/" 1254 | }, 1255 | { 1256 | "condition": "AND", 1257 | "key": "container_name", 1258 | "operator": "=~", 1259 | "value": "/^$container$/" 1260 | } 1261 | ] 1262 | }, 1263 | { 1264 | "$$hashKey": "object:1802", 1265 | "alias": "$container IN", 1266 | "dsType": "influxdb", 1267 | "expr": "", 1268 | "groupBy": [ 1269 | { 1270 | "params": [ 1271 | "$interval" 1272 | ], 1273 | "type": "time" 1274 | }, 1275 | { 1276 | "params": [ 1277 | "null" 1278 | ], 1279 | "type": "fill" 1280 | } 1281 | ], 1282 | "intervalFactor": 2, 1283 | "measurement": "docker_container_net", 1284 | "orderByTime": "ASC", 1285 | "policy": "default", 1286 | "refId": "B", 1287 | "resultFormat": "time_series", 1288 | "select": [ 1289 | [ 1290 | { 1291 | "params": [ 1292 | "rx_bytes" 1293 | ], 1294 | "type": "field" 1295 | }, 1296 | { 1297 | "params": [], 1298 | "type": "mean" 1299 | }, 1300 | { 1301 | "params": [ 1302 | "10s" 1303 | ], 1304 | "type": "derivative" 1305 | }, 1306 | { 1307 | "params": [ 1308 | " / 10" 1309 | ], 1310 | "type": "math" 1311 | } 1312 | ] 1313 | ], 1314 | "tags": [ 1315 | { 1316 | "key": "host", 1317 | "operator": "=~", 1318 | "value": "/^$host$/" 1319 | }, 1320 | { 1321 | "condition": "AND", 1322 | "key": "container_name", 1323 | "operator": "=~", 1324 | "value": "/^$container$/" 1325 | } 1326 | ] 1327 | } 1328 | ], 1329 | "thresholds": [], 1330 | "timeFrom": null, 1331 | "timeShift": null, 1332 | "title": "Network $container", 1333 | "tooltip": { 1334 | "msResolution": false, 1335 | "shared": true, 1336 | "sort": 0, 1337 | "value_type": "individual" 1338 | }, 1339 | "transparent": true, 1340 | "type": "graph", 1341 | "xaxis": { 1342 | "buckets": null, 1343 | "mode": "time", 1344 | "name": null, 1345 | "show": true, 1346 | "values": [] 1347 | }, 1348 | "yaxes": [ 1349 | { 1350 | "$$hashKey": "object:1865", 1351 | "format": "Bps", 1352 | "label": null, 1353 | "logBase": 1, 1354 | "max": null, 1355 | "min": null, 1356 | "show": true 1357 | }, 1358 | { 1359 | "$$hashKey": "object:1866", 1360 | "format": "short", 1361 | "label": null, 1362 | "logBase": 1, 1363 | "max": null, 1364 | "min": null, 1365 | "show": true 1366 | } 1367 | ], 1368 | "yaxis": { 1369 | "align": false, 1370 | "alignLevel": null 1371 | } 1372 | }, 1373 | { 1374 | "aliasColors": {}, 1375 | "bars": false, 1376 | "dashLength": 10, 1377 | "dashes": false, 1378 | "datasource": "telegraf_ds", 1379 | "editable": true, 1380 | "error": false, 1381 | "fill": 1, 1382 | "gridPos": { 1383 | "h": 10, 1384 | "w": 15, 1385 | "x": 9, 1386 | "y": 18 1387 | }, 1388 | "id": 12, 1389 | "legend": { 1390 | "alignAsTable": true, 1391 | "avg": true, 1392 | "current": true, 1393 | "max": true, 1394 | "min": false, 1395 | "rightSide": true, 1396 | "show": true, 1397 | "total": false, 1398 | "values": true 1399 | }, 1400 | "lines": true, 1401 | "linewidth": 1, 1402 | "links": [], 1403 | "nullPointMode": "connected", 1404 | "percentage": false, 1405 | "pointradius": 5, 1406 | "points": false, 1407 | "renderer": "flot", 1408 | "seriesOverrides": [ 1409 | { 1410 | "$$hashKey": "object:2228", 1411 | "alias": "/^.* OUT$/", 1412 | "transform": "negative-Y" 1413 | } 1414 | ], 1415 | "spaceLength": 10, 1416 | "stack": false, 1417 | "steppedLine": false, 1418 | "targets": [ 1419 | { 1420 | "$$hashKey": "object:795", 1421 | "alias": "$tag_container_name OUT", 1422 | "dsType": "influxdb", 1423 | "expr": "", 1424 | "groupBy": [ 1425 | { 1426 | "params": [ 1427 | "$interval" 1428 | ], 1429 | "type": "time" 1430 | }, 1431 | { 1432 | "params": [ 1433 | "container_name" 1434 | ], 1435 | "type": "tag" 1436 | }, 1437 | { 1438 | "params": [ 1439 | "null" 1440 | ], 1441 | "type": "fill" 1442 | } 1443 | ], 1444 | "intervalFactor": 2, 1445 | "measurement": "docker_container_net", 1446 | "orderByTime": "ASC", 1447 | "policy": "default", 1448 | "refId": "A", 1449 | "resultFormat": "time_series", 1450 | "select": [ 1451 | [ 1452 | { 1453 | "params": [ 1454 | "tx_bytes" 1455 | ], 1456 | "type": "field" 1457 | }, 1458 | { 1459 | "params": [], 1460 | "type": "mean" 1461 | }, 1462 | { 1463 | "params": [ 1464 | "10s" 1465 | ], 1466 | "type": "derivative" 1467 | }, 1468 | { 1469 | "params": [ 1470 | " / 10" 1471 | ], 1472 | "type": "math" 1473 | } 1474 | ] 1475 | ], 1476 | "tags": [ 1477 | { 1478 | "key": "host", 1479 | "operator": "=~", 1480 | "value": "/^$host$/" 1481 | } 1482 | ] 1483 | }, 1484 | { 1485 | "$$hashKey": "object:796", 1486 | "alias": "$tag_container_name IN", 1487 | "dsType": "influxdb", 1488 | "expr": "", 1489 | "groupBy": [ 1490 | { 1491 | "params": [ 1492 | "$interval" 1493 | ], 1494 | "type": "time" 1495 | }, 1496 | { 1497 | "params": [ 1498 | "container_name" 1499 | ], 1500 | "type": "tag" 1501 | }, 1502 | { 1503 | "params": [ 1504 | "null" 1505 | ], 1506 | "type": "fill" 1507 | } 1508 | ], 1509 | "intervalFactor": 2, 1510 | "measurement": "docker_container_net", 1511 | "orderByTime": "ASC", 1512 | "policy": "default", 1513 | "refId": "B", 1514 | "resultFormat": "time_series", 1515 | "select": [ 1516 | [ 1517 | { 1518 | "params": [ 1519 | "rx_bytes" 1520 | ], 1521 | "type": "field" 1522 | }, 1523 | { 1524 | "params": [], 1525 | "type": "mean" 1526 | }, 1527 | { 1528 | "params": [ 1529 | "10s" 1530 | ], 1531 | "type": "derivative" 1532 | }, 1533 | { 1534 | "params": [ 1535 | " / 10" 1536 | ], 1537 | "type": "math" 1538 | } 1539 | ] 1540 | ], 1541 | "tags": [ 1542 | { 1543 | "key": "host", 1544 | "operator": "=~", 1545 | "value": "/^$host$/" 1546 | } 1547 | ] 1548 | } 1549 | ], 1550 | "thresholds": [], 1551 | "timeFrom": null, 1552 | "timeShift": null, 1553 | "title": "Network per container for $host", 1554 | "tooltip": { 1555 | "msResolution": false, 1556 | "shared": true, 1557 | "sort": 0, 1558 | "value_type": "individual" 1559 | }, 1560 | "transparent": true, 1561 | "type": "graph", 1562 | "xaxis": { 1563 | "buckets": null, 1564 | "mode": "time", 1565 | "name": null, 1566 | "show": true, 1567 | "values": [] 1568 | }, 1569 | "yaxes": [ 1570 | { 1571 | "$$hashKey": "object:2056", 1572 | "format": "Bps", 1573 | "label": null, 1574 | "logBase": 1, 1575 | "max": null, 1576 | "min": null, 1577 | "show": true 1578 | }, 1579 | { 1580 | "$$hashKey": "object:2057", 1581 | "format": "short", 1582 | "label": null, 1583 | "logBase": 1, 1584 | "max": null, 1585 | "min": null, 1586 | "show": true 1587 | } 1588 | ], 1589 | "yaxis": { 1590 | "align": false, 1591 | "alignLevel": null 1592 | } 1593 | } 1594 | ], 1595 | "refresh": "30s", 1596 | "schemaVersion": 16, 1597 | "style": "dark", 1598 | "tags": [], 1599 | "templating": { 1600 | "list": [ 1601 | { 1602 | "allValue": null, 1603 | "current": { 1604 | "text": "997563c", 1605 | "value": "997563c" 1606 | }, 1607 | "datasource": "telegraf_ds", 1608 | "hide": 0, 1609 | "includeAll": false, 1610 | "label": null, 1611 | "multi": false, 1612 | "name": "host", 1613 | "options": [], 1614 | "query": "show tag values with key = \"host\"", 1615 | "refresh": 1, 1616 | "regex": "", 1617 | "sort": 0, 1618 | "tagValuesQuery": null, 1619 | "tags": [], 1620 | "tagsQuery": null, 1621 | "type": "query", 1622 | "useTags": false 1623 | }, 1624 | { 1625 | "allValue": null, 1626 | "current": { 1627 | "tags": [], 1628 | "text": "influxdb", 1629 | "value": "influxdb" 1630 | }, 1631 | "datasource": "telegraf_ds", 1632 | "hide": 0, 1633 | "includeAll": false, 1634 | "label": null, 1635 | "multi": false, 1636 | "name": "container", 1637 | "options": [], 1638 | "query": "show tag values with key = \"container_name\" where host = '$host'", 1639 | "refresh": 1, 1640 | "regex": "", 1641 | "sort": 0, 1642 | "tagValuesQuery": null, 1643 | "tags": [], 1644 | "tagsQuery": null, 1645 | "type": "query", 1646 | "useTags": false 1647 | } 1648 | ] 1649 | }, 1650 | "time": { 1651 | "from": "now-1h", 1652 | "to": "now" 1653 | }, 1654 | "timepicker": { 1655 | "refresh_intervals": [ 1656 | "5s", 1657 | "10s", 1658 | "30s", 1659 | "1m", 1660 | "5m", 1661 | "15m", 1662 | "30m", 1663 | "1h", 1664 | "2h", 1665 | "1d" 1666 | ], 1667 | "time_options": [ 1668 | "5m", 1669 | "15m", 1670 | "1h", 1671 | "6h", 1672 | "12h", 1673 | "24h", 1674 | "2d", 1675 | "7d", 1676 | "30d" 1677 | ] 1678 | }, 1679 | "timezone": "browser", 1680 | "title": "docker containers", 1681 | "uid": "K-0EGGkgz", 1682 | "version": 1 1683 | } -------------------------------------------------------------------------------- /grafana/dashboards/system metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "$$hashKey": "object:319", 6 | "builtIn": 1, 7 | "datasource": "-- Grafana --", 8 | "enable": true, 9 | "hide": true, 10 | "iconColor": "rgba(0, 211, 255, 1)", 11 | "name": "Annotations & Alerts", 12 | "type": "dashboard" 13 | } 14 | ] 15 | }, 16 | "description": "InfluxDB system metrics", 17 | "editable": true, 18 | "gnetId": 1138, 19 | "graphTooltip": 0, 20 | "id": null, 21 | "iteration": 1543431215855, 22 | "links": [], 23 | "panels": [ 24 | { 25 | "content": "# System Metrics for $host", 26 | "editable": true, 27 | "error": false, 28 | "gridPos": { 29 | "h": 4, 30 | "w": 4, 31 | "x": 0, 32 | "y": 0 33 | }, 34 | "id": 7, 35 | "links": [], 36 | "mode": "markdown", 37 | "title": "", 38 | "transparent": true, 39 | "type": "text" 40 | }, 41 | { 42 | "cacheTimeout": null, 43 | "colorBackground": false, 44 | "colorValue": false, 45 | "colors": [ 46 | "rgba(245, 54, 54, 0.9)", 47 | "rgba(237, 129, 40, 0.89)", 48 | "rgba(50, 172, 45, 0.97)" 49 | ], 50 | "datasource": "telegraf_ds", 51 | "editable": true, 52 | "error": false, 53 | "format": "s", 54 | "gauge": { 55 | "maxValue": 100, 56 | "minValue": 0, 57 | "show": false, 58 | "thresholdLabels": false, 59 | "thresholdMarkers": true 60 | }, 61 | "gridPos": { 62 | "h": 3, 63 | "w": 3, 64 | "x": 4, 65 | "y": 0 66 | }, 67 | "id": 2, 68 | "interval": null, 69 | "links": [], 70 | "mappingType": 1, 71 | "mappingTypes": [ 72 | { 73 | "name": "value to text", 74 | "value": 1 75 | }, 76 | { 77 | "name": "range to text", 78 | "value": 2 79 | } 80 | ], 81 | "maxDataPoints": 100, 82 | "nullPointMode": "connected", 83 | "nullText": null, 84 | "postfix": "", 85 | "postfixFontSize": "50%", 86 | "prefix": "", 87 | "prefixFontSize": "50%", 88 | "rangeMaps": [ 89 | { 90 | "from": "null", 91 | "text": "N/A", 92 | "to": "null" 93 | } 94 | ], 95 | "sparkline": { 96 | "fillColor": "rgba(31, 118, 189, 0.18)", 97 | "full": false, 98 | "lineColor": "rgb(31, 120, 193)", 99 | "show": false 100 | }, 101 | "tableColumn": "", 102 | "targets": [ 103 | { 104 | "dsType": "influxdb", 105 | "expr": "", 106 | "groupBy": [ 107 | { 108 | "params": [ 109 | "$interval" 110 | ], 111 | "type": "time" 112 | }, 113 | { 114 | "params": [ 115 | "null" 116 | ], 117 | "type": "fill" 118 | } 119 | ], 120 | "intervalFactor": 2, 121 | "measurement": "system", 122 | "policy": "default", 123 | "refId": "A", 124 | "resultFormat": "time_series", 125 | "select": [ 126 | [ 127 | { 128 | "params": [ 129 | "uptime" 130 | ], 131 | "type": "field" 132 | }, 133 | { 134 | "params": [], 135 | "type": "mean" 136 | } 137 | ] 138 | ], 139 | "tags": [ 140 | { 141 | "key": "host", 142 | "operator": "=~", 143 | "value": "/^$host$/" 144 | } 145 | ] 146 | } 147 | ], 148 | "thresholds": "", 149 | "title": "Uptime $host", 150 | "type": "singlestat", 151 | "valueFontSize": "80%", 152 | "valueMaps": [ 153 | { 154 | "op": "=", 155 | "text": "N/A", 156 | "value": "null" 157 | } 158 | ], 159 | "valueName": "avg" 160 | }, 161 | { 162 | "cacheTimeout": null, 163 | "colorBackground": false, 164 | "colorValue": false, 165 | "colors": [ 166 | "rgba(50, 172, 45, 0.97)", 167 | "rgba(237, 129, 40, 0.89)", 168 | "rgba(245, 54, 54, 0.9)" 169 | ], 170 | "datasource": "telegraf_ds", 171 | "editable": true, 172 | "error": false, 173 | "format": "percent", 174 | "gauge": { 175 | "maxValue": 100, 176 | "minValue": 0, 177 | "show": true, 178 | "thresholdLabels": false, 179 | "thresholdMarkers": true 180 | }, 181 | "gridPos": { 182 | "h": 6, 183 | "w": 3, 184 | "x": 7, 185 | "y": 0 186 | }, 187 | "id": 13, 188 | "interval": null, 189 | "links": [], 190 | "mappingType": 1, 191 | "mappingTypes": [ 192 | { 193 | "$$hashKey": "object:1971", 194 | "name": "value to text", 195 | "value": 1 196 | }, 197 | { 198 | "$$hashKey": "object:1972", 199 | "name": "range to text", 200 | "value": 2 201 | } 202 | ], 203 | "maxDataPoints": 100, 204 | "nullPointMode": "connected", 205 | "nullText": null, 206 | "postfix": "", 207 | "postfixFontSize": "50%", 208 | "prefix": "", 209 | "prefixFontSize": "50%", 210 | "rangeMaps": [ 211 | { 212 | "from": "null", 213 | "text": "N/A", 214 | "to": "null" 215 | } 216 | ], 217 | "sparkline": { 218 | "fillColor": "rgba(31, 118, 189, 0.18)", 219 | "full": false, 220 | "lineColor": "rgb(31, 120, 193)", 221 | "show": false 222 | }, 223 | "tableColumn": "", 224 | "targets": [ 225 | { 226 | "$$hashKey": "object:1894", 227 | "dsType": "influxdb", 228 | "expr": "", 229 | "groupBy": [ 230 | { 231 | "params": [ 232 | "$interval" 233 | ], 234 | "type": "time" 235 | }, 236 | { 237 | "params": [ 238 | "null" 239 | ], 240 | "type": "fill" 241 | } 242 | ], 243 | "intervalFactor": 2, 244 | "measurement": "swap", 245 | "orderByTime": "ASC", 246 | "policy": "default", 247 | "refId": "A", 248 | "resultFormat": "time_series", 249 | "select": [ 250 | [ 251 | { 252 | "params": [ 253 | "used_percent" 254 | ], 255 | "type": "field" 256 | }, 257 | { 258 | "params": [], 259 | "type": "mean" 260 | } 261 | ] 262 | ], 263 | "tags": [ 264 | { 265 | "key": "host", 266 | "operator": "=~", 267 | "value": "/^$host$/" 268 | } 269 | ] 270 | } 271 | ], 272 | "thresholds": "20,50", 273 | "title": "Swap used", 274 | "transparent": true, 275 | "type": "singlestat", 276 | "valueFontSize": "80%", 277 | "valueMaps": [ 278 | { 279 | "$$hashKey": "object:1974", 280 | "op": "=", 281 | "text": "N/A", 282 | "value": "null" 283 | } 284 | ], 285 | "valueName": "avg" 286 | }, 287 | { 288 | "cacheTimeout": null, 289 | "colorBackground": false, 290 | "colorValue": false, 291 | "colors": [ 292 | "rgba(245, 54, 54, 0.9)", 293 | "rgba(237, 129, 40, 0.89)", 294 | "rgba(50, 172, 45, 0.97)" 295 | ], 296 | "datasource": "telegraf_ds", 297 | "editable": true, 298 | "error": false, 299 | "format": "percent", 300 | "gauge": { 301 | "maxValue": 100, 302 | "minValue": 0, 303 | "show": true, 304 | "thresholdLabels": false, 305 | "thresholdMarkers": true 306 | }, 307 | "gridPos": { 308 | "h": 6, 309 | "w": 3, 310 | "x": 10, 311 | "y": 0 312 | }, 313 | "id": 5, 314 | "interval": null, 315 | "links": [], 316 | "mappingType": 1, 317 | "mappingTypes": [ 318 | { 319 | "name": "value to text", 320 | "value": 1 321 | }, 322 | { 323 | "name": "range to text", 324 | "value": 2 325 | } 326 | ], 327 | "maxDataPoints": 100, 328 | "nullPointMode": "connected", 329 | "nullText": null, 330 | "postfix": "", 331 | "postfixFontSize": "50%", 332 | "prefix": "", 333 | "prefixFontSize": "50%", 334 | "rangeMaps": [ 335 | { 336 | "from": "null", 337 | "text": "N/A", 338 | "to": "null" 339 | } 340 | ], 341 | "sparkline": { 342 | "fillColor": "rgba(31, 118, 189, 0.18)", 343 | "full": false, 344 | "lineColor": "rgb(31, 120, 193)", 345 | "show": false 346 | }, 347 | "tableColumn": "", 348 | "targets": [ 349 | { 350 | "$$hashKey": "object:484", 351 | "dsType": "influxdb", 352 | "expr": "", 353 | "groupBy": [ 354 | { 355 | "params": [ 356 | "$interval" 357 | ], 358 | "type": "time" 359 | }, 360 | { 361 | "params": [ 362 | "null" 363 | ], 364 | "type": "fill" 365 | } 366 | ], 367 | "intervalFactor": 2, 368 | "measurement": "mem", 369 | "orderByTime": "ASC", 370 | "policy": "default", 371 | "refId": "A", 372 | "resultFormat": "time_series", 373 | "select": [ 374 | [ 375 | { 376 | "params": [ 377 | "available_percent" 378 | ], 379 | "type": "field" 380 | }, 381 | { 382 | "params": [], 383 | "type": "mean" 384 | } 385 | ] 386 | ], 387 | "tags": [ 388 | { 389 | "key": "host", 390 | "operator": "=~", 391 | "value": "/^$host$/" 392 | } 393 | ] 394 | } 395 | ], 396 | "thresholds": "20,40", 397 | "title": "Memory available", 398 | "transparent": true, 399 | "type": "singlestat", 400 | "valueFontSize": "80%", 401 | "valueMaps": [ 402 | { 403 | "op": "=", 404 | "text": "N/A", 405 | "value": "null" 406 | } 407 | ], 408 | "valueName": "avg" 409 | }, 410 | { 411 | "cacheTimeout": null, 412 | "colorBackground": false, 413 | "colorValue": false, 414 | "colors": [ 415 | "rgba(245, 54, 54, 0.9)", 416 | "rgba(237, 129, 40, 0.89)", 417 | "rgba(50, 172, 45, 0.97)" 418 | ], 419 | "datasource": "telegraf_ds", 420 | "editable": true, 421 | "error": false, 422 | "format": "bytes", 423 | "gauge": { 424 | "maxValue": 100, 425 | "minValue": 0, 426 | "show": false, 427 | "thresholdLabels": false, 428 | "thresholdMarkers": true 429 | }, 430 | "gridPos": { 431 | "h": 3, 432 | "w": 4, 433 | "x": 13, 434 | "y": 0 435 | }, 436 | "id": 6, 437 | "interval": null, 438 | "links": [], 439 | "mappingType": 1, 440 | "mappingTypes": [ 441 | { 442 | "name": "value to text", 443 | "value": 1 444 | }, 445 | { 446 | "name": "range to text", 447 | "value": 2 448 | } 449 | ], 450 | "maxDataPoints": 100, 451 | "nullPointMode": "connected", 452 | "nullText": null, 453 | "postfix": "", 454 | "postfixFontSize": "50%", 455 | "prefix": "", 456 | "prefixFontSize": "50%", 457 | "rangeMaps": [ 458 | { 459 | "from": "null", 460 | "text": "N/A", 461 | "to": "null" 462 | } 463 | ], 464 | "sparkline": { 465 | "fillColor": "rgba(31, 118, 189, 0.18)", 466 | "full": false, 467 | "lineColor": "rgb(31, 120, 193)", 468 | "show": true 469 | }, 470 | "tableColumn": "", 471 | "targets": [ 472 | { 473 | "$$hashKey": "object:415", 474 | "alias": "", 475 | "dsType": "influxdb", 476 | "expr": "", 477 | "groupBy": [ 478 | { 479 | "params": [ 480 | "$interval" 481 | ], 482 | "type": "time" 483 | }, 484 | { 485 | "params": [ 486 | "null" 487 | ], 488 | "type": "fill" 489 | } 490 | ], 491 | "intervalFactor": 2, 492 | "measurement": "mem", 493 | "orderByTime": "ASC", 494 | "policy": "default", 495 | "refId": "A", 496 | "resultFormat": "time_series", 497 | "select": [ 498 | [ 499 | { 500 | "params": [ 501 | "available" 502 | ], 503 | "type": "field" 504 | }, 505 | { 506 | "params": [], 507 | "type": "mean" 508 | } 509 | ] 510 | ], 511 | "tags": [ 512 | { 513 | "key": "host", 514 | "operator": "=~", 515 | "value": "/^$host$/" 516 | } 517 | ] 518 | } 519 | ], 520 | "thresholds": "", 521 | "title": "Memory Available", 522 | "type": "singlestat", 523 | "valueFontSize": "80%", 524 | "valueMaps": [ 525 | { 526 | "op": "=", 527 | "text": "OK", 528 | "value": "200" 529 | }, 530 | { 531 | "op": "=", 532 | "text": "", 533 | "value": "" 534 | } 535 | ], 536 | "valueName": "avg" 537 | }, 538 | { 539 | "cacheTimeout": null, 540 | "colorBackground": false, 541 | "colorValue": false, 542 | "colors": [ 543 | "rgba(50, 172, 45, 0.97)", 544 | "rgba(237, 129, 40, 0.89)", 545 | "rgba(245, 54, 54, 0.9)" 546 | ], 547 | "datasource": "telegraf_ds", 548 | "editable": true, 549 | "error": false, 550 | "format": "percent", 551 | "gauge": { 552 | "maxValue": 100, 553 | "minValue": 0, 554 | "show": true, 555 | "thresholdLabels": false, 556 | "thresholdMarkers": true 557 | }, 558 | "gridPos": { 559 | "h": 6, 560 | "w": 3, 561 | "x": 17, 562 | "y": 0 563 | }, 564 | "id": 16, 565 | "interval": null, 566 | "links": [], 567 | "mappingType": 1, 568 | "mappingTypes": [ 569 | { 570 | "name": "value to text", 571 | "value": 1 572 | }, 573 | { 574 | "name": "range to text", 575 | "value": 2 576 | } 577 | ], 578 | "maxDataPoints": 100, 579 | "nullPointMode": "connected", 580 | "nullText": null, 581 | "postfix": "", 582 | "postfixFontSize": "50%", 583 | "prefix": "", 584 | "prefixFontSize": "50%", 585 | "rangeMaps": [ 586 | { 587 | "from": "null", 588 | "text": "N/A", 589 | "to": "null" 590 | } 591 | ], 592 | "sparkline": { 593 | "fillColor": "rgba(31, 118, 189, 0.18)", 594 | "full": false, 595 | "lineColor": "rgb(31, 120, 193)", 596 | "show": false 597 | }, 598 | "tableColumn": "", 599 | "targets": [ 600 | { 601 | "$$hashKey": "object:246", 602 | "dsType": "influxdb", 603 | "expr": "", 604 | "groupBy": [ 605 | { 606 | "params": [ 607 | "$interval" 608 | ], 609 | "type": "time" 610 | }, 611 | { 612 | "params": [ 613 | "null" 614 | ], 615 | "type": "fill" 616 | } 617 | ], 618 | "intervalFactor": 2, 619 | "measurement": "disk", 620 | "orderByTime": "ASC", 621 | "policy": "default", 622 | "refId": "A", 623 | "resultFormat": "time_series", 624 | "select": [ 625 | [ 626 | { 627 | "params": [ 628 | "used_percent" 629 | ], 630 | "type": "field" 631 | }, 632 | { 633 | "params": [], 634 | "type": "mean" 635 | } 636 | ] 637 | ], 638 | "tags": [ 639 | { 640 | "key": "path", 641 | "operator": "=", 642 | "value": "/" 643 | }, 644 | { 645 | "condition": "AND", 646 | "key": "host", 647 | "operator": "=~", 648 | "value": "/^$host$/" 649 | } 650 | ] 651 | } 652 | ], 653 | "thresholds": "70,85", 654 | "title": "SD card usage", 655 | "transparent": true, 656 | "type": "singlestat", 657 | "valueFontSize": "80%", 658 | "valueMaps": [ 659 | { 660 | "op": "=", 661 | "text": "N/A", 662 | "value": "null" 663 | } 664 | ], 665 | "valueName": "avg" 666 | }, 667 | { 668 | "cacheTimeout": null, 669 | "colorBackground": false, 670 | "colorValue": false, 671 | "colors": [ 672 | "rgba(245, 54, 54, 0.9)", 673 | "rgba(237, 129, 40, 0.89)", 674 | "rgba(50, 172, 45, 0.97)" 675 | ], 676 | "datasource": "telegraf_ds", 677 | "editable": true, 678 | "error": false, 679 | "format": "bytes", 680 | "gauge": { 681 | "maxValue": 100, 682 | "minValue": 0, 683 | "show": false, 684 | "thresholdLabels": false, 685 | "thresholdMarkers": true 686 | }, 687 | "gridPos": { 688 | "h": 3, 689 | "w": 4, 690 | "x": 20, 691 | "y": 0 692 | }, 693 | "id": 18, 694 | "interval": null, 695 | "links": [], 696 | "mappingType": 1, 697 | "mappingTypes": [ 698 | { 699 | "$$hashKey": "object:804", 700 | "name": "value to text", 701 | "value": 1 702 | }, 703 | { 704 | "$$hashKey": "object:805", 705 | "name": "range to text", 706 | "value": 2 707 | } 708 | ], 709 | "maxDataPoints": 100, 710 | "nullPointMode": "connected", 711 | "nullText": null, 712 | "postfix": "", 713 | "postfixFontSize": "50%", 714 | "prefix": "", 715 | "prefixFontSize": "50%", 716 | "rangeMaps": [ 717 | { 718 | "from": "null", 719 | "text": "N/A", 720 | "to": "null" 721 | } 722 | ], 723 | "sparkline": { 724 | "fillColor": "rgba(31, 118, 189, 0.18)", 725 | "full": false, 726 | "lineColor": "rgb(31, 120, 193)", 727 | "show": true 728 | }, 729 | "tableColumn": "", 730 | "targets": [ 731 | { 732 | "$$hashKey": "object:415", 733 | "alias": "", 734 | "dsType": "influxdb", 735 | "expr": "", 736 | "groupBy": [ 737 | { 738 | "params": [ 739 | "$interval" 740 | ], 741 | "type": "time" 742 | }, 743 | { 744 | "params": [ 745 | "null" 746 | ], 747 | "type": "fill" 748 | } 749 | ], 750 | "intervalFactor": 2, 751 | "measurement": "disk", 752 | "orderByTime": "ASC", 753 | "policy": "default", 754 | "refId": "A", 755 | "resultFormat": "time_series", 756 | "select": [ 757 | [ 758 | { 759 | "params": [ 760 | "used" 761 | ], 762 | "type": "field" 763 | }, 764 | { 765 | "params": [], 766 | "type": "mean" 767 | } 768 | ] 769 | ], 770 | "tags": [ 771 | { 772 | "key": "path", 773 | "operator": "=", 774 | "value": "/" 775 | }, 776 | { 777 | "condition": "AND", 778 | "key": "host", 779 | "operator": "=~", 780 | "value": "/^$host$/" 781 | } 782 | ] 783 | } 784 | ], 785 | "thresholds": "", 786 | "title": "disk / (SD card) used", 787 | "type": "singlestat", 788 | "valueFontSize": "80%", 789 | "valueMaps": [ 790 | { 791 | "$$hashKey": "object:807", 792 | "op": "=", 793 | "text": "OK", 794 | "value": "200" 795 | }, 796 | { 797 | "$$hashKey": "object:808", 798 | "op": "=", 799 | "text": "", 800 | "value": "" 801 | } 802 | ], 803 | "valueName": "avg" 804 | }, 805 | { 806 | "cacheTimeout": null, 807 | "colorBackground": false, 808 | "colorValue": false, 809 | "colors": [ 810 | "rgba(245, 54, 54, 0.9)", 811 | "rgba(237, 129, 40, 0.89)", 812 | "rgba(50, 172, 45, 0.97)" 813 | ], 814 | "datasource": "telegraf_ds", 815 | "editable": true, 816 | "error": false, 817 | "format": "bytes", 818 | "gauge": { 819 | "maxValue": 100, 820 | "minValue": 0, 821 | "show": false, 822 | "thresholdLabels": false, 823 | "thresholdMarkers": true 824 | }, 825 | "gridPos": { 826 | "h": 3, 827 | "w": 4, 828 | "x": 13, 829 | "y": 3 830 | }, 831 | "id": 20, 832 | "interval": null, 833 | "links": [], 834 | "mappingType": 1, 835 | "mappingTypes": [ 836 | { 837 | "$$hashKey": "object:1855", 838 | "name": "value to text", 839 | "value": 1 840 | }, 841 | { 842 | "$$hashKey": "object:1856", 843 | "name": "range to text", 844 | "value": 2 845 | } 846 | ], 847 | "maxDataPoints": 100, 848 | "nullPointMode": "connected", 849 | "nullText": null, 850 | "postfix": "", 851 | "postfixFontSize": "50%", 852 | "prefix": "", 853 | "prefixFontSize": "50%", 854 | "rangeMaps": [ 855 | { 856 | "from": "null", 857 | "text": "N/A", 858 | "to": "null" 859 | } 860 | ], 861 | "sparkline": { 862 | "fillColor": "rgba(31, 118, 189, 0.18)", 863 | "full": false, 864 | "lineColor": "rgb(31, 120, 193)", 865 | "show": false 866 | }, 867 | "tableColumn": "", 868 | "targets": [ 869 | { 870 | "$$hashKey": "object:1591", 871 | "dsType": "influxdb", 872 | "expr": "", 873 | "groupBy": [ 874 | { 875 | "params": [ 876 | "$__interval" 877 | ], 878 | "type": "time" 879 | }, 880 | { 881 | "params": [ 882 | "null" 883 | ], 884 | "type": "fill" 885 | } 886 | ], 887 | "intervalFactor": 2, 888 | "measurement": "mem", 889 | "orderByTime": "ASC", 890 | "policy": "default", 891 | "refId": "A", 892 | "resultFormat": "time_series", 893 | "select": [ 894 | [ 895 | { 896 | "params": [ 897 | "total" 898 | ], 899 | "type": "field" 900 | }, 901 | { 902 | "params": [], 903 | "type": "mean" 904 | } 905 | ] 906 | ], 907 | "tags": [ 908 | { 909 | "key": "host", 910 | "operator": "=~", 911 | "value": "/^$host$/" 912 | } 913 | ] 914 | } 915 | ], 916 | "thresholds": "", 917 | "title": "Total Memory $host", 918 | "type": "singlestat", 919 | "valueFontSize": "80%", 920 | "valueMaps": [ 921 | { 922 | "$$hashKey": "object:1858", 923 | "op": "=", 924 | "text": "N/A", 925 | "value": "null" 926 | } 927 | ], 928 | "valueName": "current" 929 | }, 930 | { 931 | "cacheTimeout": null, 932 | "colorBackground": false, 933 | "colorValue": false, 934 | "colors": [ 935 | "rgba(50, 172, 45, 0.97)", 936 | "rgba(237, 129, 40, 0.89)", 937 | "rgba(245, 54, 54, 0.9)" 938 | ], 939 | "datasource": "telegraf_ds", 940 | "editable": true, 941 | "error": false, 942 | "format": "bytes", 943 | "gauge": { 944 | "maxValue": 100, 945 | "minValue": 0, 946 | "show": false, 947 | "thresholdLabels": false, 948 | "thresholdMarkers": true 949 | }, 950 | "gridPos": { 951 | "h": 3, 952 | "w": 4, 953 | "x": 20, 954 | "y": 3 955 | }, 956 | "id": 21, 957 | "interval": null, 958 | "links": [], 959 | "mappingType": 1, 960 | "mappingTypes": [ 961 | { 962 | "$$hashKey": "object:1855", 963 | "name": "value to text", 964 | "value": 1 965 | }, 966 | { 967 | "$$hashKey": "object:1856", 968 | "name": "range to text", 969 | "value": 2 970 | } 971 | ], 972 | "maxDataPoints": 100, 973 | "nullPointMode": "connected", 974 | "nullText": null, 975 | "postfix": "", 976 | "postfixFontSize": "50%", 977 | "prefix": "", 978 | "prefixFontSize": "50%", 979 | "rangeMaps": [ 980 | { 981 | "from": "null", 982 | "text": "N/A", 983 | "to": "null" 984 | } 985 | ], 986 | "sparkline": { 987 | "fillColor": "rgba(31, 118, 189, 0.18)", 988 | "full": false, 989 | "lineColor": "rgb(31, 120, 193)", 990 | "show": false 991 | }, 992 | "tableColumn": "", 993 | "targets": [ 994 | { 995 | "$$hashKey": "object:1591", 996 | "dsType": "influxdb", 997 | "expr": "", 998 | "groupBy": [ 999 | { 1000 | "params": [ 1001 | "$__interval" 1002 | ], 1003 | "type": "time" 1004 | }, 1005 | { 1006 | "params": [ 1007 | "null" 1008 | ], 1009 | "type": "fill" 1010 | } 1011 | ], 1012 | "intervalFactor": 2, 1013 | "measurement": "disk", 1014 | "orderByTime": "ASC", 1015 | "policy": "default", 1016 | "refId": "A", 1017 | "resultFormat": "time_series", 1018 | "select": [ 1019 | [ 1020 | { 1021 | "params": [ 1022 | "total" 1023 | ], 1024 | "type": "field" 1025 | }, 1026 | { 1027 | "params": [], 1028 | "type": "mean" 1029 | } 1030 | ] 1031 | ], 1032 | "tags": [ 1033 | { 1034 | "key": "host", 1035 | "operator": "=~", 1036 | "value": "/^$host$/" 1037 | }, 1038 | { 1039 | "condition": "AND", 1040 | "key": "path", 1041 | "operator": "=", 1042 | "value": "/" 1043 | } 1044 | ] 1045 | } 1046 | ], 1047 | "thresholds": "", 1048 | "title": "Total SD card $host", 1049 | "type": "singlestat", 1050 | "valueFontSize": "80%", 1051 | "valueMaps": [ 1052 | { 1053 | "$$hashKey": "object:1858", 1054 | "op": "=", 1055 | "text": "N/A", 1056 | "value": "null" 1057 | } 1058 | ], 1059 | "valueName": "current" 1060 | }, 1061 | { 1062 | "aliasColors": { 1063 | "Available": "#447EBC", 1064 | "Used": "#0A437C" 1065 | }, 1066 | "bars": false, 1067 | "dashLength": 10, 1068 | "dashes": false, 1069 | "datasource": "telegraf_ds", 1070 | "editable": true, 1071 | "error": false, 1072 | "fill": 6, 1073 | "gridPos": { 1074 | "h": 7, 1075 | "w": 12, 1076 | "x": 0, 1077 | "y": 6 1078 | }, 1079 | "id": 8, 1080 | "legend": { 1081 | "avg": false, 1082 | "current": false, 1083 | "max": false, 1084 | "min": false, 1085 | "show": true, 1086 | "total": false, 1087 | "values": false 1088 | }, 1089 | "lines": true, 1090 | "linewidth": 2, 1091 | "links": [], 1092 | "nullPointMode": "connected", 1093 | "percentage": false, 1094 | "pointradius": 5, 1095 | "points": false, 1096 | "renderer": "flot", 1097 | "seriesOverrides": [], 1098 | "spaceLength": 10, 1099 | "stack": true, 1100 | "steppedLine": false, 1101 | "targets": [ 1102 | { 1103 | "$$hashKey": "object:2701", 1104 | "alias": "Used", 1105 | "dsType": "influxdb", 1106 | "expr": "", 1107 | "groupBy": [ 1108 | { 1109 | "params": [ 1110 | "$interval" 1111 | ], 1112 | "type": "time" 1113 | }, 1114 | { 1115 | "params": [ 1116 | "null" 1117 | ], 1118 | "type": "fill" 1119 | } 1120 | ], 1121 | "intervalFactor": 2, 1122 | "measurement": "mem", 1123 | "orderByTime": "ASC", 1124 | "policy": "default", 1125 | "refId": "B", 1126 | "resultFormat": "time_series", 1127 | "select": [ 1128 | [ 1129 | { 1130 | "params": [ 1131 | "used" 1132 | ], 1133 | "type": "field" 1134 | }, 1135 | { 1136 | "params": [], 1137 | "type": "mean" 1138 | } 1139 | ] 1140 | ], 1141 | "tags": [ 1142 | { 1143 | "key": "host", 1144 | "operator": "=~", 1145 | "value": "/^$host$/" 1146 | } 1147 | ] 1148 | }, 1149 | { 1150 | "$$hashKey": "object:2702", 1151 | "alias": "Available", 1152 | "dsType": "influxdb", 1153 | "expr": "", 1154 | "groupBy": [ 1155 | { 1156 | "params": [ 1157 | "$interval" 1158 | ], 1159 | "type": "time" 1160 | }, 1161 | { 1162 | "params": [ 1163 | "null" 1164 | ], 1165 | "type": "fill" 1166 | } 1167 | ], 1168 | "intervalFactor": 2, 1169 | "measurement": "mem", 1170 | "orderByTime": "ASC", 1171 | "policy": "default", 1172 | "refId": "C", 1173 | "resultFormat": "time_series", 1174 | "select": [ 1175 | [ 1176 | { 1177 | "params": [ 1178 | "available" 1179 | ], 1180 | "type": "field" 1181 | }, 1182 | { 1183 | "params": [], 1184 | "type": "mean" 1185 | } 1186 | ] 1187 | ], 1188 | "tags": [ 1189 | { 1190 | "key": "host", 1191 | "operator": "=~", 1192 | "value": "/^$host$/" 1193 | } 1194 | ] 1195 | } 1196 | ], 1197 | "thresholds": [], 1198 | "timeFrom": null, 1199 | "timeShift": null, 1200 | "title": "Memory", 1201 | "tooltip": { 1202 | "msResolution": false, 1203 | "shared": true, 1204 | "sort": 0, 1205 | "value_type": "individual" 1206 | }, 1207 | "type": "graph", 1208 | "xaxis": { 1209 | "buckets": null, 1210 | "mode": "time", 1211 | "name": null, 1212 | "show": true, 1213 | "values": [] 1214 | }, 1215 | "yaxes": [ 1216 | { 1217 | "$$hashKey": "object:2791", 1218 | "format": "bytes", 1219 | "label": null, 1220 | "logBase": 1, 1221 | "max": null, 1222 | "min": "0", 1223 | "show": true 1224 | }, 1225 | { 1226 | "$$hashKey": "object:2792", 1227 | "format": "short", 1228 | "label": null, 1229 | "logBase": 1, 1230 | "max": null, 1231 | "min": null, 1232 | "show": true 1233 | } 1234 | ], 1235 | "yaxis": { 1236 | "align": false, 1237 | "alignLevel": null 1238 | } 1239 | }, 1240 | { 1241 | "aliasColors": { 1242 | "idle": "#EAB839", 1243 | "system": "#508642" 1244 | }, 1245 | "bars": false, 1246 | "dashLength": 10, 1247 | "dashes": false, 1248 | "datasource": "telegraf_ds", 1249 | "editable": true, 1250 | "error": false, 1251 | "fill": 4, 1252 | "gridPos": { 1253 | "h": 7, 1254 | "w": 12, 1255 | "x": 12, 1256 | "y": 6 1257 | }, 1258 | "id": 3, 1259 | "legend": { 1260 | "alignAsTable": true, 1261 | "avg": true, 1262 | "current": false, 1263 | "max": true, 1264 | "min": true, 1265 | "rightSide": true, 1266 | "show": true, 1267 | "total": false, 1268 | "values": true 1269 | }, 1270 | "lines": true, 1271 | "linewidth": 1, 1272 | "links": [], 1273 | "nullPointMode": "connected", 1274 | "percentage": true, 1275 | "pointradius": 5, 1276 | "points": false, 1277 | "renderer": "flot", 1278 | "seriesOverrides": [], 1279 | "spaceLength": 10, 1280 | "stack": true, 1281 | "steppedLine": false, 1282 | "targets": [ 1283 | { 1284 | "$$hashKey": "object:502", 1285 | "alias": "system", 1286 | "dsType": "influxdb", 1287 | "groupBy": [ 1288 | { 1289 | "params": [ 1290 | "$interval" 1291 | ], 1292 | "type": "time" 1293 | }, 1294 | { 1295 | "params": [ 1296 | "null" 1297 | ], 1298 | "type": "fill" 1299 | } 1300 | ], 1301 | "measurement": "cpu", 1302 | "orderByTime": "ASC", 1303 | "policy": "default", 1304 | "refId": "F", 1305 | "resultFormat": "time_series", 1306 | "select": [ 1307 | [ 1308 | { 1309 | "params": [ 1310 | "usage_system" 1311 | ], 1312 | "type": "field" 1313 | }, 1314 | { 1315 | "params": [], 1316 | "type": "mean" 1317 | } 1318 | ] 1319 | ], 1320 | "tags": [ 1321 | { 1322 | "key": "cpu", 1323 | "operator": "=", 1324 | "value": "cpu-total" 1325 | }, 1326 | { 1327 | "condition": "AND", 1328 | "key": "host", 1329 | "operator": "=~", 1330 | "value": "/^$host$/" 1331 | } 1332 | ] 1333 | }, 1334 | { 1335 | "$$hashKey": "object:503", 1336 | "alias": "nice", 1337 | "dsType": "influxdb", 1338 | "groupBy": [ 1339 | { 1340 | "params": [ 1341 | "$interval" 1342 | ], 1343 | "type": "time" 1344 | }, 1345 | { 1346 | "params": [ 1347 | "null" 1348 | ], 1349 | "type": "fill" 1350 | } 1351 | ], 1352 | "measurement": "cpu", 1353 | "orderByTime": "ASC", 1354 | "policy": "default", 1355 | "refId": "A", 1356 | "resultFormat": "time_series", 1357 | "select": [ 1358 | [ 1359 | { 1360 | "params": [ 1361 | "usage_nice" 1362 | ], 1363 | "type": "field" 1364 | }, 1365 | { 1366 | "params": [], 1367 | "type": "mean" 1368 | } 1369 | ] 1370 | ], 1371 | "tags": [ 1372 | { 1373 | "key": "cpu", 1374 | "operator": "=", 1375 | "value": "cpu-total" 1376 | }, 1377 | { 1378 | "condition": "AND", 1379 | "key": "host", 1380 | "operator": "=~", 1381 | "value": "/^$host$/" 1382 | } 1383 | ] 1384 | }, 1385 | { 1386 | "$$hashKey": "object:504", 1387 | "alias": "irq", 1388 | "dsType": "influxdb", 1389 | "groupBy": [ 1390 | { 1391 | "params": [ 1392 | "$interval" 1393 | ], 1394 | "type": "time" 1395 | }, 1396 | { 1397 | "params": [ 1398 | "null" 1399 | ], 1400 | "type": "fill" 1401 | } 1402 | ], 1403 | "measurement": "cpu", 1404 | "orderByTime": "ASC", 1405 | "policy": "default", 1406 | "refId": "B", 1407 | "resultFormat": "time_series", 1408 | "select": [ 1409 | [ 1410 | { 1411 | "params": [ 1412 | "usage_irq" 1413 | ], 1414 | "type": "field" 1415 | }, 1416 | { 1417 | "params": [], 1418 | "type": "mean" 1419 | } 1420 | ] 1421 | ], 1422 | "tags": [ 1423 | { 1424 | "key": "cpu", 1425 | "operator": "=", 1426 | "value": "cpu-total" 1427 | }, 1428 | { 1429 | "condition": "AND", 1430 | "key": "host", 1431 | "operator": "=~", 1432 | "value": "/^$host$/" 1433 | } 1434 | ] 1435 | }, 1436 | { 1437 | "$$hashKey": "object:505", 1438 | "alias": "softirq", 1439 | "dsType": "influxdb", 1440 | "groupBy": [ 1441 | { 1442 | "params": [ 1443 | "$interval" 1444 | ], 1445 | "type": "time" 1446 | }, 1447 | { 1448 | "params": [ 1449 | "null" 1450 | ], 1451 | "type": "fill" 1452 | } 1453 | ], 1454 | "measurement": "cpu", 1455 | "orderByTime": "ASC", 1456 | "policy": "default", 1457 | "refId": "C", 1458 | "resultFormat": "time_series", 1459 | "select": [ 1460 | [ 1461 | { 1462 | "params": [ 1463 | "usage_softirq" 1464 | ], 1465 | "type": "field" 1466 | }, 1467 | { 1468 | "params": [], 1469 | "type": "mean" 1470 | } 1471 | ] 1472 | ], 1473 | "tags": [ 1474 | { 1475 | "key": "cpu", 1476 | "operator": "=", 1477 | "value": "cpu-total" 1478 | }, 1479 | { 1480 | "condition": "AND", 1481 | "key": "host", 1482 | "operator": "=~", 1483 | "value": "/^$host$/" 1484 | } 1485 | ] 1486 | }, 1487 | { 1488 | "$$hashKey": "object:506", 1489 | "alias": "iowait", 1490 | "dsType": "influxdb", 1491 | "groupBy": [ 1492 | { 1493 | "params": [ 1494 | "$interval" 1495 | ], 1496 | "type": "time" 1497 | }, 1498 | { 1499 | "params": [ 1500 | "null" 1501 | ], 1502 | "type": "fill" 1503 | } 1504 | ], 1505 | "measurement": "cpu", 1506 | "orderByTime": "ASC", 1507 | "policy": "default", 1508 | "refId": "D", 1509 | "resultFormat": "time_series", 1510 | "select": [ 1511 | [ 1512 | { 1513 | "params": [ 1514 | "usage_iowait" 1515 | ], 1516 | "type": "field" 1517 | }, 1518 | { 1519 | "params": [], 1520 | "type": "mean" 1521 | } 1522 | ] 1523 | ], 1524 | "tags": [ 1525 | { 1526 | "key": "cpu", 1527 | "operator": "=", 1528 | "value": "cpu-total" 1529 | }, 1530 | { 1531 | "condition": "AND", 1532 | "key": "host", 1533 | "operator": "=~", 1534 | "value": "/^$host$/" 1535 | } 1536 | ] 1537 | }, 1538 | { 1539 | "$$hashKey": "object:507", 1540 | "alias": "steal", 1541 | "dsType": "influxdb", 1542 | "groupBy": [ 1543 | { 1544 | "params": [ 1545 | "$interval" 1546 | ], 1547 | "type": "time" 1548 | }, 1549 | { 1550 | "params": [ 1551 | "null" 1552 | ], 1553 | "type": "fill" 1554 | } 1555 | ], 1556 | "measurement": "cpu", 1557 | "orderByTime": "ASC", 1558 | "policy": "default", 1559 | "refId": "G", 1560 | "resultFormat": "time_series", 1561 | "select": [ 1562 | [ 1563 | { 1564 | "params": [ 1565 | "usage_steal" 1566 | ], 1567 | "type": "field" 1568 | }, 1569 | { 1570 | "params": [], 1571 | "type": "mean" 1572 | } 1573 | ] 1574 | ], 1575 | "tags": [ 1576 | { 1577 | "key": "cpu", 1578 | "operator": "=", 1579 | "value": "cpu-total" 1580 | }, 1581 | { 1582 | "condition": "AND", 1583 | "key": "host", 1584 | "operator": "=~", 1585 | "value": "/^$host$/" 1586 | } 1587 | ] 1588 | }, 1589 | { 1590 | "$$hashKey": "object:508", 1591 | "alias": "guest", 1592 | "dsType": "influxdb", 1593 | "groupBy": [ 1594 | { 1595 | "params": [ 1596 | "$interval" 1597 | ], 1598 | "type": "time" 1599 | }, 1600 | { 1601 | "params": [ 1602 | "null" 1603 | ], 1604 | "type": "fill" 1605 | } 1606 | ], 1607 | "measurement": "cpu", 1608 | "orderByTime": "ASC", 1609 | "policy": "default", 1610 | "refId": "H", 1611 | "resultFormat": "time_series", 1612 | "select": [ 1613 | [ 1614 | { 1615 | "params": [ 1616 | "usage_guest" 1617 | ], 1618 | "type": "field" 1619 | }, 1620 | { 1621 | "params": [], 1622 | "type": "mean" 1623 | } 1624 | ] 1625 | ], 1626 | "tags": [ 1627 | { 1628 | "key": "cpu", 1629 | "operator": "=", 1630 | "value": "cpu-total" 1631 | }, 1632 | { 1633 | "condition": "AND", 1634 | "key": "host", 1635 | "operator": "=~", 1636 | "value": "/^$host$/" 1637 | } 1638 | ] 1639 | }, 1640 | { 1641 | "$$hashKey": "object:509", 1642 | "alias": "user", 1643 | "dsType": "influxdb", 1644 | "groupBy": [ 1645 | { 1646 | "params": [ 1647 | "$interval" 1648 | ], 1649 | "type": "time" 1650 | }, 1651 | { 1652 | "params": [ 1653 | "null" 1654 | ], 1655 | "type": "fill" 1656 | } 1657 | ], 1658 | "measurement": "cpu", 1659 | "orderByTime": "ASC", 1660 | "policy": "default", 1661 | "refId": "I", 1662 | "resultFormat": "time_series", 1663 | "select": [ 1664 | [ 1665 | { 1666 | "params": [ 1667 | "usage_user" 1668 | ], 1669 | "type": "field" 1670 | }, 1671 | { 1672 | "params": [], 1673 | "type": "mean" 1674 | } 1675 | ] 1676 | ], 1677 | "tags": [ 1678 | { 1679 | "key": "cpu", 1680 | "operator": "=", 1681 | "value": "cpu-total" 1682 | }, 1683 | { 1684 | "condition": "AND", 1685 | "key": "host", 1686 | "operator": "=~", 1687 | "value": "/^$host$/" 1688 | } 1689 | ] 1690 | }, 1691 | { 1692 | "$$hashKey": "object:501", 1693 | "alias": "idle", 1694 | "dsType": "influxdb", 1695 | "groupBy": [ 1696 | { 1697 | "params": [ 1698 | "$interval" 1699 | ], 1700 | "type": "time" 1701 | }, 1702 | { 1703 | "params": [ 1704 | "null" 1705 | ], 1706 | "type": "fill" 1707 | } 1708 | ], 1709 | "measurement": "cpu", 1710 | "orderByTime": "ASC", 1711 | "policy": "default", 1712 | "refId": "E", 1713 | "resultFormat": "time_series", 1714 | "select": [ 1715 | [ 1716 | { 1717 | "params": [ 1718 | "usage_idle" 1719 | ], 1720 | "type": "field" 1721 | }, 1722 | { 1723 | "params": [], 1724 | "type": "mean" 1725 | } 1726 | ] 1727 | ], 1728 | "tags": [ 1729 | { 1730 | "key": "cpu", 1731 | "operator": "=", 1732 | "value": "cpu-total" 1733 | }, 1734 | { 1735 | "condition": "AND", 1736 | "key": "host", 1737 | "operator": "=~", 1738 | "value": "/^$host$/" 1739 | } 1740 | ] 1741 | } 1742 | ], 1743 | "thresholds": [], 1744 | "timeFrom": null, 1745 | "timeShift": null, 1746 | "title": "CPU usage", 1747 | "tooltip": { 1748 | "msResolution": false, 1749 | "shared": true, 1750 | "sort": 0, 1751 | "value_type": "individual" 1752 | }, 1753 | "type": "graph", 1754 | "xaxis": { 1755 | "buckets": null, 1756 | "mode": "time", 1757 | "name": null, 1758 | "show": true, 1759 | "values": [] 1760 | }, 1761 | "yaxes": [ 1762 | { 1763 | "$$hashKey": "object:2440", 1764 | "format": "short", 1765 | "label": "", 1766 | "logBase": 1, 1767 | "max": "100", 1768 | "min": "0", 1769 | "show": true 1770 | }, 1771 | { 1772 | "$$hashKey": "object:2441", 1773 | "format": "short", 1774 | "label": null, 1775 | "logBase": 1, 1776 | "max": null, 1777 | "min": null, 1778 | "show": true 1779 | } 1780 | ], 1781 | "yaxis": { 1782 | "align": false, 1783 | "alignLevel": null 1784 | } 1785 | }, 1786 | { 1787 | "aliasColors": {}, 1788 | "bars": false, 1789 | "dashLength": 10, 1790 | "dashes": false, 1791 | "datasource": "telegraf_ds", 1792 | "editable": true, 1793 | "error": false, 1794 | "fill": 6, 1795 | "gridPos": { 1796 | "h": 7, 1797 | "w": 12, 1798 | "x": 0, 1799 | "y": 13 1800 | }, 1801 | "id": 9, 1802 | "legend": { 1803 | "alignAsTable": false, 1804 | "avg": false, 1805 | "current": false, 1806 | "max": false, 1807 | "min": false, 1808 | "rightSide": false, 1809 | "show": true, 1810 | "total": false, 1811 | "values": false 1812 | }, 1813 | "lines": true, 1814 | "linewidth": 2, 1815 | "links": [], 1816 | "nullPointMode": "connected", 1817 | "percentage": false, 1818 | "pointradius": 5, 1819 | "points": false, 1820 | "renderer": "flot", 1821 | "seriesOverrides": [], 1822 | "spaceLength": 10, 1823 | "stack": true, 1824 | "steppedLine": false, 1825 | "targets": [ 1826 | { 1827 | "$$hashKey": "object:229", 1828 | "alias": "Used", 1829 | "dsType": "influxdb", 1830 | "expr": "", 1831 | "groupBy": [ 1832 | { 1833 | "params": [ 1834 | "$interval" 1835 | ], 1836 | "type": "time" 1837 | }, 1838 | { 1839 | "params": [ 1840 | "null" 1841 | ], 1842 | "type": "fill" 1843 | } 1844 | ], 1845 | "intervalFactor": 2, 1846 | "measurement": "mem", 1847 | "orderByTime": "ASC", 1848 | "policy": "default", 1849 | "refId": "A", 1850 | "resultFormat": "time_series", 1851 | "select": [ 1852 | [ 1853 | { 1854 | "params": [ 1855 | "used" 1856 | ], 1857 | "type": "field" 1858 | }, 1859 | { 1860 | "params": [], 1861 | "type": "mean" 1862 | } 1863 | ] 1864 | ], 1865 | "tags": [ 1866 | { 1867 | "key": "host", 1868 | "operator": "=~", 1869 | "value": "/^$host$/" 1870 | } 1871 | ] 1872 | }, 1873 | { 1874 | "$$hashKey": "object:230", 1875 | "alias": "Free", 1876 | "dsType": "influxdb", 1877 | "expr": "", 1878 | "groupBy": [ 1879 | { 1880 | "params": [ 1881 | "$interval" 1882 | ], 1883 | "type": "time" 1884 | }, 1885 | { 1886 | "params": [ 1887 | "null" 1888 | ], 1889 | "type": "fill" 1890 | } 1891 | ], 1892 | "intervalFactor": 2, 1893 | "measurement": "mem", 1894 | "orderByTime": "ASC", 1895 | "policy": "default", 1896 | "refId": "B", 1897 | "resultFormat": "time_series", 1898 | "select": [ 1899 | [ 1900 | { 1901 | "params": [ 1902 | "free" 1903 | ], 1904 | "type": "field" 1905 | }, 1906 | { 1907 | "params": [], 1908 | "type": "mean" 1909 | } 1910 | ] 1911 | ], 1912 | "tags": [ 1913 | { 1914 | "key": "host", 1915 | "operator": "=~", 1916 | "value": "/^$host$/" 1917 | } 1918 | ] 1919 | }, 1920 | { 1921 | "$$hashKey": "object:231", 1922 | "alias": "Cached", 1923 | "dsType": "influxdb", 1924 | "expr": "", 1925 | "groupBy": [ 1926 | { 1927 | "params": [ 1928 | "$interval" 1929 | ], 1930 | "type": "time" 1931 | }, 1932 | { 1933 | "params": [ 1934 | "null" 1935 | ], 1936 | "type": "fill" 1937 | } 1938 | ], 1939 | "intervalFactor": 2, 1940 | "measurement": "mem", 1941 | "orderByTime": "ASC", 1942 | "policy": "default", 1943 | "refId": "C", 1944 | "resultFormat": "time_series", 1945 | "select": [ 1946 | [ 1947 | { 1948 | "params": [ 1949 | "cached" 1950 | ], 1951 | "type": "field" 1952 | }, 1953 | { 1954 | "params": [], 1955 | "type": "mean" 1956 | } 1957 | ] 1958 | ], 1959 | "tags": [ 1960 | { 1961 | "key": "host", 1962 | "operator": "=~", 1963 | "value": "/^$host$/" 1964 | } 1965 | ] 1966 | }, 1967 | { 1968 | "$$hashKey": "object:232", 1969 | "alias": "Buffers", 1970 | "dsType": "influxdb", 1971 | "expr": "", 1972 | "groupBy": [ 1973 | { 1974 | "params": [ 1975 | "$interval" 1976 | ], 1977 | "type": "time" 1978 | }, 1979 | { 1980 | "params": [ 1981 | "null" 1982 | ], 1983 | "type": "fill" 1984 | } 1985 | ], 1986 | "intervalFactor": 2, 1987 | "measurement": "mem", 1988 | "orderByTime": "ASC", 1989 | "policy": "default", 1990 | "refId": "D", 1991 | "resultFormat": "time_series", 1992 | "select": [ 1993 | [ 1994 | { 1995 | "params": [ 1996 | "buffered" 1997 | ], 1998 | "type": "field" 1999 | }, 2000 | { 2001 | "params": [], 2002 | "type": "mean" 2003 | } 2004 | ] 2005 | ], 2006 | "tags": [ 2007 | { 2008 | "key": "host", 2009 | "operator": "=~", 2010 | "value": "/^$host$/" 2011 | } 2012 | ] 2013 | } 2014 | ], 2015 | "thresholds": [], 2016 | "timeFrom": null, 2017 | "timeShift": null, 2018 | "title": "Memory Distribution", 2019 | "tooltip": { 2020 | "msResolution": false, 2021 | "shared": true, 2022 | "sort": 0, 2023 | "value_type": "individual" 2024 | }, 2025 | "type": "graph", 2026 | "xaxis": { 2027 | "buckets": null, 2028 | "mode": "time", 2029 | "name": null, 2030 | "show": true, 2031 | "values": [] 2032 | }, 2033 | "yaxes": [ 2034 | { 2035 | "$$hashKey": "object:263", 2036 | "format": "bytes", 2037 | "label": "", 2038 | "logBase": 1, 2039 | "max": null, 2040 | "min": "0", 2041 | "show": true 2042 | }, 2043 | { 2044 | "$$hashKey": "object:264", 2045 | "format": "short", 2046 | "label": null, 2047 | "logBase": 1, 2048 | "max": null, 2049 | "min": "0", 2050 | "show": true 2051 | } 2052 | ], 2053 | "yaxis": { 2054 | "align": false, 2055 | "alignLevel": null 2056 | } 2057 | }, 2058 | { 2059 | "aliasColors": { 2060 | "Load 15m": "#890F02", 2061 | "Load 1m": "#F2C96D", 2062 | "Load 5m": "#EF843C" 2063 | }, 2064 | "bars": false, 2065 | "dashLength": 10, 2066 | "dashes": false, 2067 | "datasource": "telegraf_ds", 2068 | "editable": true, 2069 | "error": false, 2070 | "fill": 1, 2071 | "gridPos": { 2072 | "h": 7, 2073 | "w": 12, 2074 | "x": 12, 2075 | "y": 13 2076 | }, 2077 | "id": 4, 2078 | "legend": { 2079 | "alignAsTable": true, 2080 | "avg": true, 2081 | "current": false, 2082 | "max": true, 2083 | "min": true, 2084 | "rightSide": true, 2085 | "show": true, 2086 | "sort": "min", 2087 | "sortDesc": false, 2088 | "total": false, 2089 | "values": true 2090 | }, 2091 | "lines": true, 2092 | "linewidth": 1, 2093 | "links": [], 2094 | "nullPointMode": "connected", 2095 | "percentage": false, 2096 | "pointradius": 5, 2097 | "points": false, 2098 | "renderer": "flot", 2099 | "seriesOverrides": [ 2100 | { 2101 | "alias": "Return code", 2102 | "yaxis": 2 2103 | } 2104 | ], 2105 | "spaceLength": 10, 2106 | "stack": false, 2107 | "steppedLine": false, 2108 | "targets": [ 2109 | { 2110 | "$$hashKey": "object:3128", 2111 | "alias": "Load 1m", 2112 | "dsType": "influxdb", 2113 | "groupBy": [ 2114 | { 2115 | "params": [ 2116 | "$interval" 2117 | ], 2118 | "type": "time" 2119 | }, 2120 | { 2121 | "params": [ 2122 | "null" 2123 | ], 2124 | "type": "fill" 2125 | } 2126 | ], 2127 | "measurement": "system", 2128 | "orderByTime": "ASC", 2129 | "policy": "default", 2130 | "refId": "A", 2131 | "resultFormat": "time_series", 2132 | "select": [ 2133 | [ 2134 | { 2135 | "params": [ 2136 | "load1" 2137 | ], 2138 | "type": "field" 2139 | }, 2140 | { 2141 | "params": [], 2142 | "type": "mean" 2143 | } 2144 | ] 2145 | ], 2146 | "tags": [ 2147 | { 2148 | "key": "host", 2149 | "operator": "=~", 2150 | "value": "/^$host$/" 2151 | } 2152 | ] 2153 | }, 2154 | { 2155 | "$$hashKey": "object:3129", 2156 | "alias": "Load 5m", 2157 | "dsType": "influxdb", 2158 | "groupBy": [ 2159 | { 2160 | "params": [ 2161 | "$interval" 2162 | ], 2163 | "type": "time" 2164 | }, 2165 | { 2166 | "params": [ 2167 | "null" 2168 | ], 2169 | "type": "fill" 2170 | } 2171 | ], 2172 | "measurement": "system", 2173 | "orderByTime": "ASC", 2174 | "policy": "default", 2175 | "refId": "B", 2176 | "resultFormat": "time_series", 2177 | "select": [ 2178 | [ 2179 | { 2180 | "params": [ 2181 | "load5" 2182 | ], 2183 | "type": "field" 2184 | }, 2185 | { 2186 | "params": [], 2187 | "type": "mean" 2188 | } 2189 | ] 2190 | ], 2191 | "tags": [ 2192 | { 2193 | "key": "host", 2194 | "operator": "=~", 2195 | "value": "/^$host$/" 2196 | } 2197 | ] 2198 | }, 2199 | { 2200 | "$$hashKey": "object:3130", 2201 | "alias": "Load 15m", 2202 | "dsType": "influxdb", 2203 | "groupBy": [ 2204 | { 2205 | "params": [ 2206 | "$interval" 2207 | ], 2208 | "type": "time" 2209 | }, 2210 | { 2211 | "params": [ 2212 | "null" 2213 | ], 2214 | "type": "fill" 2215 | } 2216 | ], 2217 | "measurement": "system", 2218 | "orderByTime": "ASC", 2219 | "policy": "default", 2220 | "refId": "C", 2221 | "resultFormat": "time_series", 2222 | "select": [ 2223 | [ 2224 | { 2225 | "params": [ 2226 | "load15" 2227 | ], 2228 | "type": "field" 2229 | }, 2230 | { 2231 | "params": [], 2232 | "type": "mean" 2233 | } 2234 | ] 2235 | ], 2236 | "tags": [ 2237 | { 2238 | "key": "host", 2239 | "operator": "=~", 2240 | "value": "/^$host$/" 2241 | } 2242 | ] 2243 | } 2244 | ], 2245 | "thresholds": [], 2246 | "timeFrom": null, 2247 | "timeShift": null, 2248 | "title": "Load average", 2249 | "tooltip": { 2250 | "msResolution": false, 2251 | "shared": true, 2252 | "sort": 0, 2253 | "value_type": "individual" 2254 | }, 2255 | "type": "graph", 2256 | "xaxis": { 2257 | "buckets": null, 2258 | "mode": "time", 2259 | "name": null, 2260 | "show": true, 2261 | "values": [] 2262 | }, 2263 | "yaxes": [ 2264 | { 2265 | "$$hashKey": "object:3260", 2266 | "format": "percent", 2267 | "label": null, 2268 | "logBase": 1, 2269 | "max": null, 2270 | "min": null, 2271 | "show": true 2272 | }, 2273 | { 2274 | "$$hashKey": "object:3261", 2275 | "format": "short", 2276 | "label": null, 2277 | "logBase": 1, 2278 | "max": null, 2279 | "min": null, 2280 | "show": true 2281 | } 2282 | ], 2283 | "yaxis": { 2284 | "align": false, 2285 | "alignLevel": null 2286 | } 2287 | }, 2288 | { 2289 | "aliasColors": {}, 2290 | "bars": false, 2291 | "dashLength": 10, 2292 | "dashes": false, 2293 | "datasource": "telegraf_ds", 2294 | "editable": true, 2295 | "error": false, 2296 | "fill": 2, 2297 | "gridPos": { 2298 | "h": 7, 2299 | "w": 12, 2300 | "x": 0, 2301 | "y": 20 2302 | }, 2303 | "id": 11, 2304 | "legend": { 2305 | "avg": false, 2306 | "current": false, 2307 | "max": false, 2308 | "min": false, 2309 | "show": true, 2310 | "total": false, 2311 | "values": false 2312 | }, 2313 | "lines": true, 2314 | "linewidth": 2, 2315 | "links": [], 2316 | "nullPointMode": "connected", 2317 | "percentage": false, 2318 | "pointradius": 5, 2319 | "points": false, 2320 | "renderer": "flot", 2321 | "seriesOverrides": [ 2322 | { 2323 | "$$hashKey": "object:1491", 2324 | "alias": "Write bytes", 2325 | "transform": "negative-Y" 2326 | } 2327 | ], 2328 | "spaceLength": 10, 2329 | "stack": false, 2330 | "steppedLine": false, 2331 | "targets": [ 2332 | { 2333 | "$$hashKey": "object:249", 2334 | "alias": "Read bytes", 2335 | "dsType": "influxdb", 2336 | "expr": "", 2337 | "groupBy": [ 2338 | { 2339 | "params": [ 2340 | "$interval" 2341 | ], 2342 | "type": "time" 2343 | }, 2344 | { 2345 | "params": [ 2346 | "null" 2347 | ], 2348 | "type": "fill" 2349 | } 2350 | ], 2351 | "hide": false, 2352 | "intervalFactor": 2, 2353 | "measurement": "diskio", 2354 | "orderByTime": "ASC", 2355 | "policy": "default", 2356 | "query": "SELECT derivative(mean(\"read_bytes\"), 5m) FROM \"diskio\" WHERE \"host\" =~ /^$host$/ AND $timeFilter GROUP BY time($interval) fill(null)", 2357 | "rawQuery": false, 2358 | "refId": "A", 2359 | "resultFormat": "time_series", 2360 | "select": [ 2361 | [ 2362 | { 2363 | "params": [ 2364 | "read_bytes" 2365 | ], 2366 | "type": "field" 2367 | }, 2368 | { 2369 | "params": [], 2370 | "type": "mean" 2371 | }, 2372 | { 2373 | "params": [ 2374 | "10s" 2375 | ], 2376 | "type": "derivative" 2377 | }, 2378 | { 2379 | "params": [ 2380 | " / 10" 2381 | ], 2382 | "type": "math" 2383 | } 2384 | ] 2385 | ], 2386 | "tags": [ 2387 | { 2388 | "key": "host", 2389 | "operator": "=~", 2390 | "value": "/^$host$/" 2391 | } 2392 | ] 2393 | }, 2394 | { 2395 | "$$hashKey": "object:250", 2396 | "alias": "Write bytes", 2397 | "dsType": "influxdb", 2398 | "expr": "", 2399 | "groupBy": [ 2400 | { 2401 | "params": [ 2402 | "$interval" 2403 | ], 2404 | "type": "time" 2405 | }, 2406 | { 2407 | "params": [ 2408 | "null" 2409 | ], 2410 | "type": "fill" 2411 | } 2412 | ], 2413 | "intervalFactor": 2, 2414 | "measurement": "diskio", 2415 | "orderByTime": "ASC", 2416 | "policy": "default", 2417 | "refId": "B", 2418 | "resultFormat": "time_series", 2419 | "select": [ 2420 | [ 2421 | { 2422 | "params": [ 2423 | "write_bytes" 2424 | ], 2425 | "type": "field" 2426 | }, 2427 | { 2428 | "params": [], 2429 | "type": "mean" 2430 | }, 2431 | { 2432 | "params": [ 2433 | "10s" 2434 | ], 2435 | "type": "derivative" 2436 | }, 2437 | { 2438 | "params": [ 2439 | " / 10" 2440 | ], 2441 | "type": "math" 2442 | } 2443 | ] 2444 | ], 2445 | "tags": [ 2446 | { 2447 | "key": "host", 2448 | "operator": "=~", 2449 | "value": "/^$host$/" 2450 | } 2451 | ] 2452 | } 2453 | ], 2454 | "thresholds": [], 2455 | "timeFrom": null, 2456 | "timeShift": null, 2457 | "title": "I/O Activity", 2458 | "tooltip": { 2459 | "msResolution": false, 2460 | "shared": true, 2461 | "sort": 0, 2462 | "value_type": "individual" 2463 | }, 2464 | "type": "graph", 2465 | "xaxis": { 2466 | "buckets": null, 2467 | "mode": "time", 2468 | "name": null, 2469 | "show": true, 2470 | "values": [] 2471 | }, 2472 | "yaxes": [ 2473 | { 2474 | "$$hashKey": "object:595", 2475 | "format": "Bps", 2476 | "label": null, 2477 | "logBase": 1, 2478 | "max": null, 2479 | "min": null, 2480 | "show": true 2481 | }, 2482 | { 2483 | "$$hashKey": "object:596", 2484 | "format": "short", 2485 | "label": null, 2486 | "logBase": 1, 2487 | "max": null, 2488 | "min": null, 2489 | "show": true 2490 | } 2491 | ], 2492 | "yaxis": { 2493 | "align": false, 2494 | "alignLevel": null 2495 | } 2496 | }, 2497 | { 2498 | "aliasColors": {}, 2499 | "bars": false, 2500 | "dashLength": 10, 2501 | "dashes": false, 2502 | "datasource": "telegraf_ds", 2503 | "editable": true, 2504 | "error": false, 2505 | "fill": 1, 2506 | "gridPos": { 2507 | "h": 7, 2508 | "w": 12, 2509 | "x": 12, 2510 | "y": 20 2511 | }, 2512 | "id": 12, 2513 | "legend": { 2514 | "alignAsTable": true, 2515 | "avg": true, 2516 | "current": false, 2517 | "max": true, 2518 | "min": true, 2519 | "rightSide": true, 2520 | "show": true, 2521 | "total": false, 2522 | "values": true 2523 | }, 2524 | "lines": true, 2525 | "linewidth": 1, 2526 | "links": [], 2527 | "nullPointMode": "connected", 2528 | "percentage": false, 2529 | "pointradius": 5, 2530 | "points": false, 2531 | "renderer": "flot", 2532 | "seriesOverrides": [ 2533 | { 2534 | "$$hashKey": "object:1419", 2535 | "alias": "Bytes OUT", 2536 | "transform": "negative-Y" 2537 | } 2538 | ], 2539 | "spaceLength": 10, 2540 | "stack": false, 2541 | "steppedLine": false, 2542 | "targets": [ 2543 | { 2544 | "$$hashKey": "object:318", 2545 | "alias": "Bytes IN", 2546 | "dsType": "influxdb", 2547 | "expr": "", 2548 | "groupBy": [ 2549 | { 2550 | "params": [ 2551 | "$interval" 2552 | ], 2553 | "type": "time" 2554 | }, 2555 | { 2556 | "params": [ 2557 | "null" 2558 | ], 2559 | "type": "fill" 2560 | } 2561 | ], 2562 | "intervalFactor": 2, 2563 | "measurement": "net", 2564 | "orderByTime": "ASC", 2565 | "policy": "default", 2566 | "refId": "A", 2567 | "resultFormat": "time_series", 2568 | "select": [ 2569 | [ 2570 | { 2571 | "params": [ 2572 | "bytes_recv" 2573 | ], 2574 | "type": "field" 2575 | }, 2576 | { 2577 | "params": [], 2578 | "type": "mean" 2579 | }, 2580 | { 2581 | "params": [ 2582 | "10s" 2583 | ], 2584 | "type": "derivative" 2585 | }, 2586 | { 2587 | "params": [ 2588 | " / 10" 2589 | ], 2590 | "type": "math" 2591 | } 2592 | ] 2593 | ], 2594 | "tags": [ 2595 | { 2596 | "key": "host", 2597 | "operator": "=~", 2598 | "value": "/^$host$/" 2599 | }, 2600 | { 2601 | "condition": "AND", 2602 | "key": "interface", 2603 | "operator": "=", 2604 | "value": "wlan0" 2605 | } 2606 | ] 2607 | }, 2608 | { 2609 | "$$hashKey": "object:319", 2610 | "alias": "Bytes OUT", 2611 | "dsType": "influxdb", 2612 | "expr": "", 2613 | "groupBy": [ 2614 | { 2615 | "params": [ 2616 | "$interval" 2617 | ], 2618 | "type": "time" 2619 | }, 2620 | { 2621 | "params": [ 2622 | "null" 2623 | ], 2624 | "type": "fill" 2625 | } 2626 | ], 2627 | "intervalFactor": 2, 2628 | "measurement": "net", 2629 | "orderByTime": "ASC", 2630 | "policy": "default", 2631 | "refId": "B", 2632 | "resultFormat": "time_series", 2633 | "select": [ 2634 | [ 2635 | { 2636 | "params": [ 2637 | "bytes_sent" 2638 | ], 2639 | "type": "field" 2640 | }, 2641 | { 2642 | "params": [], 2643 | "type": "mean" 2644 | }, 2645 | { 2646 | "params": [ 2647 | "10s" 2648 | ], 2649 | "type": "derivative" 2650 | }, 2651 | { 2652 | "params": [ 2653 | " / 10" 2654 | ], 2655 | "type": "math" 2656 | } 2657 | ] 2658 | ], 2659 | "tags": [ 2660 | { 2661 | "key": "host", 2662 | "operator": "=~", 2663 | "value": "/^$host$/" 2664 | }, 2665 | { 2666 | "condition": "AND", 2667 | "key": "interface", 2668 | "operator": "=", 2669 | "value": "wlan0" 2670 | } 2671 | ] 2672 | } 2673 | ], 2674 | "thresholds": [], 2675 | "timeFrom": null, 2676 | "timeShift": null, 2677 | "title": "wlan0 Traffic", 2678 | "tooltip": { 2679 | "msResolution": false, 2680 | "shared": true, 2681 | "sort": 0, 2682 | "value_type": "individual" 2683 | }, 2684 | "type": "graph", 2685 | "xaxis": { 2686 | "buckets": null, 2687 | "mode": "time", 2688 | "name": null, 2689 | "show": true, 2690 | "values": [] 2691 | }, 2692 | "yaxes": [ 2693 | { 2694 | "format": "Bps", 2695 | "label": null, 2696 | "logBase": 1, 2697 | "max": null, 2698 | "min": null, 2699 | "show": true 2700 | }, 2701 | { 2702 | "format": "short", 2703 | "label": null, 2704 | "logBase": 1, 2705 | "max": null, 2706 | "min": null, 2707 | "show": true 2708 | } 2709 | ], 2710 | "yaxis": { 2711 | "align": false, 2712 | "alignLevel": null 2713 | } 2714 | }, 2715 | { 2716 | "aliasColors": {}, 2717 | "bars": false, 2718 | "dashLength": 10, 2719 | "dashes": false, 2720 | "datasource": "telegraf_ds", 2721 | "fill": 1, 2722 | "gridPos": { 2723 | "h": 6, 2724 | "w": 12, 2725 | "x": 0, 2726 | "y": 27 2727 | }, 2728 | "id": 15, 2729 | "legend": { 2730 | "avg": false, 2731 | "current": true, 2732 | "max": true, 2733 | "min": false, 2734 | "rightSide": false, 2735 | "show": true, 2736 | "total": false, 2737 | "values": true 2738 | }, 2739 | "lines": true, 2740 | "linewidth": 1, 2741 | "links": [], 2742 | "nullPointMode": "connected", 2743 | "percentage": false, 2744 | "pointradius": 5, 2745 | "points": false, 2746 | "renderer": "flot", 2747 | "seriesOverrides": [], 2748 | "spaceLength": 10, 2749 | "stack": true, 2750 | "steppedLine": false, 2751 | "targets": [ 2752 | { 2753 | "$$hashKey": "object:416", 2754 | "alias": "used", 2755 | "groupBy": [ 2756 | { 2757 | "params": [ 2758 | "$__interval" 2759 | ], 2760 | "type": "time" 2761 | }, 2762 | { 2763 | "params": [ 2764 | "null" 2765 | ], 2766 | "type": "fill" 2767 | } 2768 | ], 2769 | "hide": false, 2770 | "measurement": "disk", 2771 | "orderByTime": "ASC", 2772 | "policy": "default", 2773 | "refId": "A", 2774 | "resultFormat": "time_series", 2775 | "select": [ 2776 | [ 2777 | { 2778 | "params": [ 2779 | "used" 2780 | ], 2781 | "type": "field" 2782 | }, 2783 | { 2784 | "params": [], 2785 | "type": "mean" 2786 | } 2787 | ] 2788 | ], 2789 | "tags": [ 2790 | { 2791 | "key": "path", 2792 | "operator": "=", 2793 | "value": "/" 2794 | }, 2795 | { 2796 | "condition": "AND", 2797 | "key": "host", 2798 | "operator": "=~", 2799 | "value": "/^$host$/" 2800 | } 2801 | ] 2802 | }, 2803 | { 2804 | "$$hashKey": "object:465", 2805 | "alias": "free", 2806 | "groupBy": [ 2807 | { 2808 | "params": [ 2809 | "$__interval" 2810 | ], 2811 | "type": "time" 2812 | }, 2813 | { 2814 | "params": [ 2815 | "null" 2816 | ], 2817 | "type": "fill" 2818 | } 2819 | ], 2820 | "measurement": "disk", 2821 | "orderByTime": "ASC", 2822 | "policy": "default", 2823 | "refId": "B", 2824 | "resultFormat": "time_series", 2825 | "select": [ 2826 | [ 2827 | { 2828 | "params": [ 2829 | "free" 2830 | ], 2831 | "type": "field" 2832 | }, 2833 | { 2834 | "params": [], 2835 | "type": "mean" 2836 | } 2837 | ] 2838 | ], 2839 | "tags": [ 2840 | { 2841 | "key": "path", 2842 | "operator": "=", 2843 | "value": "/" 2844 | }, 2845 | { 2846 | "condition": "AND", 2847 | "key": "host", 2848 | "operator": "=~", 2849 | "value": "/^$host$/" 2850 | } 2851 | ] 2852 | } 2853 | ], 2854 | "thresholds": [], 2855 | "timeFrom": null, 2856 | "timeShift": null, 2857 | "title": "Disk (SD card)", 2858 | "tooltip": { 2859 | "shared": true, 2860 | "sort": 0, 2861 | "value_type": "individual" 2862 | }, 2863 | "type": "graph", 2864 | "xaxis": { 2865 | "buckets": null, 2866 | "mode": "time", 2867 | "name": null, 2868 | "show": true, 2869 | "values": [] 2870 | }, 2871 | "yaxes": [ 2872 | { 2873 | "$$hashKey": "object:522", 2874 | "format": "bytes", 2875 | "label": null, 2876 | "logBase": 1, 2877 | "max": null, 2878 | "min": "0", 2879 | "show": true 2880 | }, 2881 | { 2882 | "$$hashKey": "object:523", 2883 | "format": "bytes", 2884 | "label": null, 2885 | "logBase": 1, 2886 | "max": null, 2887 | "min": "0", 2888 | "show": true 2889 | } 2890 | ], 2891 | "yaxis": { 2892 | "align": false, 2893 | "alignLevel": null 2894 | } 2895 | }, 2896 | { 2897 | "aliasColors": {}, 2898 | "bars": true, 2899 | "dashLength": 10, 2900 | "dashes": false, 2901 | "datasource": "telegraf_ds", 2902 | "editable": true, 2903 | "error": false, 2904 | "fill": 1, 2905 | "gridPos": { 2906 | "h": 6, 2907 | "w": 12, 2908 | "x": 12, 2909 | "y": 27 2910 | }, 2911 | "id": 10, 2912 | "legend": { 2913 | "avg": false, 2914 | "current": false, 2915 | "max": false, 2916 | "min": false, 2917 | "show": true, 2918 | "total": false, 2919 | "values": false 2920 | }, 2921 | "lines": false, 2922 | "linewidth": 1, 2923 | "links": [], 2924 | "nullPointMode": "connected", 2925 | "percentage": false, 2926 | "pointradius": 5, 2927 | "points": false, 2928 | "renderer": "flot", 2929 | "seriesOverrides": [ 2930 | { 2931 | "alias": "Sleeping", 2932 | "yaxis": 2 2933 | } 2934 | ], 2935 | "spaceLength": 10, 2936 | "stack": true, 2937 | "steppedLine": false, 2938 | "targets": [ 2939 | { 2940 | "$$hashKey": "object:261", 2941 | "alias": "Running", 2942 | "dsType": "influxdb", 2943 | "expr": "", 2944 | "groupBy": [ 2945 | { 2946 | "params": [ 2947 | "$interval" 2948 | ], 2949 | "type": "time" 2950 | }, 2951 | { 2952 | "params": [ 2953 | "null" 2954 | ], 2955 | "type": "fill" 2956 | } 2957 | ], 2958 | "intervalFactor": 2, 2959 | "measurement": "processes", 2960 | "orderByTime": "ASC", 2961 | "policy": "default", 2962 | "refId": "A", 2963 | "resultFormat": "time_series", 2964 | "select": [ 2965 | [ 2966 | { 2967 | "params": [ 2968 | "running" 2969 | ], 2970 | "type": "field" 2971 | }, 2972 | { 2973 | "params": [], 2974 | "type": "mean" 2975 | } 2976 | ] 2977 | ], 2978 | "tags": [ 2979 | { 2980 | "key": "host", 2981 | "operator": "=~", 2982 | "value": "/^$host$/" 2983 | } 2984 | ] 2985 | }, 2986 | { 2987 | "$$hashKey": "object:262", 2988 | "alias": "Stopped", 2989 | "dsType": "influxdb", 2990 | "expr": "", 2991 | "groupBy": [ 2992 | { 2993 | "params": [ 2994 | "$interval" 2995 | ], 2996 | "type": "time" 2997 | }, 2998 | { 2999 | "params": [ 3000 | "null" 3001 | ], 3002 | "type": "fill" 3003 | } 3004 | ], 3005 | "intervalFactor": 2, 3006 | "measurement": "processes", 3007 | "orderByTime": "ASC", 3008 | "policy": "default", 3009 | "refId": "C", 3010 | "resultFormat": "time_series", 3011 | "select": [ 3012 | [ 3013 | { 3014 | "params": [ 3015 | "stopped" 3016 | ], 3017 | "type": "field" 3018 | }, 3019 | { 3020 | "params": [], 3021 | "type": "mean" 3022 | } 3023 | ] 3024 | ], 3025 | "tags": [ 3026 | { 3027 | "key": "host", 3028 | "operator": "=~", 3029 | "value": "/^$host$/" 3030 | } 3031 | ] 3032 | }, 3033 | { 3034 | "$$hashKey": "object:263", 3035 | "alias": "Blocked", 3036 | "dsType": "influxdb", 3037 | "expr": "", 3038 | "groupBy": [ 3039 | { 3040 | "params": [ 3041 | "$interval" 3042 | ], 3043 | "type": "time" 3044 | }, 3045 | { 3046 | "params": [ 3047 | "null" 3048 | ], 3049 | "type": "fill" 3050 | } 3051 | ], 3052 | "intervalFactor": 2, 3053 | "measurement": "processes", 3054 | "orderByTime": "ASC", 3055 | "policy": "default", 3056 | "refId": "D", 3057 | "resultFormat": "time_series", 3058 | "select": [ 3059 | [ 3060 | { 3061 | "params": [ 3062 | "blocked" 3063 | ], 3064 | "type": "field" 3065 | }, 3066 | { 3067 | "params": [], 3068 | "type": "mean" 3069 | } 3070 | ] 3071 | ], 3072 | "tags": [ 3073 | { 3074 | "key": "host", 3075 | "operator": "=~", 3076 | "value": "/^$host$/" 3077 | } 3078 | ] 3079 | }, 3080 | { 3081 | "$$hashKey": "object:264", 3082 | "alias": "Paging", 3083 | "dsType": "influxdb", 3084 | "expr": "", 3085 | "groupBy": [ 3086 | { 3087 | "params": [ 3088 | "$interval" 3089 | ], 3090 | "type": "time" 3091 | }, 3092 | { 3093 | "params": [ 3094 | "null" 3095 | ], 3096 | "type": "fill" 3097 | } 3098 | ], 3099 | "intervalFactor": 2, 3100 | "measurement": "processes", 3101 | "orderByTime": "ASC", 3102 | "policy": "default", 3103 | "refId": "E", 3104 | "resultFormat": "time_series", 3105 | "select": [ 3106 | [ 3107 | { 3108 | "params": [ 3109 | "paging" 3110 | ], 3111 | "type": "field" 3112 | }, 3113 | { 3114 | "params": [], 3115 | "type": "mean" 3116 | } 3117 | ] 3118 | ], 3119 | "tags": [ 3120 | { 3121 | "key": "host", 3122 | "operator": "=~", 3123 | "value": "/^$host$/" 3124 | } 3125 | ] 3126 | }, 3127 | { 3128 | "$$hashKey": "object:265", 3129 | "alias": "Sleeping", 3130 | "dsType": "influxdb", 3131 | "expr": "", 3132 | "groupBy": [ 3133 | { 3134 | "params": [ 3135 | "$interval" 3136 | ], 3137 | "type": "time" 3138 | }, 3139 | { 3140 | "params": [ 3141 | "null" 3142 | ], 3143 | "type": "fill" 3144 | } 3145 | ], 3146 | "intervalFactor": 2, 3147 | "measurement": "processes", 3148 | "orderByTime": "ASC", 3149 | "policy": "default", 3150 | "refId": "B", 3151 | "resultFormat": "time_series", 3152 | "select": [ 3153 | [ 3154 | { 3155 | "params": [ 3156 | "sleeping" 3157 | ], 3158 | "type": "field" 3159 | }, 3160 | { 3161 | "params": [], 3162 | "type": "mean" 3163 | } 3164 | ] 3165 | ], 3166 | "tags": [ 3167 | { 3168 | "key": "host", 3169 | "operator": "=~", 3170 | "value": "/^$host$/" 3171 | } 3172 | ] 3173 | } 3174 | ], 3175 | "thresholds": [], 3176 | "timeFrom": null, 3177 | "timeShift": null, 3178 | "title": "Processes distribution", 3179 | "tooltip": { 3180 | "msResolution": false, 3181 | "shared": true, 3182 | "sort": 0, 3183 | "value_type": "individual" 3184 | }, 3185 | "type": "graph", 3186 | "xaxis": { 3187 | "buckets": null, 3188 | "mode": "time", 3189 | "name": null, 3190 | "show": true, 3191 | "values": [] 3192 | }, 3193 | "yaxes": [ 3194 | { 3195 | "format": "short", 3196 | "label": null, 3197 | "logBase": 1, 3198 | "max": null, 3199 | "min": null, 3200 | "show": true 3201 | }, 3202 | { 3203 | "format": "short", 3204 | "label": null, 3205 | "logBase": 1, 3206 | "max": null, 3207 | "min": null, 3208 | "show": true 3209 | } 3210 | ], 3211 | "yaxis": { 3212 | "align": false, 3213 | "alignLevel": null 3214 | } 3215 | } 3216 | ], 3217 | "refresh": "30s", 3218 | "schemaVersion": 16, 3219 | "style": "dark", 3220 | "tags": [ 3221 | "influxdb", 3222 | "telegraf", 3223 | "system" 3224 | ], 3225 | "templating": { 3226 | "list": [ 3227 | { 3228 | "allValue": null, 3229 | "current": { 3230 | "text": "997563c", 3231 | "value": "997563c" 3232 | }, 3233 | "datasource": "telegraf_ds", 3234 | "hide": 0, 3235 | "includeAll": false, 3236 | "label": null, 3237 | "multi": false, 3238 | "name": "host", 3239 | "options": [], 3240 | "query": "SHOW TAG VALUES WITH KEY = \"host\"", 3241 | "refresh": 1, 3242 | "regex": "", 3243 | "sort": 0, 3244 | "tagValuesQuery": null, 3245 | "tags": [], 3246 | "tagsQuery": null, 3247 | "type": "query", 3248 | "useTags": false 3249 | } 3250 | ] 3251 | }, 3252 | "time": { 3253 | "from": "now-1h", 3254 | "to": "now" 3255 | }, 3256 | "timepicker": { 3257 | "refresh_intervals": [ 3258 | "5s", 3259 | "10s", 3260 | "30s", 3261 | "1m", 3262 | "5m", 3263 | "15m", 3264 | "30m", 3265 | "1h", 3266 | "2h", 3267 | "1d" 3268 | ], 3269 | "time_options": [ 3270 | "5m", 3271 | "15m", 3272 | "1h", 3273 | "6h", 3274 | "12h", 3275 | "24h", 3276 | "2d", 3277 | "7d", 3278 | "30d" 3279 | ] 3280 | }, 3281 | "timezone": "browser", 3282 | "title": "system metrics", 3283 | "uid": "PkPmjrZRk", 3284 | "version": 1 3285 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/all.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: 'default' 5 | orgId: 1 6 | folder: '' 7 | type: file 8 | disableDeletion: false 9 | updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards 10 | options: 11 | path: /var/lib/grafana/dashboards 12 | -------------------------------------------------------------------------------- /grafana/provisioning/datasources/all.yml: -------------------------------------------------------------------------------- 1 | # config file version 2 | apiVersion: 1 3 | 4 | #see 5 | # - http://docs.grafana.org/administration/provisioning/ 6 | # - http://docs.grafana.org/features/datasources/influxdb/ 7 | datasources: 8 | - name: 'telegraf_ds' 9 | type: 'influxdb' 10 | access: 'proxy' 11 | org_id: 1 12 | url: 'http://influxdb:8086' 13 | database: 'telegraf' 14 | password: 'root' 15 | user: 'root' 16 | # enable/disable basic auth 17 | # is_default: true 18 | version: 1 19 | editable: true -------------------------------------------------------------------------------- /influxdb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/influxdb:latest 2 | 3 | # If the following instruction refers to an existing USB drive (e.g. memory stick) connected to the device 4 | # then it will use that drive for storing in the influxdb otherwise it will use the named volume 5 | # that is specified in the docker compose yaml file. 6 | # 7 | # So the instruction below refers to a connected USB drive with label "influxdb" which should be in "ext4" format. 8 | RUN echo "LABEL=influxdb /mnt/influxdb ext4 rw,relatime,discard,data=ordered 0 2" >> /etc/fstab 9 | 10 | # The script "my_entrypoint.sh" is an extension of the existing script with extra instructions to mount the usb memory stick. 11 | COPY my_entrypoint.sh /entrypoint.sh 12 | RUN chmod +x /entrypoint.sh 13 | 14 | COPY influxdb.conf /etc/influxdb -------------------------------------------------------------------------------- /influxdb/influxdb.conf: -------------------------------------------------------------------------------- 1 | [meta] 2 | dir = "/mnt/influxdb/meta" 3 | 4 | [data] 5 | dir = "/mnt/influxdb/data" 6 | engine = "tsm1" 7 | wal-dir = "/mnt/influxdb/wal" 8 | -------------------------------------------------------------------------------- /influxdb/my_entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # JVA 2018-11-15 I have added following instructions to mount usbdrive and create subfolder influxdb 3 | mkdir -p /mnt/influxdb 4 | mount /mnt/influxdb 5 | 6 | # here below copy paste of original entrypoint.sh. see : 7 | # https://github.com/influxdata/influxdata-docker/tree/35d89882b57f333d9518b4556e7b872ce970e620/influxdb/1.7 8 | set -e 9 | 10 | if [ "${1:0:1}" = '-' ]; then 11 | set -- influxd "$@" 12 | fi 13 | 14 | if [ "$1" = 'influxd' ]; then 15 | /init-influxdb.sh "${@:2}" 16 | fi 17 | 18 | exec "$@" -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tobi312/rpi-nginx 2 | COPY ./nginx.conf /etc/nginx/nginx.conf 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | # author Jan Van den Audenaerde 2 | # creation date 2018-11-12 3 | # http://docs.grafana.org/installation/behind_proxy/ 4 | 5 | events {} 6 | 7 | http { 8 | server { 9 | listen 80; 10 | listen 443 ssl; 11 | root /usr/share/nginx/www; 12 | index index.html index.htm; 13 | 14 | 15 | # default path will root to grafana 16 | location / { 17 | proxy_pass http://grafana:3000; 18 | } 19 | 20 | # /node-red will point to node-red (note that httpRoot must also be set to /node-red in settings.js of node-red) 21 | location /node-red { 22 | proxy_set_header Host $http_host; 23 | proxy_set_header X-Real-IP $remote_addr; 24 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 25 | proxy_set_header X-Forwarded-Proto $scheme; 26 | proxy_http_version 1.1; 27 | proxy_set_header Upgrade $http_upgrade; 28 | proxy_set_header Connection "upgrade"; 29 | 30 | proxy_pass http://node-red:1880; 31 | } 32 | 33 | # /node-red-test will point to node-red (note that httpRoot must also be set to /node-red-test in settings.js of node-red) 34 | location /node-red-test { 35 | proxy_set_header Host $http_host; 36 | proxy_set_header X-Real-IP $remote_addr; 37 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 38 | proxy_set_header X-Forwarded-Proto $scheme; 39 | proxy_http_version 1.1; 40 | proxy_set_header Upgrade $http_upgrade; 41 | proxy_set_header Connection "upgrade"; 42 | 43 | proxy_pass http://node-red-test:1880; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /node-red-test/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nodered/node-red-docker:rpi-v8 2 | 3 | # installing an editor 4 | USER root 5 | RUN apt-get update && apt-get install nano 6 | USER node-red 7 | 8 | RUN npm install node-red-contrib-resinio 9 | RUN npm install node-red-dashboard 10 | RUN npm install node-red-contrib-credentials 11 | 12 | # install node-red-admin which is needed if you want to created hashed password for the node-red editor. 13 | RUN sudo npm install -g --unsafe-perm node-red-admin 14 | 15 | COPY ./settings.js /data/settings.js 16 | -------------------------------------------------------------------------------- /node-red-test/settings.js: -------------------------------------------------------------------------------- 1 | /* JVA 2018-10-28 */ 2 | /** 3 | * Copyright 2013, 2016 IBM Corp. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | **/ 17 | 18 | // The `https` setting requires the `fs` module. Uncomment the following 19 | // to make it available: 20 | //var fs = require("fs"); 21 | 22 | module.exports = { 23 | // the tcp port that the Node-RED web server is listening on 24 | uiPort: process.env.PORT || 1880, 25 | 26 | // By default, the Node-RED UI accepts connections on all IPv4 interfaces. 27 | // The following property can be used to listen on a specific interface. For 28 | // example, the following would only allow connections from the local machine. 29 | //uiHost: "127.0.0.1", 30 | 31 | // Retry time in milliseconds for MQTT connections 32 | mqttReconnectTime: 15000, 33 | 34 | // Retry time in milliseconds for Serial port connections 35 | serialReconnectTime: 15000, 36 | 37 | // Retry time in milliseconds for TCP socket connections 38 | //socketReconnectTime: 10000, 39 | 40 | // Timeout in milliseconds for TCP server socket connections 41 | // defaults to no timeout 42 | //socketTimeout: 120000, 43 | 44 | // Timeout in milliseconds for HTTP request connections 45 | // defaults to 120 seconds 46 | //httpRequestTimeout: 120000, 47 | 48 | // The maximum length, in characters, of any message sent to the debug sidebar tab 49 | debugMaxLength: 1000, 50 | 51 | // The file containing the flows. If not set, it defaults to flows_.json 52 | //flowFile: 'flows.json', 53 | 54 | // To enabled pretty-printing of the flow within the flow file, set the following 55 | // property to true: 56 | //flowFilePretty: true, 57 | 58 | // By default, all user data is stored in the Node-RED install directory. To 59 | // use a different location, the following property can be used 60 | //userDir: '/home/nol/.node-red/', 61 | 62 | // Node-RED scans the `nodes` directory in the install directory to find nodes. 63 | // The following property can be used to specify an additional directory to scan. 64 | //nodesDir: '/home/nol/.node-red/nodes', 65 | 66 | // By default, the Node-RED UI is available at http://localhost:1880/ 67 | // The following property can be used to specifiy a different root path. 68 | // If set to false, this is disabled. 69 | //httpAdminRoot: '/admin', 70 | 71 | // Some nodes, such as HTTP In, can be used to listen for incoming http requests. 72 | // By default, these are served relative to '/'. The following property 73 | // can be used to specifiy a different root path. If set to false, this is 74 | // disabled. 75 | //httpNodeRoot: '/red-nodes', 76 | 77 | // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot', 78 | // to apply the same root to both parts. 79 | // JVA 2018-11-12: activated httpRoot 80 | httpRoot: '/node-red-test', 81 | 82 | // When httpAdminRoot is used to move the UI to a different root path, the 83 | // following property can be used to identify a directory of static content 84 | // that should be served at http://localhost:1880/. 85 | //httpStatic: '/home/nol/node-red-static/', 86 | 87 | // Securing Node-RED 88 | // ----------------- 89 | // To password protect the Node-RED editor and admin API, the following 90 | // property can be used. See http://nodered.org/docs/security.html for details. 91 | //adminAuth: { 92 | // type: "credentials", 93 | // users: [{ 94 | // username: "admin", 95 | // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.", 96 | // permissions: "*" 97 | // }] 98 | //}, 99 | 100 | adminAuth: { 101 | type: "credentials", 102 | users: [{ 103 | username: process.env.USERNAME, 104 | password: process.env.PASSWORD, 105 | permissions: "*" 106 | }] 107 | }, 108 | 109 | 110 | // To password protect the node-defined HTTP endpoints (httpNodeRoot), or 111 | // the static content (httpStatic), the following properties can be used. 112 | // The pass field is a bcrypt hash of the password. 113 | // See http://nodered.org/docs/security.html#generating-the-password-hash 114 | //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."}, 115 | //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."}, 116 | 117 | // The following property can be used to enable HTTPS 118 | // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener 119 | // for details on its contents. 120 | // See the comment at the top of this file on how to load the `fs` module used by 121 | // this setting. 122 | // 123 | //https: { 124 | // key: fs.readFileSync('privatekey.pem'), 125 | // cert: fs.readFileSync('certificate.pem') 126 | //}, 127 | 128 | // The following property can be used to disable the editor. The admin API 129 | // is not affected by this option. To disable both the editor and the admin 130 | // API, use either the httpRoot or httpAdminRoot properties 131 | //disableEditor: false, 132 | 133 | // The following property can be used to configure cross-origin resource sharing 134 | // in the HTTP nodes. 135 | // See https://github.com/troygoode/node-cors#configuration-options for 136 | // details on its contents. The following is a basic permissive set of options: 137 | //httpNodeCors: { 138 | // origin: "*", 139 | // methods: "GET,PUT,POST,DELETE" 140 | //}, 141 | 142 | // If you need to set an http proxy please set an environment variable 143 | // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system. 144 | // For example - http_proxy=http://myproxy.com:8080 145 | // (Setting it here will have no effect) 146 | // You may also specify no_proxy (or NO_PROXY) to supply a comma separated 147 | // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk 148 | 149 | // The following property can be used to add a custom middleware function 150 | // in front of all http in nodes. This allows custom authentication to be 151 | // applied to all http in nodes, or any other sort of common request processing. 152 | //httpNodeMiddleware: function(req,res,next) { 153 | // // Handle/reject the request, or pass it on to the http in node 154 | // // by calling next(); 155 | // next(); 156 | //}, 157 | 158 | // Anything in this hash is globally available to all functions. 159 | // It is accessed as context.global. 160 | // eg: 161 | // functionGlobalContext: { os:require('os') } 162 | // can be accessed in a function block as: 163 | // context.global.os 164 | 165 | functionGlobalContext: { 166 | process: process, 167 | os: require('os') 168 | // octalbonescript:require('octalbonescript'), 169 | // jfive:require("johnny-five"), 170 | // j5board:require("johnny-five").Board({repl:false}) 171 | }, 172 | 173 | // The following property can be used to order the categories in the editor 174 | // palette. If a node's category is not in the list, the category will get 175 | // added to the end of the palette. 176 | // If not set, the following default order is used: 177 | //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'], 178 | 179 | editorTheme: { 180 | page: { 181 | title: "Node-RED Test" 182 | // favicon: "/usr/src/app/assets/favicon.ico" 183 | }, 184 | header: { 185 | title: "Node-RED Test", 186 | // image: "/usr/src/app/assets/resin_logo.png", // or null to remove image 187 | url: "https://github.com/janvda/balena-node-red-mqtt-nginx-TIG-stack/blob/master/README.md" 188 | }, 189 | projects: { 190 | enabled: true 191 | } 192 | }, 193 | 194 | // Configure the logging output 195 | logging: { 196 | // Only console logging is currently supported 197 | console: { 198 | // Level of logging to be recorded. Options are: 199 | // fatal - only those errors which make the application unusable should be recorded 200 | // error - record errors which are deemed fatal for a particular request + fatal errors 201 | // warn - record problems which are non fatal + errors + fatal errors 202 | // info - record information about the general running of the application + warn + error + fatal errors 203 | // debug - record information which is more verbose than info + info + warn + error + fatal errors 204 | // trace - record very detailed logging + debug + info + warn + error + fatal errors 205 | level: "info", 206 | // Whether or not to include metric events in the log output 207 | metrics: false, 208 | // Whether or not to include audit events in the log output 209 | audit: false 210 | } 211 | } 212 | } -------------------------------------------------------------------------------- /node-red/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nodered/node-red-docker:rpi-v8 2 | 3 | # installing an editor 4 | USER root 5 | RUN apt-get update && apt-get install nano 6 | USER node-red 7 | 8 | RUN npm install node-red-contrib-resinio 9 | RUN npm install node-red-dashboard 10 | RUN npm install node-red-contrib-credentials 11 | 12 | # install node-red-admin which is needed if you want to created hashed password for the node-red editor. 13 | RUN sudo npm install -g --unsafe-perm node-red-admin 14 | 15 | COPY ./settings.js /data/settings.js 16 | -------------------------------------------------------------------------------- /node-red/settings.js: -------------------------------------------------------------------------------- 1 | /* JVA 2018-11-19 */ 2 | /** 3 | * Copyright 2013, 2016 IBM Corp. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | **/ 17 | 18 | // The `https` setting requires the `fs` module. Uncomment the following 19 | // to make it available: 20 | //var fs = require("fs"); 21 | 22 | module.exports = { 23 | // the tcp port that the Node-RED web server is listening on 24 | uiPort: process.env.PORT || 1880, 25 | 26 | // By default, the Node-RED UI accepts connections on all IPv4 interfaces. 27 | // The following property can be used to listen on a specific interface. For 28 | // example, the following would only allow connections from the local machine. 29 | //uiHost: "127.0.0.1", 30 | 31 | // Retry time in milliseconds for MQTT connections 32 | mqttReconnectTime: 15000, 33 | 34 | // Retry time in milliseconds for Serial port connections 35 | serialReconnectTime: 15000, 36 | 37 | // Retry time in milliseconds for TCP socket connections 38 | //socketReconnectTime: 10000, 39 | 40 | // Timeout in milliseconds for TCP server socket connections 41 | // defaults to no timeout 42 | //socketTimeout: 120000, 43 | 44 | // Timeout in milliseconds for HTTP request connections 45 | // defaults to 120 seconds 46 | //httpRequestTimeout: 120000, 47 | 48 | // The maximum length, in characters, of any message sent to the debug sidebar tab 49 | debugMaxLength: 1000, 50 | 51 | // The file containing the flows. If not set, it defaults to flows_.json 52 | //flowFile: 'flows.json', 53 | 54 | // To enabled pretty-printing of the flow within the flow file, set the following 55 | // property to true: 56 | //flowFilePretty: true, 57 | 58 | // By default, all user data is stored in the Node-RED install directory. To 59 | // use a different location, the following property can be used 60 | //userDir: '/home/nol/.node-red/', 61 | 62 | // Node-RED scans the `nodes` directory in the install directory to find nodes. 63 | // The following property can be used to specify an additional directory to scan. 64 | //nodesDir: '/home/nol/.node-red/nodes', 65 | 66 | // By default, the Node-RED UI is available at http://localhost:1880/ 67 | // The following property can be used to specifiy a different root path. 68 | // If set to false, this is disabled. 69 | //httpAdminRoot: '/admin', 70 | 71 | // Some nodes, such as HTTP In, can be used to listen for incoming http requests. 72 | // By default, these are served relative to '/'. The following property 73 | // can be used to specifiy a different root path. If set to false, this is 74 | // disabled. 75 | //httpNodeRoot: '/red-nodes', 76 | 77 | // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot', 78 | // to apply the same root to both parts. 79 | // JVA 2018-11-12: activated httpRoot 80 | httpRoot: '/node-red', 81 | 82 | // When httpAdminRoot is used to move the UI to a different root path, the 83 | // following property can be used to identify a directory of static content 84 | // that should be served at http://localhost:1880/. 85 | //httpStatic: '/home/nol/node-red-static/', 86 | 87 | // Securing Node-RED 88 | // ----------------- 89 | // To password protect the Node-RED editor and admin API, the following 90 | // property can be used. See http://nodered.org/docs/security.html for details. 91 | //adminAuth: { 92 | // type: "credentials", 93 | // users: [{ 94 | // username: "admin", 95 | // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.", 96 | // permissions: "*" 97 | // }] 98 | //}, 99 | 100 | adminAuth: { 101 | type: "credentials", 102 | users: [{ 103 | username: process.env.USERNAME, 104 | password: process.env.PASSWORD, 105 | permissions: "*" 106 | }] 107 | }, 108 | 109 | 110 | // To password protect the node-defined HTTP endpoints (httpNodeRoot), or 111 | // the static content (httpStatic), the following properties can be used. 112 | // The pass field is a bcrypt hash of the password. 113 | // See http://nodered.org/docs/security.html#generating-the-password-hash 114 | //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."}, 115 | //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."}, 116 | 117 | // The following property can be used to enable HTTPS 118 | // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener 119 | // for details on its contents. 120 | // See the comment at the top of this file on how to load the `fs` module used by 121 | // this setting. 122 | // 123 | //https: { 124 | // key: fs.readFileSync('privatekey.pem'), 125 | // cert: fs.readFileSync('certificate.pem') 126 | //}, 127 | 128 | // The following property can be used to disable the editor. The admin API 129 | // is not affected by this option. To disable both the editor and the admin 130 | // API, use either the httpRoot or httpAdminRoot properties 131 | //disableEditor: false, 132 | 133 | // The following property can be used to configure cross-origin resource sharing 134 | // in the HTTP nodes. 135 | // See https://github.com/troygoode/node-cors#configuration-options for 136 | // details on its contents. The following is a basic permissive set of options: 137 | //httpNodeCors: { 138 | // origin: "*", 139 | // methods: "GET,PUT,POST,DELETE" 140 | //}, 141 | 142 | // If you need to set an http proxy please set an environment variable 143 | // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system. 144 | // For example - http_proxy=http://myproxy.com:8080 145 | // (Setting it here will have no effect) 146 | // You may also specify no_proxy (or NO_PROXY) to supply a comma separated 147 | // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk 148 | 149 | // The following property can be used to add a custom middleware function 150 | // in front of all http in nodes. This allows custom authentication to be 151 | // applied to all http in nodes, or any other sort of common request processing. 152 | //httpNodeMiddleware: function(req,res,next) { 153 | // // Handle/reject the request, or pass it on to the http in node 154 | // // by calling next(); 155 | // next(); 156 | //}, 157 | 158 | // Anything in this hash is globally available to all functions. 159 | // It is accessed as context.global. 160 | // eg: 161 | // functionGlobalContext: { os:require('os') } 162 | // can be accessed in a function block as: 163 | // context.global.os 164 | 165 | functionGlobalContext: { 166 | process: process, 167 | os: require('os') 168 | // octalbonescript:require('octalbonescript'), 169 | // jfive:require("johnny-five"), 170 | // j5board:require("johnny-five").Board({repl:false}) 171 | }, 172 | 173 | // The following property can be used to order the categories in the editor 174 | // palette. If a node's category is not in the list, the category will get 175 | // added to the end of the palette. 176 | // If not set, the following default order is used: 177 | //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'], 178 | 179 | editorTheme: { 180 | projects: { 181 | enabled: true 182 | } 183 | }, 184 | 185 | 186 | // Configure the logging output 187 | logging: { 188 | // Only console logging is currently supported 189 | console: { 190 | // Level of logging to be recorded. Options are: 191 | // fatal - only those errors which make the application unusable should be recorded 192 | // error - record errors which are deemed fatal for a particular request + fatal errors 193 | // warn - record problems which are non fatal + errors + fatal errors 194 | // info - record information about the general running of the application + warn + error + fatal errors 195 | // debug - record information which is more verbose than info + info + warn + error + fatal errors 196 | // trace - record very detailed logging + debug + info + warn + error + fatal errors 197 | level: "info", 198 | // Whether or not to include metric events in the log output 199 | metrics: false, 200 | // Whether or not to include audit events in the log output 201 | audit: false 202 | } 203 | } 204 | } -------------------------------------------------------------------------------- /system_metrics_dashboard_1_of_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janvda/balena-node-red-mqtt-nginx-TIG-stack/126b5768d7f720b69b11aed83ea29733db11a29e/system_metrics_dashboard_1_of_2.png -------------------------------------------------------------------------------- /system_metrics_dashboard_2_of_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janvda/balena-node-red-mqtt-nginx-TIG-stack/126b5768d7f720b69b11aed83ea29733db11a29e/system_metrics_dashboard_2_of_2.png -------------------------------------------------------------------------------- /telegraf/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm32v7/telegraf:1.8.2 2 | # copying telegraf configuration file. 3 | COPY telegraf.conf /etc/telegraf/telegraf.conf 4 | -------------------------------------------------------------------------------- /telegraf/telegraf.conf: -------------------------------------------------------------------------------- 1 | # JVA 2018-11-15 2 | # Telegraf Configuration 3 | # 4 | # Telegraf is entirely plugin driven. All metrics are gathered from the 5 | # declared inputs, and sent to the declared outputs. 6 | # 7 | # Plugins must be declared in here to be active. 8 | # To deactivate a plugin, comment out the name and any variables. 9 | # 10 | # Use 'telegraf -config telegraf.conf -test' to see what metrics a config 11 | # file would generate. 12 | # 13 | # Environment variables can be used anywhere in this config file, simply prepend 14 | # them with $. For strings the variable must be within quotes (ie, "$STR_VAR"), 15 | # for numbers and booleans they should be plain (ie, $INT_VAR, $BOOL_VAR) 16 | 17 | 18 | # Global tags can be specified here in key="value" format. 19 | [global_tags] 20 | # dc = "us-east-1" # will tag all metrics with dc=us-east-1 21 | # rack = "1a" 22 | ## Environment variables can be used as tags, and throughout the config file 23 | # user = "$USER" 24 | 25 | 26 | # Configuration for telegraf agent 27 | [agent] 28 | ## Default data collection interval for all inputs 29 | interval = "$interval" 30 | ## Rounds collection interval to 'interval' 31 | ## ie, if interval="10s" then always collect on :00, :10, :20, etc. 32 | round_interval = true 33 | 34 | ## Telegraf will send metrics to outputs in batches of at most 35 | ## metric_batch_size metrics. 36 | ## This controls the size of writes that Telegraf sends to output plugins. 37 | metric_batch_size = 1000 38 | 39 | ## For failed writes, telegraf will cache metric_buffer_limit metrics for each 40 | ## output, and will flush this buffer on a successful write. Oldest metrics 41 | ## are dropped first when this buffer fills. 42 | ## This buffer only fills when writes fail to output plugin(s). 43 | metric_buffer_limit = 10000 44 | 45 | ## Collection jitter is used to jitter the collection by a random amount. 46 | ## Each plugin will sleep for a random time within jitter before collecting. 47 | ## This can be used to avoid many plugins querying things like sysfs at the 48 | ## same time, which can have a measurable effect on the system. 49 | collection_jitter = "0s" 50 | 51 | ## Default flushing interval for all outputs. You shouldn't set this below 52 | ## interval. Maximum flush_interval will be flush_interval + flush_jitter 53 | flush_interval = "$flush_interval" 54 | 55 | ## Jitter the flush interval by a random amount. This is primarily to avoid 56 | ## large write spikes for users running a large number of telegraf instances. 57 | ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s 58 | flush_jitter = "0s" 59 | 60 | ## By default or when set to "0s", precision will be set to the same 61 | ## timestamp order as the collection interval, with the maximum being 1s. 62 | ## ie, when interval = "10s", precision will be "1s" 63 | ## when interval = "250ms", precision will be "1ms" 64 | ## Precision will NOT be used for service inputs. It is up to each individual 65 | ## service input to set the timestamp at the appropriate precision. 66 | ## Valid time units are "ns", "us" (or "µs"), "ms", "s". 67 | precision = "" 68 | 69 | ## Logging configuration: 70 | ## Run telegraf with debug log messages. 71 | debug = false 72 | ## Run telegraf in quiet mode (error log messages only). 73 | quiet = false 74 | ## Specify the log file name. The empty string means to log to stderr. 75 | logfile = "" 76 | 77 | ## Override default hostname, if empty use os.Hostname() 78 | hostname = "" 79 | ## If set to true, do no set the "host" tag in the telegraf agent. 80 | omit_hostname = false 81 | 82 | 83 | ############################################################################### 84 | # OUTPUT PLUGINS # 85 | ############################################################################### 86 | 87 | # Configuration for influxdb server to send metrics to 88 | [[outputs.influxdb]] 89 | ## The HTTP or UDP URL for your InfluxDB instance. Each item should be 90 | ## of the form: 91 | ## scheme "://" host [ ":" port] 92 | ## 93 | ## Multiple urls can be specified as part of the same cluster, 94 | ## this means that only ONE of the urls will be written to each interval. 95 | # urls = ["udp://localhost:8089"] # UDP endpoint example 96 | urls = ["http://localhost:8086"] # required 97 | ## The target database for metrics (telegraf will create it if not exists). 98 | database = "telegraf" # required 99 | 100 | ## Name of existing retention policy to write to. Empty string writes to 101 | ## the default retention policy. 102 | retention_policy = "" 103 | ## Write consistency (clusters only), can be: "any", "one", "quorum", "all" 104 | write_consistency = "any" 105 | 106 | ## Write timeout (for the InfluxDB client), formatted as a string. 107 | ## If not provided, will default to 5s. 0s means no timeout (not recommended). 108 | timeout = "5s" 109 | # username = "telegraf" 110 | # password = "metricsmetricsmetricsmetrics" 111 | ## Set the user agent for HTTP POSTs (can be useful for log differentiation) 112 | # user_agent = "telegraf" 113 | ## Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) 114 | # udp_payload = 512 115 | 116 | ## Optional SSL Config 117 | # ssl_ca = "/etc/telegraf/ca.pem" 118 | # ssl_cert = "/etc/telegraf/cert.pem" 119 | # ssl_key = "/etc/telegraf/key.pem" 120 | ## Use SSL but skip chain & host verification 121 | # insecure_skip_verify = false 122 | 123 | ## HTTP Proxy Config 124 | # http_proxy = "http://corporate.proxy:3128" 125 | 126 | ## Compress each HTTP request payload using GZIP. 127 | # content_encoding = "gzip" 128 | 129 | 130 | ############################################################################### 131 | # PROCESSOR PLUGINS # 132 | ############################################################################### 133 | 134 | [[processors.regex]] 135 | # This is a solution for the issue : https://github.com/janvda/balena-node-red-mqtt-nginx-TIG-stack/issues/10 136 | # So this processor will replace all container_name like "influxdb_643150_676670" into "influxdb" 137 | 138 | # namepass lists all docker container measurements having tag container_name (see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/docker) 139 | namepass = ["docker_container_mem","docker_container_cpu", "docker_container_net","docker_container_blkio","docker_container_health","docker_container_status" ] 140 | 141 | # Tag and field conversions defined in a separate sub-tables 142 | # below processor will change a container name like "influxdb_643150_676670" into "influxdb" 143 | [[processors.regex.tags]] 144 | ## Tag to change 145 | key = "container_name" 146 | ## Regular expression to match on a tag value 147 | pattern = "^(.*)_[0-9]{6}_[0-9]{6}$" 148 | replacement = "${1}" 149 | 150 | 151 | ############################################################################### 152 | # AGGREGATOR PLUGINS # 153 | ############################################################################### 154 | 155 | # # Create aggregate histograms. 156 | # [[aggregators.histogram]] 157 | # ## The period in which to flush the aggregator. 158 | # period = "30s" 159 | # 160 | # ## If true, the original metric will be dropped by the 161 | # ## aggregator and will not get sent to the output plugins. 162 | # drop_original = false 163 | # 164 | # ## Example config that aggregates all fields of the metric. 165 | # # [[aggregators.histogram.config]] 166 | # # ## The set of buckets. 167 | # # buckets = [0.0, 15.6, 34.5, 49.1, 71.5, 80.5, 94.5, 100.0] 168 | # # ## The name of metric. 169 | # # measurement_name = "cpu" 170 | # 171 | # ## Example config that aggregates only specific fields of the metric. 172 | # # [[aggregators.histogram.config]] 173 | # # ## The set of buckets. 174 | # # buckets = [0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0] 175 | # # ## The name of metric. 176 | # # measurement_name = "diskio" 177 | # # ## The concrete fields of metric 178 | # # fields = ["io_time", "read_time", "write_time"] 179 | 180 | 181 | # # Keep the aggregate min/max of each metric passing through. 182 | # [[aggregators.minmax]] 183 | # ## General Aggregator Arguments: 184 | # ## The period on which to flush & clear the aggregator. 185 | # period = "30s" 186 | # ## If true, the original metric will be dropped by the 187 | # ## aggregator and will not get sent to the output plugins. 188 | # drop_original = false 189 | 190 | 191 | 192 | ############################################################################### 193 | # INPUT PLUGINS # 194 | ############################################################################### 195 | 196 | # Read metrics about cpu usage 197 | [[inputs.cpu]] 198 | ## Whether to report per-cpu stats or not 199 | percpu = true 200 | ## Whether to report total system cpu stats or not 201 | totalcpu = true 202 | ## If true, collect raw CPU time metrics. 203 | collect_cpu_time = false 204 | ## If true, compute and report the sum of all non-idle CPU states. 205 | report_active = false 206 | 207 | 208 | 209 | # Read metrics about memory usage 210 | [[inputs.mem]] 211 | # no configuration 212 | 213 | # Read metrics about swap memory usage 214 | [[inputs.swap]] 215 | # no configuration 216 | 217 | # Read metrics about system load & uptime 218 | [[inputs.system]] 219 | # no configuration 220 | 221 | # Get the number of processes and group them by status 222 | [[inputs.processes]] 223 | # no configuration 224 | 225 | # Read metrics about disk usage by mount point 226 | [[inputs.disk]] 227 | ## By default, telegraf gather stats for all mountpoints. 228 | ## Setting mountpoints will restrict the stats to the specified mountpoints. 229 | # mount_points = ["/"] 230 | 231 | ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually 232 | ## present on /run, /var/run, /dev/shm or /dev). 233 | ignore_fs = ["tmpfs", "devtmpfs", "devfs"] 234 | 235 | # Read metrics about disk IO by device 236 | [[inputs.diskio]] 237 | ## By default, telegraf will gather stats for all devices including 238 | ## disk partitions. 239 | ## Setting devices will restrict the stats to the specified devices. 240 | # devices = ["sda", "sdb"] 241 | ## Uncomment the following line if you need disk serial numbers. 242 | # skip_serial_number = false 243 | # 244 | ## On systems which support it, device metadata can be added in the form of 245 | ## tags. 246 | ## Currently only Linux is supported via udev properties. You can view 247 | ## available properties for a device by running: 248 | ## 'udevadm info -q property -n /dev/sda' 249 | # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"] 250 | # 251 | ## Using the same metadata source as device_tags, you can also customize the 252 | ## name of the device via templates. 253 | ## The 'name_templates' parameter is a list of templates to try and apply to 254 | ## the device. The template may contain variables in the form of '$PROPERTY' or 255 | ## '${PROPERTY}'. The first template which does not contain any variables not 256 | ## present for the device is used as the device name tag. 257 | ## The typical use case is for LVM volumes, to get the VG/LV name instead of 258 | ## the near-meaningless DM-0 name. 259 | # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"] 260 | 261 | # # Read metrics about network interface usage 262 | [[inputs.net]] 263 | # ## By default, telegraf gathers stats from any up interface (excluding loopback) 264 | # ## Setting interfaces will tell it to gather these explicit interfaces, 265 | # ## regardless of status. 266 | # ## 267 | # # interfaces = ["eth0"] 268 | 269 | 270 | #=============================================================================== 271 | # Read metrics about docker containers 272 | # see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/docker 273 | #================================================================================ 274 | [[inputs.docker]] 275 | ## Docker Endpoint 276 | ## To use TCP, set endpoint = "tcp://[ip]:[port]" 277 | ## To use environment variables (ie, docker-machine), set endpoint = "ENV" 278 | endpoint = "unix:///var/run/balena.sock" 279 | 280 | ## Set to true to collect Swarm metrics(desired_replicas, running_replicas) 281 | ## Note: configure this in one of the manager nodes in a Swarm cluster. 282 | ## configuring in multiple Swarm managers results in duplication of metrics. 283 | gather_services = false 284 | 285 | ## Only collect metrics for these containers. Values will be appended to 286 | ## container_name_include. 287 | ## Deprecated (1.4.0), use container_name_include 288 | container_names = [] 289 | 290 | ## Containers to include and exclude. Collect all if empty. Globs accepted. 291 | container_name_include = [] 292 | container_name_exclude = [] 293 | 294 | ## Container states to include and exclude. Globs accepted. 295 | ## When empty only containers in the "running" state will be captured. 296 | # container_state_include = [] 297 | # container_state_exclude = [] 298 | 299 | ## Timeout for docker list, info, and stats commands 300 | timeout = "5s" 301 | 302 | ## Whether to report for each container per-device blkio (8:0, 8:1...) and 303 | ## network (eth0, eth1, ...) stats or not 304 | perdevice = true 305 | 306 | ## Whether to report for each container total blkio and network stats or not 307 | total = false 308 | 309 | ## docker labels to include and exclude as tags. Globs accepted. 310 | ## Note that an empty array for both will include all labels as tags 311 | docker_label_include = [] 312 | docker_label_exclude = [] 313 | 314 | ## Which environment variables should we use as a tag 315 | tag_env = ["JAVA_HOME", "HEAP_SIZE"] 316 | 317 | ## Optional TLS Config 318 | # tls_ca = "/etc/telegraf/ca.pem" 319 | # tls_cert = "/etc/telegraf/cert.pem" 320 | # tls_key = "/etc/telegraf/key.pem" 321 | ## Use TLS but skip chain & host verification 322 | # insecure_skip_verify = false 323 | --------------------------------------------------------------------------------