Test fixes and variable cleanup.
This commit is contained in:
		
							parent
							
								
									dae89a0503
								
							
						
					
					
						commit
						f9358931b5
					
				|  | @ -5,9 +5,13 @@ UNIFI_USERNAME="username" | |||
| UNIFI_PASSWORD="password" | ||||
| 
 | ||||
| # Can be 1m15s for 1 minute 0 seconds, 15s for 15 seconds, etc. | ||||
| TICK_RATE="15s" | ||||
| INTERVAL="15s" | ||||
| 
 | ||||
| INFLUXDB_ADDR="http://hostname:8086" | ||||
| INFLUXDB_DATABASE="unifi" | ||||
| INFLUXDB_USERNAME="unifi" | ||||
| INFLUXDB_PASSWORD="password" | ||||
| 
 | ||||
| export UNIFI_ADDR UNIFI_PORT UNIFI_USERNAME UNIFI_PASSWORD | ||||
| export INTERVAL | ||||
| export INFLUXDB_ADDR INFLUXDB_DATABASE INFLUXDB_USERNAME INFLUXDB_PASSWORD | ||||
|  |  | |||
|  | @ -28,13 +28,13 @@ const ( | |||
| 
 | ||||
| // Config represents the data needed to poll a controller and report to influxdb.
 | ||||
| type Config struct { | ||||
| 	Interval   time.Duration `json:"interval",toml:"interval",yaml:"interval"` | ||||
| 	InfluxURL  string        `json:"influx_url",toml:"influx_addr",yaml:"influx_addr"` | ||||
| 	InfluxUser string        `json:"influx_user",toml:"influx_user",yaml:"influx_user"` | ||||
| 	InfluxPass string        `json:"influx_pass",toml:"influx_pass",yaml:"influx_pass"` | ||||
| 	InfluxDB   string        `json:"influx_db",toml:"influx_db",yaml:"influx_db"` | ||||
| 	UnifiUser  string        `json:"unifi_user",toml:"unifi_user",yaml:"unifi_user"` | ||||
| 	UnifiPass  string        `json:"unifi_pass"toml:"unifi_pass",yaml:"unifi_pass"` | ||||
| 	UnifiBase  string        `json:"unifi_url",toml:"unifi_url",yaml:"unifi_url"` | ||||
| 	Interval   time.Duration `json:"interval" toml:"interval" xml:"interval" yaml:"interval"` | ||||
| 	InfluxURL  string        `json:"influx_url" toml:"influx_addr" xml:"influx_addr" yaml:"influx_addr"` | ||||
| 	InfluxUser string        `json:"influx_user" toml:"influx_user" xml:"influx_user" yaml:"influx_user"` | ||||
| 	InfluxPass string        `json:"influx_pass" toml:"influx_pass" xml:"influx_pass" yaml:"influx_pass"` | ||||
| 	InfluxDB   string        `json:"influx_db" toml:"influx_db" xml:"influx_db" yaml:"influx_db"` | ||||
| 	UnifiUser  string        `json:"unifi_user" toml:"unifi_user" xml:"unifi_user" yaml:"unifi_user"` | ||||
| 	UnifiPass  string        `json:"unifi_pass" toml:"unifi_pass" xml:"unifi_pass" yaml:"unifi_pass"` | ||||
| 	UnifiBase  string        `json:"unifi_url" toml:"unifi_url" xml:"unifi_url" yaml:"unifi_url"` | ||||
| 	uniClient  *http.Client | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue