diff --git a/cmd/unifi-poller/README.md b/cmd/unifi-poller/README.md index e28fbeee..6fd851a3 100644 --- a/cmd/unifi-poller/README.md +++ b/cmd/unifi-poller/README.md @@ -24,6 +24,51 @@ unifi-poller(1) -- Utility to poll Unifi Metrics and drop them into InfluxDB -h, --help Display usage and exit. +## CONFIGURATION + +* Config File Default Location: /usr/local/etc/unifi-poller/up.conf + +`Config File Parameters` + + `interval` default: 30s + How often to poll the controller for updated client and device data. + The Unifi Controller only updates traffic stats about every 30 seconds. + + `debug` default: false + This turns on time stamps and line numbers in logs, outputs a few extra + lines of information while processing. + + `quiet` default: false + Setting this to true will turn off per-device and per-interval logs. Only + errors will be logged. Using this with debug=true adds line numbers to + any error logs. + + `influx_url` default: http://127.0.0.1:8086 + This is the URL where the Influx web server is available. + + `influx_user` default: unifi + Username used to authenticate with InfluxDB. Many servers do not use auth. + + `influx_pass` default: unifi + Password used to authenticate with InfluxDB. + + `influx_db` default: unifi + Custom database created in InfluxDB to use with this application. + + `unifi_url` default: https://127.0.0.1:8443 + This is the URL where the Unifi Controller is available. + + `unifi_user` default: influxdb + Username used to authenticate with Unifi controller. This should be a + special service account created on the control with read-only access. + + `unifi_user` no default ENV: UNIFI_PASSWORD + Password used to authenticate with Unifi controller. This can also be + set in an environment variable instead of a configuration file. + + `verify_ssl` default: false + If your Unifi controller has a valid SSL certificate, you can enable + this option to validate it. Otherwise, any SSL certificate is valid. ## GO DURATION @@ -49,4 +94,5 @@ Example Use: `1m`, `5h`, `100ms`, `17s`, `1s45ms`, `1m3s` * https://github.com/davidnewhall/unifi-poller * /usr/local/bin/unifi-poller +* config-file: /usr/local/etc/unifi-poller/up.conf * previously: https://github.com/dewski/unifi diff --git a/cmd/unifi-poller/main.go b/cmd/unifi-poller/main.go index cc10df24..a3182588 100644 --- a/cmd/unifi-poller/main.go +++ b/cmd/unifi-poller/main.go @@ -14,7 +14,6 @@ import ( ) func main() { - configFile := parseFlags() log.Println("Unifi-Poller Starting Up! PID:", os.Getpid()) config, err := GetConfig(configFile) diff --git a/script/build_manpages.sh b/script/build_manpages.sh index 6273888a..19493dd9 100755 --- a/script/build_manpages.sh +++ b/script/build_manpages.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -o pipefail + OUTPUT=$1 # This requires the installation of `ronn`: sudo gem install ronn @@ -8,6 +10,6 @@ for f in cmd/*/README.md;do PKGNOCMD="${f#cmd/}" PKG="${PKGNOCMD%/README.md}" echo "Creating Man Page: ${f} -> ${OUTPUT}${PKG}.1.gz" - echo "If this produces an error. Install ronn; something like: sudo gem install ronn" - ronn < "$f" | gzip -9 > "${OUTPUT}${PKG}.1.gz" + ronn < "$f" | gzip -9 > "${OUTPUT}${PKG}.1.gz" || \ + echo "If this produces an error. Install ronn; something like: sudo gem install ronn" done