Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ActiveDirectoryAuthorityURL string `yaml:"active_directory_authority_url"`
ResourceManagerURL string `yaml:"resource_manager_url"`
Credentials Credentials `yaml:"credentials"`
Targets []Target `yaml:"targets"`
ResourceGroups []ResourceGroup `yaml:"resource_groups"`
ResourceTags []ResourceTag `yaml:"resource_tags"`
// Catches all undefined fields and must be empty after parsing.
XXX map[string]interface{} `yaml:",inline"`
}
Config - Azure exporter configuration
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Credentials ¶
type Credentials struct {
SubscriptionID string `yaml:"subscription_id"`
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
TenantID string `yaml:"tenant_id"`
XXX map[string]interface{} `yaml:",inline"`
}
Credentials - Azure credentials
func (*Credentials) UnmarshalYAML ¶
func (s *Credentials) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Metric ¶
Metric defines metric name
func (*Metric) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Regexp ¶
Regexp encapsulates a regexp.Regexp and makes it YAML marshalable.
func (*Regexp) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type ResourceGroup ¶
type ResourceGroup struct {
ResourceGroup string `yaml:"resource_group"`
MetricNamespace string `yaml:"metric_namespace"`
ResourceTypes []string `yaml:"resource_types"`
ResourceNameIncludeRe []Regexp `yaml:"resource_name_include_re"`
ResourceNameExcludeRe []Regexp `yaml:"resource_name_exclude_re"`
Metrics []Metric `yaml:"metrics"`
Aggregations []string `yaml:"aggregations"`
XXX map[string]interface{} `yaml:",inline"`
}
ResourceGroup represents Azure target resource group and its associated metric definitions
func (*ResourceGroup) UnmarshalYAML ¶
func (s *ResourceGroup) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type ResourceTag ¶
type ResourceTag struct {
ResourceTagName string `yaml:"resource_tag_name"`
ResourceTagValue string `yaml:"resource_tag_value"`
MetricNamespace string `yaml:"metric_namespace"`
ResourceTypes []string `yaml:"resource_types"`
Metrics []Metric `yaml:"metrics"`
Aggregations []string `yaml:"aggregations"`
XXX map[string]interface{} `yaml:",inline"`
}
ResourceTag selects resources with tag name and tag value
type SafeConfig ¶
SafeConfig - mutex protected config for live reloads.
func (*SafeConfig) ReloadConfig ¶
func (sc *SafeConfig) ReloadConfig(confFile string) (err error)
ReloadConfig - allows for live reloads of the configuration file.
type Target ¶
type Target struct {
Resource string `yaml:"resource"`
MetricNamespace string `yaml:"metric_namespace"`
Metrics []Metric `yaml:"metrics"`
Aggregations []string `yaml:"aggregations"`
XXX map[string]interface{} `yaml:",inline"`
}
Target represents Azure target resource and its associated metric definitions
func (*Target) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.