Skip to content

Commit

Permalink
Improving documentation, fixing Docker images versions, enabling CI
Browse files Browse the repository at this point in the history
Update README.md

Update docker-build.yml

Update docker-build.yml

Update docker-build.yml

Update docker-build.yml
  • Loading branch information
fmdlc committed Oct 13, 2020
1 parent 755f737 commit 242e636
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 14 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
branches:
- master
- develop

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Install Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest

- name: hub.docker.com Login
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build the multi-arch image
run: |
docker buildx build \
--push \
--tag tty0/isp_telegraf:1.15.3 \
--tag tty0/isp_telegraf:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 ./ISP-Checker/telegraf/
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ repos:
- id: trailing-whitespace
- id: detect-private-key
- id: check-symlinks
- id: check-yaml
- id: mixed-line-ending
- id: pretty-format-json
args: ["--autofix"]
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## October 12 2020 - v1.2
* Enabling CI build a multi-architecture Docker image (Extending support to `linux/amd64`, `linux/arm/v7`, `linux/arm64`)
* Fixing Docker images version on Docker Compose.
* Improving Dashboard look and feel.
* Updated `mtr` exeuction period for a best performance.
* Updated `speedtest-cli` execution period to reduce bandwith usage.
* Updated `README.md`

## October 10 2020 - v1.1

* Updated Speedtest checks to run once per hour (before was every 5 minutes).
Expand Down
2 changes: 1 addition & 1 deletion ISP-Checker/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: default install start stop restart prune

NAME=ISP-Checker
VERSION=1.1
VERSION=1.2
AUTHOR="Facu de la Cruz <fmdlc.unix@gmail.com>"

COMPOSE_FILE="./docker/docker-compose.yaml"
Expand Down
6 changes: 3 additions & 3 deletions ISP-Checker/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "docker.group=ISP-Checker"
- "docker.app=influxdb"
container_name: influxdb
image: influxdb:latest
image: influxdb:1.8.3-alpine
expose:
- 8086
restart: on-failure
Expand All @@ -20,7 +20,7 @@ services:
- "docker.group=ISP-Checker"
- "docker.app=telegraf"
container_name: telegraf
image: tty0/isp_telegraf:latest
image: tty0/isp_telegraf:1.15.3
volumes:
- "../telegraf/conf/telegraf.conf:/etc/telegraf/telegraf.conf"
env_file:
Expand All @@ -34,7 +34,7 @@ services:
- "docker.group=ISP-Checker"
- "docker.app=grafana"
container_name: grafana
image: grafana/grafana:latest
image: grafana/grafana:7.2.1-ubuntu
environment:
- GF_INSTALL_PLUGINS=https://grafana.com/api/plugins/gowee-traceroutemap-panel/versions/0.2.3/download;gowee-traceroutemap-panel
expose:
Expand Down
3 changes: 1 addition & 2 deletions ISP-Checker/grafana/network-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"datasource": "InfluxDB",
Expand Down Expand Up @@ -3612,7 +3611,7 @@
]
},
"time": {
"from": "now-30m",
"from": "now-1h",
"to": "now"
},
"timepicker": {},
Expand Down
8 changes: 6 additions & 2 deletions ISP-Checker/telegraf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM telegraf:latest
FROM telegraf:1.15.3

ARG ARCH

LABEL mantainer="Facu de la Cruz"
LABEL PROJECT="ISP_monitor"
LABEL email="fmdlc.unix@gmail.com"
LABEL project="ISP-Checker"
LABEL component="telegraf"

COPY ./bin/entrypoint.sh /entrypoint.sh

Expand Down
4 changes: 2 additions & 2 deletions ISP-Checker/telegraf/conf/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
[[inputs.exec]]
commands=["mtr -C google.com s3-website.ap-northeast-2.amazonaws.com s3-website.eu-central-1.amazonaws.com s3-website.af-south-1.amazonaws.com"]
timeout = "3m"
interval = "10m"
interval = "7m"
data_format = "csv"
csv_skip_rows = 1
csv_column_names=[ "", "", "status","dest","hop","ip","loss","","", "","avg","best","worst","stdev"]
Expand All @@ -100,7 +100,7 @@
commands = ["/usr/bin/speedtest-cli --csv --bytes"]
name_override = "speedtest"
timeout = "3m"
interval = "10m"
interval = "15m"
data_format = "csv"
csv_column_names = ['Server ID','Sponsor','Server Name','Timestamp','Distance','Ping','Download','Upload','Share','IP Address']
csv_timestamp_column = "Timestamp"
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,30 @@ It's easily extensible and it was built on top of [Docker](http://docker.com) to

Feel free to reach me out for any feedback or ideas! :-)

## Table of contents

1. [ Platforms ](#Platforms)
2. [ Download ](#Grafana)
3. [ Configuration ](#Configuration)
5. [ Installation ](#Installation)
6. [ Login ](#Login)
7. [ Removing ](#Removing)
8. [ Concepts ](#Cooncepts)
12. [ ToDo ](#ToDo)
13. [ Contributing ](#Contributing)
14. [ License ](#License)

<center>
<img src="./img/demo.gif" />
</center>

#### Grafana Cloud
#### Platforms
The following platforms are supported:
* `linux/amd64`.
* `linux/arm/v7`,
* `linux/arm64`.

#### Download
You can easily import this dashboard into your current Grafana installation getting it from the Official's [Grafana repository](https://grafana.com/grafana/dashboards/13140).

### Configuration
Expand All @@ -29,8 +47,6 @@ Make sure you have the [Docker-CE](https://phoenixnap.com/kb/docker-on-raspberry
```bash
$ curl -fsSL https://get.docker.com -o get-docker.sh | bash -
```

#### Preflight setup
Configure the `./ISP-Checker/credentials.env` file.
There are two users:
* <ins>Read-Only user:</ins> Used by Grafana to acccess to metrics
Expand Down Expand Up @@ -94,6 +110,8 @@ To remove run `make prune`.
> It will remove all stopped containers (yes, not only the ISP-Checker ones).
---
## Concepts

### Bandwith
Bandwidth is the maximum rate of data transfer across a given path. Bandwidth may be characterized as network bandwidth or data bandwidth.
The difference between internet speed and bandwidth can be summed in one line. Internet bandwidth is about how much data can be download or uploaded from your computer, while internet speed is how fast can the data be uploaded or downloaded on your computer.
Expand Down

0 comments on commit 242e636

Please sign in to comment.