Fix defaults

This commit is contained in:
davidnewhall2 2020-02-03 00:10:00 -08:00
parent 5d7a2905ec
commit 2e252b5069
7 changed files with 34 additions and 22 deletions

View File

@ -72,7 +72,7 @@ Configuration file (up.conf) parameters are documented in the wiki.
`Shell Environment Parameters` `Shell Environment Parameters`
This application can be fully configured using shell environment variables. This application can be fully configured using shell environment variables.
Find documentation for this feature on the Docker Wiki page. Find documentation for this feature on the Docker Wiki page, and the above Configuration wiki.
* [https://github.com/unifi-poller/unifi-poller/wiki/Docker](https://github.com/unifi-poller/unifi-poller/wiki/Docker) * [https://github.com/unifi-poller/unifi-poller/wiki/Docker](https://github.com/unifi-poller/unifi-poller/wiki/Docker)
@ -96,6 +96,6 @@ AUTHOR
LOCATION LOCATION
--- ---
* UniFi Poller: [https://github.com/unifi-poller/unifi-poller](https://github.com/unifi-poller/unifi-poller) * UniFi Poller: [https://golift.io/unifi-poller/](https://golift.io/unifi-poller/)
* UniFi Library: [https://github.com/golift/unifi](https://github.com/golift/unifi) * UniFi Library: [https://github.com/unifi-poller/unifi](https://github.com/unifi-poller/unifi)
* Grafana Dashboards: [https://grafana.com/dashboards?search=unifi-poller](https://grafana.com/dashboards?search=unifi-poller) * Grafana Dashboards: [https://grafana.com/dashboards?search=unifi-poller](https://grafana.com/dashboards?search=unifi-poller)

View File

@ -61,9 +61,9 @@
# The following section contains the default credentials/configuration for any # The following section contains the default credentials/configuration for any
# dynamic controller (see above section), or the primary controller if you do not # dynamic controller (see above section), or the primary controller if you do not
# provide one and dynamic is disabled. In other words, you can just add your # provide one and dynamic is disabled. In other words, you can just add your
# controller here and delete the following section. Either works. # controller here and delete the following section.
[unifi.defaults] [unifi.defaults]
role = "https://127.0.0.1:8443" #role = "main controller"
url = "https://127.0.0.1:8443" url = "https://127.0.0.1:8443"
user = "unifipoller" user = "unifipoller"
pass = "unifipoller" pass = "unifipoller"
@ -73,26 +73,28 @@
save_sites = true save_sites = true
verify_ssl = false verify_ssl = false
# You may repeat the following section to poll additional controllers. # The following is optional and used for configurations with multiple controllers.
[[unifi.controller]]
# You may repeat the following section to poll multiple controllers.
#[[unifi.controller]]
# Friendly name used in dashboards. Uses URL if left empty; which is fine. # Friendly name used in dashboards. Uses URL if left empty; which is fine.
# Avoid changing this later because it will live forever in your database. # Avoid changing this later because it will live forever in your database.
# Multiple controllers may share a role. This allows grouping during scrapes. # Multiple controllers may share a role. This allows grouping during scrapes.
role = "" #role = ""
#url = "https://127.0.0.1:8443"
url = "https://127.0.0.1:8443" # Make a read-only user in the UniFi Admin Settings, allow it access to all sites.
# Make a read-only user in the UniFi Admin Settings. #user = "unifipoller"
user = "unifipoller" #pass = "4BB9345C-2341-48D7-99F5-E01B583FF77F"
pass = "4BB9345C-2341-48D7-99F5-E01B583FF77F"
# If the controller has more than one site, specify which sites to poll here. # 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. # 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. # A setting of ["all"] will poll all sites; this works if you only have 1 site too.
sites = ["all"] #sites = ["all"]
# Enable collection of Intrusion Detection System Data (InfluxDB only). # Enable collection of Intrusion Detection System Data (InfluxDB only).
# Only useful if IDS or IPS are enabled on one of the sites. # Only useful if IDS or IPS are enabled on one of the sites.
save_ids = false #save_ids = false
# Enable collection of Deep Packet Inspection data. This data breaks down traffic # Enable collection of Deep Packet Inspection data. This data breaks down traffic
# types for each client and site, it powers a dedicated DPI dashboard. # types for each client and site, it powers a dedicated DPI dashboard.
@ -100,13 +102,13 @@
# 40 clients. This adds a little bit of poller run time per interval and causes # 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: # 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. # it's cool data. Please provide feedback on your experience with this feature.
save_dpi = false #save_dpi = false
# Enable collection of site data. This data powers the Network Sites dashboard. # 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. # It's not valuable to everyone and setting this to false will save resources.
save_sites = true #save_sites = true
# If your UniFi controller has a valid SSL certificate (like lets encrypt), # 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 # 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. # 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

View File

@ -24,7 +24,7 @@
"unifi": { "unifi": {
"dynamic": false, "dynamic": false,
"defaults": { "defaults": {
"role": "https://127.0.0.1:8443", "role": "main controller",
"user": "unifipoller", "user": "unifipoller",
"pass": "unifipoller", "pass": "unifipoller",
"url": "https://127.0.0.1:8443", "url": "https://127.0.0.1:8443",

View File

@ -26,7 +26,7 @@
</influxdb> </influxdb>
<unifi dynamic="false"> <unifi dynamic="false">
<default role="https://127.0.0.1:8443"> <default role="main controller">
<site>all</site> <site>all</site>
<user>unifipoller</user> <user>unifipoller</user>
<pass>unifipoller</pass> <pass>unifipoller</pass>

View File

@ -27,7 +27,7 @@ influxdb:
unifi: unifi:
dynamic: false dynamic: false
defaults: defaults:
role: "https://127.0.0.1:8443" role: "main controller"
user: "unifipoller" user: "unifipoller"
pass: "unifipoller" pass: "unifipoller"
url: "https://127.0.0.1:8443" url: "https://127.0.0.1:8443"
@ -40,7 +40,7 @@ unifi:
controllers: controllers:
# Repeat the following stanza to poll more controllers. # Repeat the following stanza to poll multiple controllers.
- role: "" - role: ""
user: "unifipoller" user: "unifipoller"
pass: "unifipoller" pass: "unifipoller"

2
go.mod
View File

@ -9,7 +9,7 @@ require (
github.com/russross/blackfriday v2.0.0+incompatible // indirect github.com/russross/blackfriday v2.0.0+incompatible // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/unifi-poller/influxunifi v0.0.7 github.com/unifi-poller/influxunifi v0.0.7
github.com/unifi-poller/inputunifi v0.0.6-0.20200203055955-411a49dea2e7 github.com/unifi-poller/inputunifi v0.0.6-0.20200203080812-1b1ca43c1490
github.com/unifi-poller/poller v0.0.5-0.20200203042411-c58679b76f5c github.com/unifi-poller/poller v0.0.5-0.20200203042411-c58679b76f5c
github.com/unifi-poller/promunifi v0.0.6-0.20200202075223-eecff9bfcebd github.com/unifi-poller/promunifi v0.0.6-0.20200202075223-eecff9bfcebd
github.com/unifi-poller/unifi v0.0.3 github.com/unifi-poller/unifi v0.0.3

10
go.sum
View File

@ -72,6 +72,16 @@ github.com/unifi-poller/inputunifi v0.0.5 h1:go+5j7WS1y0N/2pKKPvjzn8bkPpFXurQnoY
github.com/unifi-poller/inputunifi v0.0.5/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo= github.com/unifi-poller/inputunifi v0.0.5/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203055955-411a49dea2e7 h1:CXMB+6tTJJZEoyMmH24PN/7evm3yuvily9Df4sujeT0= github.com/unifi-poller/inputunifi v0.0.6-0.20200203055955-411a49dea2e7 h1:CXMB+6tTJJZEoyMmH24PN/7evm3yuvily9Df4sujeT0=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203055955-411a49dea2e7/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo= github.com/unifi-poller/inputunifi v0.0.6-0.20200203055955-411a49dea2e7/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203073303-9a4abc68dbf8 h1:r0NwfuSckW1tcks5W0+KU237xTBbnSSAJY00HMd31V4=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203073303-9a4abc68dbf8/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203074209-4beb50226323 h1:HKBFcf3MgSgfIgcob8p2XJOCU4tf0+AIM1WjjsvDY5c=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203074209-4beb50226323/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203075041-4b96f410f180 h1:uUCfjvmQ10oowfRXTZ4oZHz75eAc0Ew/oSr/KeiK8Yc=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203075041-4b96f410f180/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203075348-02041fb04441 h1:UeK8p75w8YaBr/CqiZktHXUoTQcw1vcfnvbSCpwF2Jw=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203075348-02041fb04441/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203080812-1b1ca43c1490 h1:4IJhm8I28aRoXKaftx146vSqipTauyyFbx5YmmU9Nq8=
github.com/unifi-poller/inputunifi v0.0.6-0.20200203080812-1b1ca43c1490/go.mod h1:X1Vd5uAtO5etZveY0WpMVMQBM/iLoMwZ/SvN1iXLxHo=
github.com/unifi-poller/poller v0.0.3/go.mod h1:ugy3FyZEH1rFyC3panBiJpXbLf7EZ4GkjiOtydB2CwQ= github.com/unifi-poller/poller v0.0.3/go.mod h1:ugy3FyZEH1rFyC3panBiJpXbLf7EZ4GkjiOtydB2CwQ=
github.com/unifi-poller/poller v0.0.4 h1:TYCdQeCYwUmmFcj1H75iGKAFbAOBFwo/XIJDX2Id+cY= github.com/unifi-poller/poller v0.0.4 h1:TYCdQeCYwUmmFcj1H75iGKAFbAOBFwo/XIJDX2Id+cY=
github.com/unifi-poller/poller v0.0.4/go.mod h1:LbOCEdNth7invhaOTpcadW/sDlD2WsU+IE3GRXKzOCg= github.com/unifi-poller/poller v0.0.4/go.mod h1:LbOCEdNth7invhaOTpcadW/sDlD2WsU+IE3GRXKzOCg=