All Projects → Xabaril → Beatpulse

Xabaril / Beatpulse

Licence: apache-2.0
Liveness, health check library for ASP.NET Core Applications

Projects that are alternatives of or similar to Beatpulse

Util
Util是一个.net core平台下的应用框架,旨在提升小型团队的开发输出能力,由常用公共操作类(工具类)、分层架构基类、Ui组件,第三方组件封装,第三方业务接口封装,配套代码生成模板,权限等组成。
Stars: ✭ 3,874 (+533.01%)
Mutual labels:  aspnetcore
Rockpaperscissorslizardspock
Rock, Paper, Scissors, Lizard, Spock - Sample Application
Stars: ✭ 477 (-22.06%)
Mutual labels:  aspnetcore
Aspnet.security.openidconnect.server
OpenID Connect/OAuth2 server framework for OWIN/Katana and ASP.NET Core
Stars: ✭ 544 (-11.11%)
Mutual labels:  aspnetcore
Module Shop
一个基于 .NET Core构建的简单、跨平台、模块化的商城系统
Stars: ✭ 398 (-34.97%)
Mutual labels:  aspnetcore
Goss
Quick and Easy server testing/validation
Stars: ✭ 4,550 (+643.46%)
Mutual labels:  health-check
Angularwebpackvisualstudio
Template for ASP.NET Core, Angular with Webpack and Visual Studio
Stars: ✭ 497 (-18.79%)
Mutual labels:  aspnetcore
Taghelpersamples
A set of sample tag helpers for ASP.NET Core MVC
Stars: ✭ 350 (-42.81%)
Mutual labels:  aspnetcore
Sieve
⚗️ Clean & extensible Sorting, Filtering, and Pagination for ASP.NET Core
Stars: ✭ 560 (-8.5%)
Mutual labels:  aspnetcore
Finbuckle.multitenant
Finbuckle.MultiTenant is an open source multitenancy library for .NET. It provides tenant resolution, per-tenant app behavior, and per-tenant data isolation.
Stars: ✭ 478 (-21.9%)
Mutual labels:  aspnetcore
Dotvvm
Open source MVVM framework for Web Apps
Stars: ✭ 523 (-14.54%)
Mutual labels:  aspnetcore
Abp Samples
Sample solutions built with the ABP Framework
Stars: ✭ 417 (-31.86%)
Mutual labels:  aspnetcore
Nswag
The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
Stars: ✭ 4,825 (+688.4%)
Mutual labels:  aspnetcore
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+736.6%)
Mutual labels:  aspnetcore
Automatron
Infrastructure monitoring framework turning DevOps runbooks into automated actions
Stars: ✭ 381 (-37.75%)
Mutual labels:  health-check
Aspnetcore
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
Stars: ✭ 26,779 (+4275.65%)
Mutual labels:  aspnetcore
Epplus.core
EPPlus.Core is an unofficial port of the EPPlus library to .NET Core
Stars: ✭ 354 (-42.16%)
Mutual labels:  aspnetcore
Netcorebbs
ASP.NET Core Light forum NETCoreBBS
Stars: ✭ 483 (-21.08%)
Mutual labels:  aspnetcore
Asp.net Core Template
A ready-to-use template for ASP.NET Core with repositories, services, models mapping, DI and StyleCop warnings fixed.
Stars: ✭ 599 (-2.12%)
Mutual labels:  aspnetcore
Awesome Blazor
Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Stars: ✭ 6,063 (+890.69%)
Mutual labels:  aspnetcore
Beautifulrestapi
Beautiful REST API design with ASP.NET Core and Ion
Stars: ✭ 512 (-16.34%)
Mutual labels:  aspnetcore

Build status NuGet

Build history

[DEPRECATED] Beat Pulse

IMPORTANT UPDATE

Beatpulse project was created to fill a gap in Asp.Net Core ecosystem when no health checks libraries were available.

Now that Microsoft is rolling out their own health checks integration, the Beatpulse project will be focused in contributing towards this library.

All liveness, UI and Beatpulse features are already available as extensions for the new Microsoft health checks package in this repository:

Xabaril - AspNetCore.Diagnostics.HealthChecks

Support

The team will continue to provide support to Beatpulse until version 3.0 with .Net Core version 2.1 but no new features will be added in this repository.

What is Health Checking?

Health checking is the process where load balancers or application delivery controller does periodic checks on our applications to make sure that they are up and responding without any problems. If our applications are down for whatever reason or any of the systems that our applications depends on (A database, a distributed cache, web service, ect) are down, the load balancer, k8s, should detect this and stop sending traffic its way trying to restore services manually or automatically.

BeatPulse is a powerfull liveness, readiness library for .NET Core Applications with many out of box enterprise health check services.

Getting Started

This documentation is for BeatPulse latest version, you can check changes and package compatibility on ChangeLog.

  1. Install the Nuget Package into your ASP.NET Core application.
Install-Package BeatPulse
  1. Install the liveness libraries that you need on your project. At this moment BeatPulse contains NuGet libraries for:
  • System (Disk Storage, Memory)
  • Network (Tcp, Ftp, Sftp, Imap, Smtp, Dns resolve)
  • Redis
  • Elasticsearch
  • SqlServer
  • MongoDb
  • Postgress Sql
  • EventStore
  • Oracle
  • Azure Storage (Blobs, Tables and Queues)
  • Azure Service Bus (Event Hub, Service Bus queues and topics)
  • DocumentDb
  • MySQL
  • SqLite
  • Kafka
  • RabbitMQ
  • Identity Server
  • AWS DynamoDB
  • Custom lambda liveness.
