{"id":13430431,"url":"https://github.com/Xabaril/BeatPulse","last_synced_at":"2025-03-16T05:30:57.135Z","repository":{"id":60773893,"uuid":"118465730","full_name":"Xabaril/BeatPulse","owner":"Xabaril","description":"Liveness, health check library for ASP.NET Core Applications","archived":true,"fork":false,"pushed_at":"2019-06-30T07:51:07.000Z","size":2598,"stargazers_count":604,"open_issues_count":17,"forks_count":56,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-14T22:03:36.323Z","etag":null,"topics":["aspnetcore","health-check","liveness","liveness-detection"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xabaril.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-22T14:10:15.000Z","updated_at":"2024-09-18T18:27:21.000Z","dependencies_parsed_at":"2022-10-04T15:46:20.295Z","dependency_job_id":null,"html_url":"https://github.com/Xabaril/BeatPulse","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xabaril%2FBeatPulse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xabaril%2FBeatPulse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xabaril%2FBeatPulse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xabaril%2FBeatPulse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xabaril","download_url":"https://codeload.github.com/Xabaril/BeatPulse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243652698,"owners_count":20325610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","health-check","liveness","liveness-detection"],"created_at":"2024-07-31T02:00:53.605Z","updated_at":"2025-03-16T05:30:53.690Z","avatar_url":"https://github.com/Xabaril.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","others","C\\#","C# #","框架, 库和工具","Distributed Computing"],"sub_categories":["Distributed Computing","分布式计算"],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/fqcak0q6q83f730c/branch/master?svg=true)](https://ci.appveyor.com/project/Xabaril/beatpulse) [![NuGet](https://img.shields.io/nuget/v/BeatPulse.svg)](https://www.nuget.org/packages/BeatPulse/)\n\n[![Build history](https://buildstats.info/appveyor/chart/xabaril/beatpulse)](https://ci.appveyor.com/project/xabaril/beatpulse/history)\n\n# [DEPRECATED] Beat Pulse\n\n\u003e **IMPORTANT UPDATE**\n\nBeatpulse project was created to fill a gap in Asp.Net Core ecosystem when no health checks libraries were available.\n\nNow that Microsoft is rolling out their own [health checks integration](https://github.com/aspnet/Diagnostics),  the Beatpulse project will be focused in contributing towards this library.\n\nAll liveness, UI and Beatpulse features are already available as extensions for the new Microsoft health checks package in this repository:\n\n[Xabaril - AspNetCore.Diagnostics.HealthChecks](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks)\n\n**Support**\n\nThe 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.\n\n\n\n\u003e What is Health Checking?\n\nHealth 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.\n\n*BeatPulse* is a powerfull liveness, readiness library for .NET Core Applications with many out of box enterprise health check services.\n\n## Getting Started \n\n\u003e This documentation is for BeatPulse latest version, you can check changes and package compatibility on [ChangeLog](/doc/changelog.md).\n\n1. Install the Nuget Package into your ASP.NET Core application.\n\n``` PowerShell\nInstall-Package BeatPulse\n```\n\n2. Install the liveness libraries that you need on your project. At this moment *BeatPulse* contains NuGet libraries for:\n\n - System (Disk Storage, Memory)\n - Network (Tcp, Ftp, Sftp, Imap, Smtp, Dns resolve)\n - Redis\n - Elasticsearch\n - SqlServer\n - MongoDb\n - Postgress Sql\n - EventStore\n - Oracle\n - Azure Storage (Blobs, Tables and Queues)\n - Azure Service Bus (Event Hub, Service Bus queues and topics)\n - DocumentDb\n - MySQL\n - SqLite\n - Kafka\n - RabbitMQ\n - Identity Server\n - AWS DynamoDB\n - Custom lambda liveness.\n\n``` PowerShell\nInstall-Package BeatPulse.System\nInstall-Package BeatPulse.Network\nInstall-Package BeatPulse.SqlServer\nInstall-Package BeatPulse.MongoDb\nInstall-Package BeatPulse.Npgsql\nInstall-Package BeatPulse.Elasticsearch\nInstall-Package BeatPulse.EventStore\nInstall-Package BeatPulse.Redis\nInstall-Package BeatPulse.AzureStorage\nInstall-Package BeatPulse.AzureServiceBus\nInstall-Package BeatPulse.MySql\nInstall-Package BeatPulse.DocumentDb\nInstall-Package BeatPulse.SqLite\nInstall-Package BeatPulse.Kafka\nInstall-Package BeatPulse.RabbitMQ\nInstall-Package BeatPulse.IdSvr\nInstall-Package BeatPulse.DynamoDB\nInstall-Package BeatPulse.Oracle\n```\n\n3. Add *BeatPulse* into your ASP.NET Core project. *UseBeatPulse* is a new IWebHostBuilder extension method to register and configure BeatPulse.\n\n``` csharp\n public static IWebHost BuildWebHost(string[] args) =\u003e\n        WebHost.CreateDefaultBuilder(args)\n               .UseBeatPulse(options=\u003e\n                {\n                   options.ConfigurePath(path:\"health\") //default hc\n                        .ConfigureTimeout(milliseconds:1500) // default -1 infinitely\n                        .ConfigureDetailedOutput(detailedOutput:true,includeExceptionMessages:true); //default (true,false)\n                }).UseStartup\u003cStartup\u003e().Build();\n```\n\n4. Add *BeatPulseService* and set the liveness libraries to be used.\n\n``` csharp\n    services.AddBeatPulse(setup =\u003e\n    {\n        //add sql server liveness\n        setup.AddSqlServer(\"your-connection-string\");\n    });\n```\n\n5. Request *BeatPulse* to get liveness results.\n\n``` bash\ncurl http://your-domain/hc \nGET /hc HTTP/1.1\nHost: your-domain\nUser-Agent: curl/7.49.0\nAccept: */*\nHTTP/1.1 200 OK\nOK\n```\n\nFor more information about *BeatPulse* configuration and other features ( configuration, cache, authentication, etc ) see the [specific documentation section](./doc/beatpulse.md).\n\n## Tracking pulses\n\nWith *TrackingPulses* you can save liveness information in external services. Currently we have developed different trackers you can use:\n\n \u003e [Application Insights Tracker](./doc/ai-tracker.md)\n\n \u003e [Prometheus Tracker](./doc/prometheus_tracker.md)\n\n \u003e [StatusPage Tracker](./doc/statuspage_tracker.md)\n\n\n## UI\n\nThe 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.\n\n```csharp\n    public class Startup\n    {       \n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddBeatPulseUI();\n        }\n\n        public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n        {\n            app.UseBeatPulseUI();\n        }\n    }\n```\n\nThis automatically registers a new interface on **/beatpulse-ui**. \n\n\u003e Optionally, *UseBeatPulseUI* can be configured with different UI response path.\n\n![BeatPulseUI](./doc/images/ui-home.png)\n\n**BeatPulseUI** is also available as a *docker image*  You can read more about [beat pulse ui docker image](./doc/ui-docker.md).\n\n### Configuration\n\nThe liveness to be used on BeatPulse-UI are configured using the **BeatPulse-UI** settings.\n\n```json\n{\n  \"BeatPulse-UI\": {\n    \"Liveness\": [\n      {\n        \"Name\": \"HTTP-Api-Basic\",\n        \"Uri\": \"http://localhost:6457/health?DetailedOutput=true\"\n      }\n    ],\n    \"Webhooks\": [\n      {\n        \"Name\": \"\",\n        \"Uri\": \"\",\n        \"Payload\": \"\",\n        \"RestoredPayload\":\"\"\n      }\n    ],\n    \"EvaluationTimeOnSeconds\": 10,\n    \"MinimumSecondsBetweenFailureNotifications\":60\n  }\n}\n```\n\n    1.- Liveness: The collection of liveness uris to watch.\n    2.- EvaluationTimeOnSeconds: Number of elapsed seconds between liveness checks.\n    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)\n    4.- MinimumSecondsBetweenFailureNotifications: The minimun seconds between failure notifications in order not flooding the notification receiver.\n\nAll liveness results are stored into a SqLite database persisted to disk with *livenessdb* name.\n\n### Failure Notifications\n\nIf 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:\n\n[[LIVENESS]] The name of the liveness that returns *Down*.\n\n[[FAILURE]] A detail message with the failure.\n\nThe [web hooks section](./doc/webhooks.md) contains more information and webhooks samples for Microsoft Teams, Azure Functions, Slack and more.\n\n## Contributing\n\nBeatPulse 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.\n\n*Our valued committers are*: Hugo Biarge @hbiarge, Matt Channer @mattchanner, Luis Fraile @lfraile, Bradley Grainger @bgrainger,Mahamadou Camara @poumup.\n\nIf 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.\n\n1. Read and follow the [Don't push your pull requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)\n2. Build.ps1 is working on local and AppVeyor.\n3. Follow the code guidelines and conventions.\n4. New features are not only code, tests and documentation are also mandatory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXabaril%2FBeatPulse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXabaril%2FBeatPulse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXabaril%2FBeatPulse/lists"}