Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87b78f4072 | ||
|
|
b41527a2e6 | ||
|
|
8b173ff9ee | ||
|
|
8407bf1250 | ||
|
|
b51db3e64d | ||
|
|
cb6b8e1aae | ||
|
|
1772f7d929 | ||
|
|
1850598038 | ||
|
|
c6e1cc3448 | ||
|
|
06cfd448da |
65
.github/workflows/git2docker.yml
vendored
Normal file
65
.github/workflows/git2docker.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI to Docker Hub
|
||||
|
||||
# Controls when the workflow will run
|
||||
##on:
|
||||
# Triggers the workflow on push or pull request events but only for the "master" branch
|
||||
## push:
|
||||
## branches: [ "master" ]
|
||||
|
||||
|
||||
# Only update with new tag pushed
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*"
|
||||
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./Docker_Build/
|
||||
file: ./Docker_Build/Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pylatemon:latest
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
30
README.md
30
README.md
@@ -57,16 +57,16 @@ You can find everything under *./Docker_Build/* and in the python program itself
|
||||
|
||||
### ENV Variables
|
||||
|
||||
Name | Example | Usage | Option/Must
|
||||
:------: | :-----: | :-----: | :-----:
|
||||
INFLUX_URL | http://10.0.0.1:8086 | InfluxDB Host | must
|
||||
INFLUX_TOKEN | eWOcp-MCv2Y3IJPlER7wc...ICKirhw0lwEczRNnrIoTqZAg== | InfluxDB API Token | must
|
||||
INFLUX_BUCKET | latency | InfluxDB Bucket | must
|
||||
INFLUX_ORG | MyOrg | InfluxDB Organization | must
|
||||
TARGET_HOST | 8.8.8.8 | Monitored Host (IP/FQDN) | must
|
||||
TARGET_TIMEOUT | 0.5 | ping timeout in sec. | option
|
||||
TARGET_TIMER | 3 | ping frequency in sec. | option
|
||||
TARGET_LOCATION | Google | decript. location | option
|
||||
Name | Example | Usage | Option/Must | Type | Default
|
||||
:------: | :-----: | :-----: | :-----: | :-----: | :-----:
|
||||
INFLUX_URL | http://10.0.0.1:8086 | InfluxDB Host | must | URL | ---
|
||||
INFLUX_TOKEN | eWOcp-MCv2YPlER7wc...0zRNnrIoTqZAg== | InfluxDB API Token | must | String | ---
|
||||
INFLUX_BUCKET | latency | InfluxDB Bucket | must | String | ---
|
||||
INFLUX_ORG | MyOrg | InfluxDB Organization | must | String | ---
|
||||
TARGET_HOST | 8.8.8.8 | Monitored Host (IP/FQDN) | must | FQDN or IP | ---
|
||||
TARGET_TIMEOUT | 0.5 | ping timeout in sec. | optional | Float >0 | **1**
|
||||
TARGET_TIMER | 3 | ping frequency in sec. | optional | Int >1 | **5**
|
||||
TARGET_LOCATION | Google | decript. location | optional | String |**unknown**
|
||||
|
||||
-----
|
||||
|
||||
@@ -76,7 +76,7 @@ TARGET_LOCATION | Google | decript. location | option
|
||||
|
||||
**Keep in mind it´s a OR decision not a AND**
|
||||
|
||||
See [./latency-monitor/config.ini](./latency-monitor/config.ini)
|
||||
See [./latency-monitor/config-template.ini](./latency-monitor/config-template.ini)
|
||||
|
||||
**ENV wins over file**
|
||||
|
||||
@@ -245,7 +245,7 @@ Everything should be right in place now.
|
||||
|
||||
Just the certificates are missing look [here](#certificate)
|
||||
|
||||
Now run it and mybe pick a example dashboard for grafana from [here](#grafana-dashboard-examples)
|
||||
Now just start over and maybe pick an example dashboard for grafana from [here](#grafana-dashboard-examples)
|
||||
|
||||
-----
|
||||
-----
|
||||
@@ -293,6 +293,12 @@ Contributors names and contact info
|
||||
|
||||
## Version History
|
||||
|
||||
- v0.4a
|
||||
- fixed tag recognition for buildprocess
|
||||
|
||||
- v0.4
|
||||
- moved from self build iamge to dockerhub
|
||||
|
||||
- v0.3a
|
||||
- ping timeout added
|
||||
- cleanup
|
||||
|
||||
@@ -120,7 +120,7 @@ services:
|
||||
latency-monitor:
|
||||
container_name: latency-monitor
|
||||
hostname: latency-monitor
|
||||
build: ./Docker_Build
|
||||
image: planetespresso/pylatemon
|
||||
depends_on:
|
||||
- influxdb
|
||||
restart: always
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
latency-monitor:
|
||||
container_name: latency-monitor
|
||||
hostname: latency-monitor
|
||||
build: ./Docker_Build
|
||||
image: planetespresso/pylatemon
|
||||
restart: always
|
||||
volumes:
|
||||
# - ./latency-monitor/config.ini:/app/config.ini:ro # UNCOMMENT IF NEEDED
|
||||
|
||||
Reference in New Issue
Block a user