Skip to content
/ infping Public
forked from nickvanw/infping

Parse fping output, store result in influxdb

License

Notifications You must be signed in to change notification settings

mrngm/infping

 
 

Repository files navigation

Introduction

infping is a simple Go program to parse the output of fping and store it in InfluxDB. Based upon software by Tor Hveem.

Configuration

This program uses the Viper configuration package and can process configuration files in JSON, YAML, TOML, and others. Save your configuration file as infping.<json|yaml|toml|...> in /etc/, /usr/local/etc, or the program directory. A sample configuration file is provided in JSON format.

influx

  • host: The hostname to connect to
  • port: The TCP port number
  • user: The username, if needed
  • 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

fping

  • backoff: The value for the -B argument
  • retries: The value for the -r argument
  • tos: The value for the -O argument
  • summary: The value for the -Q argument – this determines how often data is collected
  • period: The value for the -p argument
  • dualstack: If true: implies -m -n -A (send to all addresses, print both DNS name and IP address)

hosts

  • hosts: An array of hostnames to ping

Influx Storage

Data is stored in Influx with the following fields and tags:

  • min: field showing minimum ping time during the run
  • max: field showing maximum ping time during the run
  • avg: field showing average ping time during the run
  • loss: field showing packet loss during the run
  • rx_host: tag showing the target host
  • tx_host: tag showing the originating host of the ping check

Grafana Dashboard

A sample Grafana dashboard is included, that plots all four of the collected ping statistics in something approximating the display of Smokeping. 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.

dashboard screenshot

About

Parse fping output, store result in influxdb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.5%
  • HCL 2.5%