Metrics.NET icon indicating copy to clipboard operation
Metrics.NET copied to clipboard

.WithReporting(x=>x.WithElasticSearch() Index naming

Open amccool opened this issue 9 years ago • 0 comments

when looking at this for setting up reporting to ElasticSearch .WithElasticSearch(<addr>, 9200, "metrics", TimeSpan.FromSeconds(1))

The argument for the index name is creating a single index, rather than date based index. By using a single index I don't have a way to delete or close older indexes and my elasticsearch server starts to bog down

.WithElasticSearch(<addr>, 9200, ()=>{ return "metrics-" + DateTime.UtcNow.ToString("yyyy-MM-dd");}, TimeSpan.FromSeconds(1))

or something that appended the date to the index name would allow me to roll off the older indexes

amccool avatar Jan 20 '16 06:01 amccool