Install-Package BeatPulse.System
Install-Package BeatPulse.Network
Install-Package BeatPulse.SqlServer
Install-Package BeatPulse.MongoDb
Install-Package BeatPulse.Npgsql
Install-Package BeatPulse.Elasticsearch
Install-Package BeatPulse.EventStore
Install-Package BeatPulse.Redis
Install-Package BeatPulse.AzureStorage
Install-Package BeatPulse.AzureServiceBus
Install-Package BeatPulse.MySql
Install-Package BeatPulse.DocumentDb
Install-Package BeatPulse.SqLite
Install-Package BeatPulse.Kafka
Install-Package BeatPulse.RabbitMQ
Install-Package BeatPulse.IdSvr
Install-Package BeatPulse.DynamoDB
Install-Package BeatPulse.Oracle
  1. Add BeatPulse into your ASP.NET Core project. UseBeatPulse is a new IWebHostBuilder extension method to register and configure BeatPulse.
 public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
               .UseBeatPulse(options=>
                {
                   options.ConfigurePath(path:"health") //default hc
                        .ConfigureTimeout(milliseconds:1500) // default -1 infinitely
                        .ConfigureDetailedOutput(detailedOutput:true,includeExceptionMessages:true); //default (true,false)
                }).UseStartup<Startup>().Build();
  1. Add BeatPulseService and set the liveness libraries to be used.
    services.AddBeatPulse(setup =>
    {
        //add sql server liveness
        setup.AddSqlServer("your-connection-string");
    });
  1. Request BeatPulse to get liveness results.
curl http://your-domain/hc 
GET /hc HTTP/1.1
Host: your-domain
User-Agent: curl/7.49.0
Accept: */*
HTTP/1.1 200 OK
OK

For more information about BeatPulse configuration and other features ( configuration, cache, authentication, etc ) see the specific documentation section.

Tracking pulses

With TrackingPulses you can save liveness information in external services. Currently we have developed different trackers you can use:

Application Insights Tracker

Prometheus Tracker

StatusPage Tracker

UI

The project BeatPulse.UI is a minimal UI interface that stores and shows the liveness results from the configured liveness uri's. To integrate BeatPulse.UI in your project you just need to add the BeatPulse.UI services and middlewares.

    public class Startup
    {       
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddBeatPulseUI();
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseBeatPulseUI();
        }
    }

This automatically registers a new interface on /beatpulse-ui.

Optionally, UseBeatPulseUI can be configured with different UI response path.

BeatPulseUI

BeatPulseUI is also available as a docker image You can read more about beat pulse ui docker image.

Configuration

The liveness to be used on BeatPulse-UI are configured using the BeatPulse-UI settings.

{
  "BeatPulse-UI": {
    "Liveness": [
      {
        "Name": "HTTP-Api-Basic",
        "Uri": "http://localhost:6457/health?DetailedOutput=true"
      }
    ],
    "Webhooks": [
      {
        "Name": "",
        "Uri": "",
        "Payload": "",
        "RestoredPayload":""
      }
    ],
    "EvaluationTimeOnSeconds": 10,
    "MinimumSecondsBetweenFailureNotifications":60
  }
}
1.- Liveness: The collection of liveness uris to watch.
2.- EvaluationTimeOnSeconds: Number of elapsed seconds between liveness checks.
3.- Webhooks: If any liveness return a *Down* result, this collections will be used to notify the error status. (Payload is the json payload and must be scape. For mor information see Notifications section)
4.- MinimumSecondsBetweenFailureNotifications: The minimun seconds between failure notifications in order not flooding the notification receiver.

All liveness results are stored into a SqLite database persisted to disk with livenessdb name.

Failure Notifications

If the WebHooks section is configured, BeatPulse-UI automatically posts a new notification into the webhook collection. BeatPulseUI uses a simple replace method for values in the webhook's Payload property. At this moment we support two bookmarks:

[[LIVENESS]] The name of the liveness that returns Down.

[[FAILURE]] A detail message with the failure.

The web hooks section contains more information and webhooks samples for Microsoft Teams, Azure Functions, Slack and more.

Contributing

BeatPulse wouldn't be possible without the time and effort of its contributors. The team is made up of Unai Zorrilla Castro @unaizorrilla, Luis Ruiz Pavón @lurumad, Carlos Landeras @carloslanderas and Eduard Tomás @eiximenis.

Our valued committers are: Hugo Biarge @hbiarge, Matt Channer @mattchanner, Luis Fraile @lfraile, Bradley Grainger @bgrainger,Mahamadou Camara @poumup.

If you want to contribute to a project and make it better, your help is very welcome. You can contribute with helpful bug reports, feature request and also new features with pull requests.

  1. Read and follow the Don't push your pull requests
  2. Build.ps1 is working on local and AppVeyor.
  3. Follow the code guidelines and conventions.
  4. New features are not only code, tests and documentation are also mandatory.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].