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/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..1ac5521 --- /dev/null +++ b/docker/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 +