Documentation ¶
Index ¶
- Variables
- type Config
- func (c *Config) InstanceKey(_ string) (string, error)
- func (c *Config) Name() string
- func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
- func (c *Config) ToScrapeSettings() (*metrics.RequestMetricSettings, error)
- func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (c *Config) Validate() error
- type Exporter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Timespan: "PT1M", MetricNameTemplate: "azure_{type}_{metric}_{aggregation}_{unit}", MetricHelpTemplate: "Azure metric {metric} for {type} with aggregation {aggregation} as {unit}", IncludedResourceTags: []string{"owner"}, AzureCloudEnvironment: "azurecloud", ValidateDimensions: false, }
DefaultConfig holds the default settings for the azure_exporter integration.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Subscriptions []string `yaml:"subscriptions"` // Required ResourceGraphQueryFilter string `yaml:"resource_graph_query_filter"` // Optional Regions []string `yaml:"regions"` // Optional // Valid values can be derived from https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported // Required: Root level names ex. Microsoft.DataShare/accounts ResourceType string `yaml:"resource_type"` // Required: Metric in the table for a ResourceType Metrics []string `yaml:"metrics"` // Optional: If not provided Aggregation Type is used for the Metric // Valid values are minimum, maximum, average, total, and count MetricAggregations []string `yaml:"metric_aggregations"` // All fields below are optional // Must be an ISO8601 Duration - defaults to PT1M if not specified Timespan string `yaml:"timespan"` IncludedDimensions []string `yaml:"included_dimensions"` IncludedResourceTags []string `yaml:"included_resource_tags"` // MetricNamespace is used for ResourceTypes which have multiple levels of metrics // As an example the ResourceType Microsoft.Storage/storageAccounts has metrics for // Microsoft.Storage/storageAccounts (generic metrics which apply to all storage accounts) // Microsoft.Storage/storageAccounts/blobServices (generic metrics + metrics which only apply to blob stores) // Microsoft.Storage/storageAccounts/fileServices (generic metrics + metrics which only apply to file stores) // Microsoft.Storage/storageAccounts/queueServices (generic metrics + metrics which only apply to queue stores) // Microsoft.Storage/storageAccounts/tableServices (generic metrics + metrics which only apply to table stores) // If you want blob store metrics you will need to set // ResourceType = Microsoft.Storage/storageAccounts // MetricNamespace = Microsoft.Storage/storageAccounts/blobServices MetricNamespace string `yaml:"metric_namespace"` MetricNameTemplate string `yaml:"metric_name_template"` MetricHelpTemplate string `yaml:"metric_help_template"` ValidateDimensions bool `yaml:"validate_dimensions"` AzureCloudEnvironment string `yaml:"azure_cloud_environment"` }
func MergeConfigWithQueryParams ¶
MergeConfigWithQueryParams will map values from params which where the key matches a yaml tag of the Config struct
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
func (*Config) ToScrapeSettings ¶
func (c *Config) ToScrapeSettings() (*metrics.RequestMetricSettings, error)
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config.
type Exporter ¶
type Exporter struct { ConcurrencyConfig azure_config.Opts // contains filtered or unexported fields }
func (Exporter) ScrapeConfigs ¶
func (e Exporter) ScrapeConfigs() []config.ScrapeConfig
Click to show internal directories.
Click to hide internal directories.