Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KeyEnabled toggles whether the Azure module is active or not. KeyEnabled = "azure.enabled" // DefaultEnabled defines the default setting. DefaultEnabled = false // KeyConfDir defines the azure configuration directory. KeyConfDir = "azure.conf_dir" // KeyConfExample shows an example configuration. KeyConfExample = "azure.config_example" )
Variables ¶
View Source
var ( // DefaultConfDir is the default location of azure configuration files. DefaultConfDir = path.Join(defaults.EtcPath, "azure.d") )
Functions ¶
This section is empty.
Types ¶
type AzureConfig ¶
type AzureConfig struct { DirectoryID string `json:"directory_id" toml:"directory_id" yaml:"directory_id"` // aka tenant id ApplicationID string `json:"application_id" toml:"application_id" yaml:"application_id"` // aka client id ApplicationSecret string `json:"application_secret" toml:"application_secret" yaml:"application_secret"` // aka client secret SubscriptionID string `json:"subscription_id" toml:"subscription_id" yaml:"subscription_id"` // azure subscription id ResourceFilter string `json:"resource_filter" toml:"resource_filter" yaml:"resource_filter"` // filter expression for which resources to collect metrics about -- limit resources from which metrics are collected, otherwise **ALL** metrics from **ALL** resources will be collected. Suggested method, add a tag to each resource from which to collect metrics (e.g. Tag Name:circonus and Tag Value:enabled) then use the expression: `tagName eq 'circonus' and tagValue eq 'enabled'` CloudName string `json:"cloud_name" toml:"cloud_name" yaml:"cloud_name"` // DEFAULT: "AzurePublicCloud" UserAgent string `json:"user_agent" toml:"user_agent" yaml:"user_agent"` // DEFAULT: "circonus-cloud-agent" Interval int `json:"collect_interval" toml:"collect_interval" yaml:"collect_interval"` // DEFAULT: 5 - How often to collect metrics.(minutes >= 5) }
AzureConfig defines the Azure sdk credentials.
type AzureService ¶
type AzureService struct {
// contains filtered or unexported fields
}
AzureService defines the Azure cloud service client.
func New ¶
func New(ctx context.Context) (*AzureService, error)
New returns an Azure cloud service metric collection client.
func (*AzureService) Enabled ¶
func (svc *AzureService) Enabled() bool
Enabled indicates whether the Azure service is enabled.
func (*AzureService) Scan ¶
func (svc *AzureService) Scan() error
Scan checks the service config directory for configurations and loads them.
func (*AzureService) Start ¶
func (svc *AzureService) Start() error
Start begins collecting metrics from Azure.
type Config ¶
type Config struct { ID string `json:"id" toml:"id" yaml:"id"` // unique id for this service client instance, no spaces (ties several things together, short and immutable - logging, check search/create, tags, etc.) Azure AzureConfig `json:"azure" toml:"azure" yaml:"azure"` // REQUIRED, azure configuration Circonus circonus.ServiceConfig `json:"circonus" toml:"circonus" yaml:"circonus"` // REQUIRED, circonus config: api credentials, check, broker, etc. Tags circonus.Tags `json:"tags" toml:"tags" yaml:"tags"` // global tags, added to all metrics }
Config for instance of Azure metric collection service.
Click to show internal directories.
Click to hide internal directories.