github.com/influxdata/influxdb/v2@v2.7.6/telegraf/plugins/inputs/system.go (about)

     1  package inputs
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  // SystemStats is based on telegraf SystemStats.
     8  type SystemStats struct {
     9  	baseInput
    10  }
    11  
    12  // PluginName is based on telegraf plugin name.
    13  func (s *SystemStats) PluginName() string {
    14  	return "system"
    15  }
    16  
    17  // TOML encodes to toml string
    18  func (s *SystemStats) TOML() string {
    19  	return fmt.Sprintf(`[[inputs.%s]]
    20    ## Uncomment to remove deprecated metrics.
    21    # fielddrop = ["uptime_format"]
    22  `, s.PluginName())
    23  }
    24  
    25  // UnmarshalTOML decodes the parsed data to the object
    26  func (s *SystemStats) UnmarshalTOML(data interface{}) error {
    27  	return nil
    28  }