Elasticsearch Reporter
Metrics can be reported to ElasticSearch using the App.Metrics.Extensions.Reporting.ElasticSearch nuget package.
- First see the getting started guide.
- Configure the Elasticsearch reporter as follows:
.AddReporting(factory =>
{
factory.AddElasticSearch(new ElasticSearchReporterSettings
{
HttpPolicy = new HttpPolicy
{
FailuresBeforeBackoff = 3,
BackoffPeriod = TimeSpan.FromSeconds(30),
Timeout = TimeSpan.FromSeconds(3)
},
ElasticSearchSettings = new ElasticSearchSettings(new Uri("http://localhost:9200"), "metrics"),
ReportInterval = TimeSpan.FromSeconds(5)
});
})
Web Monitoring
Add an index and the document mappings to Elasticsearch, there are default mappings provided in the github repository for the generic Grafana web dashboards.