Skip to content

Metrics for .Net reporting to ElasticSearch with visualization in Grafana dashboard (main target for WCF)

License

Notifications You must be signed in to change notification settings

memores/Memores.Metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memores.Metrics

Metrics for .Net reporting to ElasticSearch

Memores.Metrics.Wcf

Description

This project contains some metrics for WCF services with reporting results to ElasticSearch with Grafana visualization.

How to use

  1. Install package
Install-Package Memores.Metrics.Wcf -Version 0.0.2-alpha
  1. Add to web.config behavior extension element for endpoint and service behavior
  <system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="elasticEndpointBehavior" type=" Memores.Metrics.Wcf.ExtentionElements.EndpointBehaviorExtentionElement, Memores.Metrics.Wcf, Version=1.0.0.0, Culture=neutral"/>
        <add name="elasticServiceBehavior" type=" Memores.Metrics.Wcf.ExtentionElements.ServiceBehaviorExtentionElement, Memores.Metrics.Wcf, Version=1.0.0.0, Culture=neutral"/>
      </behaviorExtensions>
    </extensions>
  </system.serviceModel>
  1. Add endpoint and service behavior with ElasticSearch settings such as host, port and index name
    <behaviors>
      <endpointBehaviors>
        <behavior>
          <elasticEndpointBehavior hostname="http://localhost" port="9200" index="wcfsample" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior>          
          <elasticServiceBehavior hostname="http://localhost" port="9200" index="wcfsample" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  1. Start your service and make requests.

Visualization

  1. Import to your Grafana dashboard from https://github.com/memores/Memores.Metrics/tree/master/visualization
  2. Add data source and setup it in dashboard

About

Metrics for .Net reporting to ElasticSearch with visualization in Grafana dashboard (main target for WCF)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages