This plugin counts IP addresses of responding hosts.
It's used in the Snap framework.
- License
- [Releases] (#Releases)
- Acknowledgements
- golang 1.5+ - needed only for building. See also How to install Go language
All OSs currently supported by Snap:
- Linux/amd64
$ go get -u github.com/IrekRomaniuk/snap-plugin-collector-pingcount
- Set up the Snap framework.
- Load the plugin and create a task, see example in Examples.
This plugin has the ability to gather the following metric:
Namespace | Description |
---|---|
/niuk/pingcount/total-up | total number of hosts responding |
Example running pingcount collector and writing data to an Influx database.
Load pingcount plugin
$ snaptel plugin load $GOPATH/bin/snap-plugin-collector-pingcount
List available plugins
$ snaptel task watch 4df1ddea-11ef-49e9-867b-6f19658cf16e
Watching Task (4df1ddea-11ef-49e9-867b-6f19658cf16e):
NAMESPACE DATA TIMESTAMP
niuk/pingcount/total-up 1102 2016-12-08 14:58:54.176178073 -0500 EST
See available metrics for your system
$ snaptel metric list
Create a task manifest file (see below) and put full path to the file listing IP addresses:
deadline: "15s"
version: 1
schedule:
type: "simple"
interval: "30s"
max-failures: 10
workflow:
collect:
metrics:
/niuk/pingcount/total-up: {}
config:
/niuk/pingcount:
target: "/home/global/path/examples/pinglist.txt"
Load influxdb plugin for publishing:
$ snaptel plugin load snap-plugin-publisher-influxdb
Create a task:
$ snaptel task create -t pingcount.yml -n pingcount
Using task manifest to create task
Task created
ID: 4df1ddea-11ef-49e9-867b-6f19658cf16e
Name: pingcount-shields
State: Running
List running tasks:
$ snaptel task list
ID NAME STATE HIT MISS FAIL CREATED LAST FAILURE
4df1ddea-11ef-49e9-867b-6f19658cf16e pingcount-shields Running 53 0 0 2:50PM 12-08-2016
Watch the task
$ snaptel task watch 4df1ddea-11ef-49e9-867b-6f19658cf16e
Watching Task (4df1ddea-11ef-49e9-867b-6f19658cf16e):
NAMESPACE DATA TIMESTAMP
niuk/pingcount/total-up 1102 2016-12-08 14:58:54.176178073 -0500 EST
Watch metrics in real-time using [Snap plugin for Grafana] (https://blog.raintank.io/using-grafana-with-intels-snap-for-ad-hoc-metric-exploration/) and use InfluxDB plugin for publishing
This plugin is Open Source software released under the Apache 2.0 License.
- Author: @IrekRomaniuk