diff --git a/examples/MANUAL.md b/examples/MANUAL.md index 562cce2e..a89fb096 100644 --- a/examples/MANUAL.md +++ b/examples/MANUAL.md @@ -83,9 +83,14 @@ is provided so the application can be easily adapted to any environment. errors will be logged. Using this with debug=true adds line numbers to any error logs. - lambda default: false - * Until reports of astonishing success with this mode, it is EXPERIMENTAL. - Setting this to true will invoke a run-once mode where the application + mode default: "influx" + * Value: influx + This default mode runs this application as a daemon. It will poll + the controller at the configured interval. Providing an invalid value + will run in this default mode. + + * Value: influxlambda - (the only other available option right now) + Setting this value will invoke a run-once mode where the application immediately polls the controller and reports the metrics to InfluxDB. Then it exits. This mode is useful in an AWS Lambda or a crontab where the execution timings are controlled. This mode may also be adapted diff --git a/examples/up.conf.example b/examples/up.conf.example index 91a4d86c..7f3f33d4 100644 --- a/examples/up.conf.example +++ b/examples/up.conf.example @@ -20,10 +20,16 @@ # Recommend enabling debug with this setting for better error logging. #quiet = false -# Lambda mode makes the application exit after collecting and reporting metrics one time. -# This mode requires an external process like an AWS Lambda or a simple crontab to keep -# the timings accurate on UniFi Poller run intervals. -#lambda = false +# Which mode to run this application in. The default mode is "influx". Providing +# an invalid mode will also result in "influx". In this default mode the application +# runs as a daemon and polls the controller at the configured interval. +# +# There is only one other option at this time: "influxlambda" +# +# Lambda mode makes the application exit after collecting and reporting metrics +# to InfluxDB one time. This mode requires an external process like an AWS Lambda +# or a simple crontab to keep the timings accurate on UniFi Poller run intervals. +#mode = "influx" # If the poller experiences an error from the UniFi controller or from InfluxDB # it will exit. If you do not want it to exit, change max_errors to -1. You can diff --git a/examples/up.json.example b/examples/up.json.example index 019c9b13..4ebbf7e8 100644 --- a/examples/up.json.example +++ b/examples/up.json.example @@ -3,7 +3,7 @@ "interval": "30s", "debug": false, "quiet": false, - "lambda": false, + "mode": "influx", "max_errors": 0, "influx_url": "http://127.0.0.1:8086", "influx_user": "unifi", diff --git a/examples/up.xml.example b/examples/up.xml.example index 5247154d..ba09ee5a 100644 --- a/examples/up.xml.example +++ b/examples/up.xml.example @@ -36,11 +36,17 @@ false - false + influx