fix tests
This commit is contained in:
		
							parent
							
								
									1def43a4be
								
							
						
					
					
						commit
						4e48247f54
					
				|  | @ -11,7 +11,7 @@ HBREPO="golift/homebrew-mugs" | |||
| MAINT="David Newhall II <david at sleepers dot pro>" | ||||
| VENDOR="Go Lift <code at golift dot io>" | ||||
| DESC="Polls a UniFi controller, exports metrics to InfluxDB and Prometheus" | ||||
| GOLANGCI_LINT_ARGS="--enable-all -D gochecknoglobals -D dupl -D lll -D funlen -D wsl -e G402" | ||||
| GOLANGCI_LINT_ARGS="--enable-all -D gochecknoglobals -D dupl -D lll -D funlen -D wsl -e G402 -D gochecknoinits" | ||||
| # Example must exist at examples/$CONFIG_FILE.example | ||||
| CONFIG_FILE="up.conf" | ||||
| LICENSE="MIT" | ||||
|  |  | |||
|  | @ -91,7 +91,7 @@ func (u *UnifiPoller) Run() error { | |||
| 			u.Logf("Polling UniFi Controller at %s v%s as user %s. Sites: %v", | ||||
| 				c.URL, c.Unifi.ServerVersion, c.User, c.Sites) | ||||
| 		default: | ||||
| 			u.LogErrorf("Controller Auth or Connection failed, but continuing to retry! %s: %v", c.URL, err) | ||||
| 			u.LogErrorf("Controller Auth or Connection failed, but continuing to retry! %s: %v", c.Name, err) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -44,16 +44,16 @@ type Prometheus struct { | |||
| 
 | ||||
| // Config is the input (config file) data used to initialize this output plugin.
 | ||||
| type Config struct { | ||||
| 	Disable bool `json:"disable" toml:"disable" xml:"disable" yaml:"disable"` | ||||
| 	// If non-empty, each of the collected metrics is prefixed by the
 | ||||
| 	// provided string and an underscore ("_").
 | ||||
| 	Namespace string `json:"namespace" toml:"namespace" xml:"namespace" yaml:"namespace"` | ||||
| 	Namespace  string `json:"namespace" toml:"namespace" xml:"namespace" yaml:"namespace"` | ||||
| 	HTTPListen string `json:"http_listen" toml:"http_listen" xml:"http_listen" yaml:"http_listen"` | ||||
| 	// If true, any error encountered during collection is reported as an
 | ||||
| 	// invalid metric (see NewInvalidMetric). Otherwise, errors are ignored
 | ||||
| 	// and the collected metrics will be incomplete. Possibly, no metrics
 | ||||
| 	// will be collected at all.
 | ||||
| 	ReportErrors bool   `json:"report_errors" toml:"report_errors" xml:"report_errors" yaml:"report_errors"` | ||||
| 	HTTPListen   string `json:"http_listen" toml:"http_listen" xml:"http_listen" yaml:"http_listen"` | ||||
| 	ReportErrors bool `json:"report_errors" toml:"report_errors" xml:"report_errors" yaml:"report_errors"` | ||||
| 	Disable      bool `json:"disable" toml:"disable" xml:"disable" yaml:"disable"` | ||||
| } | ||||
| 
 | ||||
| type metric struct { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue