Skip to content

Commit

Permalink
Add docker-compose and update README
Browse files Browse the repository at this point in the history
Add docker-compose and modify readme
  • Loading branch information
amgxv authored Oct 12, 2019
2 parents f06b33d + df9006c commit bc2e8f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.

Expand Down
9 changes: 9 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.7'
services:
infping:
image: amgxv/infping
volumes:
- ./infping.yaml:/etc/infping.yaml
hostname: infping-docker-mikeli
restart: always

0 comments on commit bc2e8f0

Please sign in to comment.