config

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WindowsPerfMetricFile      = "C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\vsphere-performance.metrics"
	LinuxDefaultPerfMetricFile = "/etc/newrelic-infra/integrations.d/vsphere-performance.metrics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentList

type ArgumentList struct {
	sdkArgs.DefaultArgumentList
	Local              bool   `default:"true" help:"Collect local entity info"`
	Entity             string `default:"" help:"Manually set a remote entity name"`
	URL                string `default:"" help:"Required: ESXi or vCenter SDK URL eg. https://172.16.53.129/sdk"`
	User               string `default:"" help:"Required: Username"`
	Pass               string `default:"" help:"Required: Password"`
	DatacenterLocation string `default:"" help:"Datacenter Location of your vCenter or ESXi Host eg. sydney-ultimo"`

	EnableVsphereEvents bool   `default:"false" help:"Set to collect vSphere events"`
	EventsPageSize      string `default:"100" help:"Number of events fetched from the vCenter in each call"`

	EnableVspherePerfMetrics bool   `default:"false" help:"Set to collect vSphere performance metrics"`
	PerfLevel                int    `default:"1" help:"Performance counter level of performance metrics that will be collected"`
	LogAvailableCounters     bool   `default:"false" help:"Print available performance metrics"`
	PerfMetricFile           string `default:"" help:"Location of performance metrics configuration file"`

	//As a general rule, specify between 10 and 50 entities in a single call to the QueryPerf method.
	//This is a general recommendation because your system configuration may impose different
	//constraints.
	//https://vdc-download.vmware.com/vmwb-repository/dcr-public/cdbbd51c-4824-4a1b-ad43-45df55a76a76/8cb3ed93-cac2-46aa-b329-db5a096af5bc/vsphere-web-services-sdk-67-programming-guide.pdf
	BatchSizePerfEntities string `default:"50" help:"Number of entities requested at the same time when querying performance metrics"`
	BatchSizePerfMetrics  string `default:"50" help:"Number of metrics requested at the same time when querying performance metrics"`

	EnableVsphereTags      bool `default:"false" help:"Set to collect tags. Tags are available when connecting to vcenter"`
	EnableVsphereSnapshots bool `default:"false" help:"Set to collect and process VMs Snapshots data"`
	ValidateSSL            bool `default:"false" help:"Set to validates SSL when connecting to vCenter or Esxi Host"`
	ShowVersion            bool `default:"false" help:"Print build information and exit"`

	IncludeTags string `` /* 302-byte string literal not displayed */
}

ArgumentList Available Arguments

type Config

type Config struct {
	Args                 ArgumentList
	Integration          *integration.Integration // Integration Infrastructure SDK Integration
	Entity               *integration.Entity      // Entity Infrastructure SDK Entity
	Hostname             string                   // Hostname current host
	Logrus               *logrus.Logger           // Logrus create instance of the logger
	IntegrationName      string                   // IntegrationName name of integration
	IntegrationNameShort string                   // IntegrationNameShort Short Name
	IntegrationVersion   string                   // IntegrationVersion Version
	VMWareClient         *govmomi.Client          // VMWareClient Client
	ViewManager          *view.Manager            // ViewManager Client
	TagCollector         *tag.Collector           // TagsManager Client
	Datacenters          []*model.Datacenter      // Datacenters VMWare
	IsVcenterAPIType     bool                     // IsVcenterAPIType true if connecting to vcenter
	PerfCollector        *performance.PerfCollector
	// contains filtered or unexported fields
}

func New

func New(buildVersion string) *Config

func (*Config) EventCollectionEnabled

func (c *Config) EventCollectionEnabled() bool

func (*Config) PerfMetricsCollectionEnabled

func (c *Config) PerfMetricsCollectionEnabled() bool

func (*Config) TagCollectionEnabled

func (c *Config) TagCollectionEnabled() bool

func (*Config) TagFilteringEnabled

func (c *Config) TagFilteringEnabled() bool

func (*Config) Uptime

func (c *Config) Uptime() time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL