add inputname const

This commit is contained in:
davidnewhall2 2020-06-24 03:11:58 -07:00
parent 37f2f953f8
commit 23fdaf41be
2 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,8 @@ func (u *InputUnifi) pollController(c *Controller) (*poller.Metrics, error) {
// augmentMetrics is our middleware layer between collecting metrics and writing them.
// This is where we can manipuate the returned data or make arbitrary decisions.
// This function currently adds parent device names to client metrics.
// This method currently adds parent device names to client metrics and hashes PII.
// This method also converts our local *Metrics type into a slice of interfaces for poller.
func (u *InputUnifi) augmentMetrics(c *Controller, metrics *Metrics) *poller.Metrics {
if metrics == nil {
return nil

View File

@ -15,6 +15,7 @@ import (
)
const (
PluginName = "unifi" // PluginName is the name of this input plugin.
defaultURL = "https://127.0.0.1:8443"
defaultUser = "unifipoller"
defaultPass = "unifipoller"
@ -67,7 +68,7 @@ func init() { // nolint: gochecknoinits
u := &InputUnifi{}
poller.NewInput(&poller.InputPlugin{
Name: "unifi",
Name: PluginName,
Input: u, // this library implements poller.Input interface for Metrics().
Config: u, // Defines our config data interface.
})