Dashboard Stack installation on Docker i.e Telegraf, InfluxDB, Node-red and, Grafana.
You should have docker installed on your pc either on window, linux or mac. You can download it from https://docs.docker.com/engine/install/ If you are using windows download and install git on your pc. You can download git from https://git-scm.com/downloads On windows, have Gitbash or powershell to run commands on the terminal.
- On your terminal(gitbash or powershell), clone the repo using the code
git clone https://github.com/oves-embedded/web-docker-tickStack.git
- Once you have cloned the repo, change the directory to the cloned repo
cd web-docker-tickstack
- Run the command for the first time to start of the project
docker-compose up -d
- Run the command to check if the containers have started
docker-compose ps
N/B The first time you run this command it will take sometime to finish downloading the images.
- http://localhost:3000 - grafana
- http://localhost:1880 - node-red
- http://localhost:8186 - telegraf
- http://localhost:8086 - influxdb
- http://localhost:1883 - open mosquitto broker
- http://localhost:8883 - protected mosquitto broker
-
Start Node-Red on http://localhost:1880
- On Node-Red, import a default flow from the top right hamburger menu.
- Select import
- Import the default flow from the folder named resources
- After importing, click the deploy button on your right to get the changes.
- Start Grafana on http://localhost:3000.
- Use the below credentials on first start
username - admin password - admin
- After you have successfully logged in as an admin you will need to connect to a data source to be able to view metrics on dashboards. To do so you need to set up the data source for the following:
-
Once you have logged in, on the sidebar under configurations open data sources page.
-
On Data Sources, click add data source.
-
Search for Influxdb and select it.
-
Under influxdb settings, add the following:
Name: Oves InfluxDB Datasource Query Language: InfluxQL HTTP: url: http://influxdb:8086 InfluxDB Details: Database: telegraf User: telegraf Password: telegraf
-
Save & Test
-
You will get an acknowledge message if everything is set correctly.
-
You can now create your first dashboard while fetching data from influxdb.
Prerequistes for GraphQL Datasource - Have installed the GraphQL data source Plugin and Installed it. If not use the below Link to install the plugin https://grafana.com/grafana/plugins/fifemon-graphql-datasource/ - Also have an endpoint to your GraphQL APi. - Access Token of the API Endpoint.(Admin Access Token)
Setting up - Open data sources page. - On Data Sources, click add data source. - Search for GraphQl and select it. - Under GraphQl settings, add the following:
```sh
Name: Oves GraphQL Datasource
HTTP:
url: https://dev-microservices-apigateway.omnivoltaic.com/graphql
Custom HTTP Headers:
Header: Authorization
Value: Bearer {Accesstoken}
```
- Save & Test
- You will get an acknowledge message if everything is set correctly.
- You can now create your first dashboard while fetching data from GraphQL.
- When new changes have been pushed to the repository, you will need to pull them to your local enviroment to get the new changes.
- To get new changes use the below commands:
- Use this command to pull changes from github
./updates.sh
- Use this command to pull changes from github