Comments (8)
I'd add some features to the notifications:
- Support for more notifications, for instance when the liveness is back online.
- The [[LIVENESS]] bookmark shows the name of the process (configured in the health check in the UI appsettings), not the actual name of the liveness (configured in the process appsettings). I'd like to also have a bookmark for the liveness (for instance, SQL Server) to add to my notifications.
- I'd even consider that a notification could also be a report, showing the status of every liveness. A list of which services are OK (with a green icon) and which are KO (with a red icon). This is what I'd like to achieve:
Good job so far by the way.
from beatpulse.
Hi!
I pushed (cd34f44) the branch features/generic-host-support
to be ready for a starting point for the 3.0 work.
Work done in this branch:
- Removed dependences on
HttpContext
when not needed. - Support for Net Core custom host (console apps)
- OWIN middleware for supporting Full Framework apps
Project structure
The BeatPulse.csproj
has ben splitted into several projects:
BeatPulse
: Contains all common and shared code between all platforms (netstandard 2.0)BeatPulse.NetCore
: Contains all common infrastructure for net core & asp.net coreBeatPulse.AspNet.Core
: Contains specific classes for ASP.NET CoreBeatPulse.Owin
: Contains OWIN middleware. Currently is a NetFx 6.1 class library. Maybe could be better to use NetFx 7.1 to avoid netstandard2.0 problems in NetFx 6.xBeatPulse.WebApi.Autofac
: As BeatPulse relies in a DI system, which is not direcly available out of the box in NetFx, this library is an implementation of the DI system needed using Autofac.
In general:
- ASP.NET Core apps must use
BeatPulse.AspNet.Core
as dependency - Custom host netcore apps must use
BeatPulse.NetCore
as dependency - OWIN FullFx apps must use
BeatPulse.Owin
andBeatPulse.WebApi.Autofac
as dependencies
Custom host apps
Note: See sample samples/BeatPulseConsoleApp
for usage.
Main difference between custom host and asp.net core hosted apps is the in the first ones we don't have any web-server listening. That also means that we can use any other network protocol, not only http. Framework expects one object of type IHostedBeatPulseEndpoint
to open a endpoint to be queried for liveness statuses. By default a endpoint using http is provided (BeatPulseWebServer
). Another object expected by the framework is a IHostedBeatpulseOutputFormatter
for formatting the output in a specified format. By default a Json output formatter is provided (JsonOutputFormatter
).
You can use another endpoint listener by using UseEndpointManager<T>()
method when configuring beatpulse.
You can use another output formatter by using UseOutputFormatter<T>()
method when configuring beatpulse.
Both objects are created through DI mechanism, so they can receive any registered service.
Some features missing in custom host apps (i. e. no cache yet).
OWIN apps
Note Look at samples/BeatPulseWebApiOwin
for usage
Due to differences about how DI works in netcore and in webapi configuration syntax is slightly different between both systems.
OWIN library has its own implementation of IBeatPulseService
(OwinBeatPulseService
) because the implementation used in Beatpulse depends on some classes that are not available under FullFx (note: this could be reviewed, as we are using netstandard2.0 libraries in all beatpulse, and the classes we depend from are also from netstandard2.0 libraries, so...).
Work pending
- Pending merge from
master
to this branch to ensure latest code is added (expectsln
conflicts). - @unaizorrilla The new projects need to be updated to use
dependencies.props
versions for included assemblies. - AppVeyor build fail
- General review (@unaizorrilla, @CarlosLanderas, @lurumad)
- More tests
Consider this branch as WIP, not anything stable
Questions?
Fill free to post any comment to this issue for any question regarding this branch, the expected support for non asp.net core clients and for any beatpulse3.0 planned/suggested feature.
from beatpulse.
Hi @karlmtc
Sounds good, thanks!
from beatpulse.
I like the idea @karlmtc, thanks for your contributions 👍. To add the back online notification capabilities, shall we store broken liveness checks in BD or just in memory? Just thinking out loud.
from beatpulse.
Hi,
some other features that could be added to 3.0 (or backported to 2.x if time frame for 3.0 goes to long):
- ASP.NET MVC Core filters to disallow specific actions to be executed if some readiness test fail (I have some PoC on this that I could share soon).
from beatpulse.
As discussed with @eiximenis, to integrate kubernetes API with Beatpulse it would be interesting to follow next steps:
-
Expose a non-configurable endpoint path in Beatpulse to discover registered livenesses paths. This endpoint should be securizable and deactivable, but path should be fixed so beatpulse UI can auto discover health checks on k8s cluster.
(The idea is having a well-known like endpoint) -
Adding k8s client so it can be consumed from UI. We need to query k8s service V1 endpoint to retrieve IP addresses from services and then consume the metadata endpoint explained above to discover livenesses and autoconfigure them.
-
Service queries would be in companion of labels, so those services marked with a label configured on UI would be discovered. This labelled services are the ones running beatpulse.
Now here I throw some questions:
-
Should we add third party k8s API client? I don't think so as we are just querying the services endpoint.
-
Should we create another assembly for kubernetes services discovery? Or just create a bunch of classes on Beatpulse UI as it will only have one API call.
-
Should beatpulse UI livenesses table show a k8s icon on liveness header to show users it was autodiscovered?
If you have further ideas let us know!
Thanks
from beatpulse.
Hi @eiximenis ,
Are you talk about Resource Filters like team use on Xabaril Feature Toogle project?
from beatpulse.
@unaizorrilla can the roadmap be closed as Beatpulse 3.0 was released?
from beatpulse.
Related Issues (20)
- Liveness configuration from configuration file HOT 1
- Add Elasticsearch Provider HOT 2
- [BeatPulse-UI] Impossible to display data HOT 10
- UI behind reverse proxy HOT 14
- How to use beatpulse in iis authentication
- Incorrect NuGet Package HOT 7
- Redis livepoint creates numerous connections to Redis HOT 9
- Question: Can beatpulse be used with MVC 5 apps and full framework windows services? HOT 3
- Migrate to new aspnet core version.
- BeatPulse UI memory leak HOT 14
- Custom response HOT 2
- BeatPulse UI show old state after degraded one of services
- BeatPulse.Redis has reference to unsuported StackExchange.Redis.StrongName package HOT 2
- Inconsistent log level used in liveness checkers HOT 1
- Liveness checkers logs connection string HOT 1
- Question : Call health check from code HOT 1
- GetAllLiveness not accessible when creating new BeatPulse for Akka
- Adding multiple liveness results in Exception, "More then one sequence found" HOT 1
- Disable logs
- Add deprecated status to this repo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beatpulse.