Metrics.NET
Metrics.NET copied to clipboard
.WithReporting(x=>x.WithElasticSearch() Index naming
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