public MetricsDeclarationBuilder WithFileStorageMetric(string metricName = "promitor", string metricDescription = "Description for a metric", string accountName = "promitor-account", string azureMetricName = "Total", string resourceDiscoveryGroupName = "", bool omitResource = false) { var resource = new FileStorageResourceV1 { AccountName = accountName }; CreateAndAddMetricDefinition(ResourceType.FileStorage, metricName, metricDescription, resourceDiscoveryGroupName, omitResource, azureMetricName, resource); return(this); }
public MetricsDeclarationBuilder WithFileStorageMetric(string metricName = "promitor", string metricDescription = "Description for a metric", string accountName = "promitor-account", string azureMetricName = "Total") { var azureMetricConfiguration = CreateAzureMetricConfiguration(azureMetricName); var resource = new FileStorageResourceV1 { AccountName = accountName }; var metric = new MetricDefinitionV1 { Name = metricName, Description = metricDescription, AzureMetricConfiguration = azureMetricConfiguration, Resources = new List <AzureResourceDefinitionV1> { resource }, ResourceType = ResourceType.FileStorage }; _metrics.Add(metric); return(this); }