diff --git a/examples/up.conf.example b/examples/up.conf.example index 06c5b59d..ca161c6b 100644 --- a/examples/up.conf.example +++ b/examples/up.conf.example @@ -43,33 +43,36 @@ # If you're getting zeros now, set this to "1m" interval = "30s" -# To enable output of UniFi Events to Loki, add a URL. +# To enable output of UniFi Events to Loki, add a URL; it's disabled otherwise. # User, pass and tenant_id are optional and most folks wont set them. # Pick which logs you want per-controller in the [unifi.controller] section. # This is a new feature. Feedback welcome! [loki] url = "" - # The rest of this is advanced & optional. - user = "" - pass = "" + # The rest of this is advanced & optional. See wiki. + user = "" + pass = "" verify_ssl = false - tenant_id = "" - interval = "2m" - timeout = "10s" + tenant_id = "" + interval = "2m" + timeout = "10s" # Poller has an optional web server. To turn it on, set enable to true. If you # wish to use SSL, provide SSL cert and key paths. This interface is currently # read-only; it just displays information, like logs, devices and clients. -# Notice: Enabling the web server with many clients will increase memory usage. +# Notice: Enabling the web server with many sites will increase memory usage. # This is a new feature. Feedback welcome! [webserver] enable = false - port = 37288 + port = 37288 # The HTML path is different on Windows and BSD/macOS. - html_path = "/usr/lib/unifi-poller/web" + html_path = "/usr/lib/unifi-poller/web" ssl_cert_path = "" - ssl_key_path = "" - # How many events per source to hold. 200-2000. Use fewer with many clients. + ssl_key_path = "" + # How many events per event group to hold. 200-2000. Use fewer with many sites. + # With 1 site, you'll have a max total of 9 event groups; 1 per plugin, 4 per site. + # Each site adds 1 event group for each of these inputs that is enabled: + # save_ids, save_events, save_anomalies, save_alarms. max_events = 200 # By default the web interface does not require authentication. You can change @@ -94,75 +97,25 @@ # provide one and dynamic is disabled. In other words, you can just add your # controller here and delete the following section. The internal defaults are # shown below. Any missing values will assume these displayed defaults. + [unifi.defaults] - url = "https://127.0.0.1:8443" - user = "unifipoller" - pass = "unifipoller" - sites = ["all"] - save_ids = false - save_events = false - save_alarms = false - save_anomalies = false - save_dpi = false - save_sites = true - hash_pii = false - verify_ssl = false - -# The following is optional and used for configurations with multiple controllers. - -# You may repeat the following section to poll multiple controllers. -# Any omitted variables will have their values taken from the defaults, above. -#[[unifi.controller]] # URL for the UniFi Controller. Do not add any paths after the host:port. - # Do not use port 8443 if you have a UDM. - #url = "https://127.0.0.1:8443" + # Do not use port 8443 if you have a UDM; just use "https://ip". + url = "https://127.0.0.1:8443" # Make a read-only user in the UniFi Admin Settings, allow it access to all sites. - #user = "unifipoller" + user = "unifipoller" + # Password for UniFi controller user (above). # If the password provided here begins with file:// then the password is read in from # the file path that follows the file:// prefix. ex: file:///etc/unifi/password.file # ex: file:///etc/unifi/passwd.file - #pass = "unifipoller" + pass = "unifipoller" # If the controller has more than one site, specify which sites to poll here. # Set this to ["default"] to poll only the first site on the controller. # A setting of ["all"] will poll all sites; this works if you only have 1 site too. - #sites = ["all"] - - # Enable collection of Intrusion Detection System Data (InfluxDB/Loki only). - # Only useful if IDS or IPS are enabled on one of the sites. This may store - # a lot of information. Only recommended for testing and debugging. There - # may not be any dashboards to display this data. It can be used for annotations. - # Enable this only if using InfluxDB or Loki. This will leak PII data! - #save_ids = false - - # Enable collection of UniFi Events (InfluxDB/Loki only). - # This may store a lot of information. Only recommended for testing and debugging. - # There are no dashboards to display this data. It can be used for annotations. - # This is a new (June, 2020) feature. Please provide feedback if you try it out! - # Enable this only if using InfluxDB or Loki. This will leak PII data! - #save_events = false - - # Enable collection of UniFi Alarms (InfluxDB/Loki only). - # There are no dashboards to display this data. It can be used for annotations. - # This is a new (June, 2020) feature. Please provide feedback if you try it out! - # Enable this only if using InfluxDB or Loki. This will leak PII data! - #save_alarms = false - - # Enable collection of UniFi Anomalies (InfluxDB/Loki only). - # There are no dashboards to display this data. It can be used for annotations. - # This is a new (June, 2020) feature. Please provide feedback if you try it out! - # Enable this only if using InfluxDB or Loki. - #save_anomalies = false - - # Enable collection of Deep Packet Inspection data. This data breaks down traffic - # types for each client and site, it powers a dedicated DPI dashboard. - # Enabling this adds roughly 150 data points per client. That's 6000 metrics for - # 40 clients. This adds a little bit of poller run time per interval and causes - # more API requests to your controller(s). Don't let these "cons" sway you: - # it's cool data. Please provide feedback on your experience with this feature. - #save_dpi = false + sites = ["all"] # Enable collection of site data. This data powers the Network Sites dashboard. # It's not valuable to everyone and setting this to false will save resources. @@ -170,9 +123,63 @@ # Hash, with md5, client names and MAC addresses. This attempts to protect # personally identifiable information. Most users won't want to enable this. - #hash_pii = false + hash_pii = false + + # Enable collection of Intrusion Detection System Data (InfluxDB/Loki only). + # Only useful if IDS or IPS are enabled on one of the sites. This may store + # a lot of information. Only recommended for testing and debugging. There + # may not be any dashboards to display this data. It can be used for annotations. + # Enable this only if using InfluxDB or Loki. This will leak PII data! + save_ids = false + + # Enable collection of UniFi Events (InfluxDB/Loki only). + # This may store a lot of information. Only recommended for testing and debugging. + # There are no dashboards to display this data. It can be used for annotations. + # This is a new (June, 2020) feature. Please provide feedback if you try it out! + # Enable this only if using InfluxDB or Loki. This will leak PII data! + save_events = false + + # Enable collection of UniFi Alarms (InfluxDB/Loki only). + # There are no dashboards to display this data. It can be used for annotations. + # This is a new (June, 2020) feature. Please provide feedback if you try it out! + # Enable this only if using InfluxDB or Loki. This will leak PII data! + save_alarms = false + + # Enable collection of UniFi Anomalies (InfluxDB/Loki only). + # There are no dashboards to display this data. It can be used for annotations. + # This is a new (June, 2020) feature. Please provide feedback if you try it out! + # Enable this only if using InfluxDB or Loki. + save_anomalies = false + + # Enable collection of Deep Packet Inspection data. This data breaks down traffic + # types for each client and site, it powers a dedicated DPI dashboard. + # Enabling this adds roughly 150 data points per client. That's 6000 metrics for + # 40 clients. This adds a little bit of poller run time per interval and causes + # more API requests to your controller(s). Don't let these "cons" sway you: + # it's cool data. Please provide feedback on your experience with this feature. + save_dpi = false # If your UniFi controller has a valid SSL certificate (like lets encrypt), # you can enable this option to validate it. Otherwise, any SSL certificate is # valid. If you don't know if you have a valid SSL cert, then you don't have one. - #verify_ssl = false + verify_ssl = false + +# The following is optional and used for configurations with multiple UniFi controllers. + +# You may repeat the following [[unifi.controller]] section as many times as needed to +# poll multiple controllers. Uncomment the entire section including [[unifi.controller]]. +# Omitted variables will have their values taken from the defaults, above. +# +#[[unifi.controller]] +# url = "https://127.0.0.1:8443" +# user = "unifipoller" +# pass = "unifipoller" +# sites = ["all"] +# save_sites = true +# hash_pii = false +# save_ids = false +# save_events = false +# save_alarms = false +# save_anomalies = false +# save_dpi = false +# verify_ssl = false diff --git a/go.mod b/go.mod index 90dae048..1e6d5d41 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/unifi-poller/influxunifi v0.0.10-0.20200703094640-5683cb4d44fb - github.com/unifi-poller/inputunifi v0.0.8-0.20200704070012-feea252994f2 + github.com/unifi-poller/inputunifi v0.0.8-0.20200705100128-2a4815b03dfe github.com/unifi-poller/lokiunifi v0.0.0-20200628212531-964d320957e4 github.com/unifi-poller/poller v0.0.8-0.20200628131550-26430cac16c1 github.com/unifi-poller/promunifi v0.0.9-0.20200630103619-c2b0b27aa0c7 diff --git a/go.sum b/go.sum index 5ec11f24..4f23e96f 100644 --- a/go.sum +++ b/go.sum @@ -134,6 +134,8 @@ github.com/unifi-poller/inputunifi v0.0.8-0.20200630105934-93e63a1b6752 h1:CPPu1 github.com/unifi-poller/inputunifi v0.0.8-0.20200630105934-93e63a1b6752/go.mod h1:iJT8Y3KwSV/ceqOikamlhw2c0EMHTFv47TxKKFThx8I= github.com/unifi-poller/inputunifi v0.0.8-0.20200704070012-feea252994f2 h1:mhjgdc2uAm4941rOxuHGalXf4Gm7VlkfPUextl1+Vfo= github.com/unifi-poller/inputunifi v0.0.8-0.20200704070012-feea252994f2/go.mod h1:06CBPG9YAXgiGHhIk938uquEc3PQu5ysx8O2X1fFwSM= +github.com/unifi-poller/inputunifi v0.0.8-0.20200705100128-2a4815b03dfe h1:nImldZZrNb6WEmglam2IzTppmEKpsDn8Dm4LDxkV0D8= +github.com/unifi-poller/inputunifi v0.0.8-0.20200705100128-2a4815b03dfe/go.mod h1:06CBPG9YAXgiGHhIk938uquEc3PQu5ysx8O2X1fFwSM= github.com/unifi-poller/lokiunifi v0.0.0-20200626040346-12af563d2a99/go.mod h1:7+uUJT6nnXVPad/Omsj+lPD80Cshg4L8TPUkV72JNM8= github.com/unifi-poller/lokiunifi v0.0.0-20200626052645-b0336442237e h1:MoyVcBNks+p1tYCu67UyQycyHpeCqzafWpjMir/Mjh8= github.com/unifi-poller/lokiunifi v0.0.0-20200626052645-b0336442237e/go.mod h1:7+uUJT6nnXVPad/Omsj+lPD80Cshg4L8TPUkV72JNM8=