From a396a092bf7b31ce72ed0153178ab6a8b9b0dab2 Mon Sep 17 00:00:00 2001 From: amgxv Date: Sat, 12 Oct 2019 13:14:36 +0200 Subject: [PATCH 1/2] Add docker-compose --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1ac5521 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.7' +services: + infping: + image: amgxv/infping + volumes: + - ./infping.yaml:/etc/infping.yaml + hostname: infping-docker-mikeli + restart: always + From df9006ca73bcd5a7f9a03072ef20222d9a0489e1 Mon Sep 17 00:00:00 2001 From: amgxv Date: Sat, 12 Oct 2019 22:39:50 +0200 Subject: [PATCH 2/2] Move docker-compose and modify readme --- README.md | 7 +++++++ docker-compose.yml => docker/docker-compose.yml | 0 2 files changed, 7 insertions(+) rename docker-compose.yml => docker/docker-compose.yml (100%) diff --git a/README.md b/README.md index df583c3..e73d74e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This program uses the [Viper configuration package](https://github.com/spf13/vip * **pass**: The password, if needed * **db**: The database name to connect to – this will be created if it does not exist * **secure**: Set to true to enable HTTPS +* **measurement**: Measurement name, if needed - by default "infping" +* **policy**: Retention policy to use (by default uses influx's default retention) - must be created [manually](https://docs.influxdata.com/influxdb/v1.7/query_language/database_management/#create-retention-policies-with-create-retention-policy) ### fping * **backoff**: The value for the `-B` argument @@ -22,6 +24,9 @@ This program uses the [Viper configuration package](https://github.com/spf13/vip ### hosts * **hosts**: An array of hostnames to ping +### hostname +* **hostname**: Manual specification of the host (tx_host) - by default gets the os hostname + # Influx Storage Data is stored in Influx with the following fields and tags: * **min**: *field* showing minimum ping time during the run @@ -41,6 +46,8 @@ docker run -v /local/infping.json:/config/infping.json $IMAGE It will automatically detect the configuration in `/config`. For best results, assign a hostname, otherwise you'll end up with one that doesn't make much sense +We also have a docker-compose file at `/docker/docker-compose.yml` with a reference to run this service. + # Grafana Dashboard A sample Grafana dashboard is included, that plots all four of the collected ping statistics in something approximating the display of [Smokeping](https://smokeping.org/). Simply create a datasource named "infping" pointing to Influx, and then import this dashboard. The `hostname` variable will be automatically populated with all the host names found in the database, and can be used to select different graphs. diff --git a/docker-compose.yml b/docker/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to docker/docker-compose.yml