var factory = new CarbonApiClusterClientFactory(new SilentLog(), "http://url", "login", "password");
var client = factory.Create();
// Create query by tags with aggregations, alias for the last 15 min
var query = MetricTagQueryBuilder.New()
.AddTag("event", "operations")
.AddTag("name", "processingTime")
.AddTag("application", "(Mercury_Vetis_Proxy)", MetricTagOperator.NotLike)
.AddTag("_aggregate", "p95")
.AddTag("applicationType", "(ProcessIncomingConsignment|PrepareOutgoingConsignment|GetStockEntryChangesList|GetVetDocumentChangesList)", MetricTagOperator.Like)
.AddAggregation(new SummarizeAggregation(Period.FromMinutes((int)this.slowProcessingMovingAverage.TotalMinutes), SummarizeFunc.Min))
.AddAggregation(new AliasByTagsAggregation("applicationType"))
.WithPeriod(Period.FromMinutes(15))
.Build();
// aliasByTags(summarize(seriesByTag('event=operations', 'name=processingTime', 'application!=~(Mercury_Vetis_Proxy)', '_aggregate=p95', 'applicationType=~(ProcessIncomingConsignment|PrepareOutgoingConsignment|GetStockEntryChangesList|GetVetDocumentChangesList)'),'10m', 'min', true), 'applicationType')
var result = await client.GetPointsAsync(query);
-
Notifications
You must be signed in to change notification settings - Fork 0
C# client library for carbon api
License
Backs/CarbonAPI.Client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
C# client library for carbon api