Giter Site home page Giter Site logo

xabaril / beatpulse Goto Github PK

View Code? Open in Web Editor NEW
607.0 24.0 56.0 2.54 MB

Liveness, health check library for ASP.NET Core Applications

License: Apache License 2.0

C# 91.99% PowerShell 2.48% JavaScript 0.35% HTML 0.17% TypeScript 4.70% Dockerfile 0.30%
aspnetcore health-check liveness-detection liveness

beatpulse's People

Contributors

bgrainger avatar camiteca avatar carloslanderas avatar eiximenis avatar gustavofonsecadealmeida avatar lfraile avatar lurumad avatar mattchanner avatar poumup avatar szogun1987 avatar unaizorrilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beatpulse's Issues

Liveness can't use other services

At this moment, BeatPulseContext register all liveness to be executed as instances. If you need any other service in your liveness ( a simple ILog ) this can't be solved using the ASP.NET Core IServiceProvider.

Opening a DB connection may not check for liveness

If connection pooling is enabled (the default), then calling DbConnection.OpenAsync may simply return a pooled connection object, without making an actual network request to the DB server. This is documented for SqlConnection:

Note that a severed connection can be detected only after attempting to communicate with the server. … If a connection exists to a server that has disappeared, this connection can be drawn from the pool even if the connection pooler has not detected the severed connection and marked it as invalid. This is the case because the overhead of checking that the connection is still valid would eliminate the benefits of having a pooler by causing another round trip to the server to occur. When this occurs, the first attempt to use the connection will detect that the connection has been severed, and an exception is thrown.

It's also the case for npgsql, as per npgsql/npgsql@de716be:

Removed the IsValid() check on the connector. This means that a severed connection may be returned from the pool

AFAIK, MySql.Data and MySqlConnector do both ping the DB server when a pooled connection is retrieved (but it's possible that this could be changed in the future for optimisation purposes).

To work around this connection pooling optimisation, one could do either of the following:

  1. Disable connection pooling for the DB drivers; this should force a new connection to be made every time.
  2. Execute a dummy query (e.g., SELECT 1;) to force the pooled connection to be used.
    • (MySql driver only) await MySqlConnection.PingAsync could be used instead of executing a query.

Well formated json output messages

At this moment the json output is not using the CamelCaseNamesContractResolver, add this into json output messages. This change affect to BeatPulse-UI but now is on development, is good moment to do.

Redis livepoint creates numerous connections to Redis

I have added to my Startup following endpoints: (2.1.0 version)

 services.AddBeatPulse(setup =>
            {
                //add sql server liveness
                setup.AddMySql(Configuration["ConnectionString"]);
                setup.AddRabbitMQ("amqp://" + Configuration["rabbitUser"] + ":" + Configuration["rabbitPassword"] + "@" + Configuration["rabbitHostName"]);
                setup.AddRedis(Configuration["ConnectionStringRedis"]);
            });

It causes creation of numerous connections points (after some times several thousands)

id=112696 addr=MY_IP_ADDRESS:51761 fd=84 name= age=151 idle=4 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112697 addr=MY_IP_ADDRESS:56761 fd=85 name= age=151 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112669 addr=MY_IP_ADDRESS:57824 fd=66 name= age=250 idle=7 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112670 addr=MY_IP_ADDRESS:46132 fd=67 name= age=250 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=ping
id=112642 addr=MY_IP_ADDRESS:57636 fd=48 name= age=347 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112681 addr=MY_IP_ADDRESS:49364 fd=74 name= age=207 idle=4 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112682 addr=MY_IP_ADDRESS:60602 fd=75 name= age=207 idle=6 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112643 addr=MY_IP_ADDRESS:55404 fd=49 name= age=347 idle=1 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112672 addr=MY_IP_ADDRESS:55595 fd=68 name= age=239 idle=6 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112673 addr=MY_IP_ADDRESS:39427 fd=69 name= age=239 idle=6 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112717 addr=MY_IP_ADDRESS:42102 fd=98 name= age=76 idle=2 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112718 addr=MY_IP_ADDRESS:39295 fd=99 name= age=76 idle=2 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112589 addr=MY_IP_ADDRESS:53791 fd=13 name= age=546 idle=4 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112622 addr=MY_IP_ADDRESS:52718 fd=34 name= age=425 idle=3 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=info
id=112623 addr=MY_IP_ADDRESS:54423 fd=35 name= age=425 idle=4 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112593 addr=MY_IP_ADDRESS:52490 fd=16 name= age=524 idle=2 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112612 addr=MY_IP_ADDRESS:60224 fd=22 name= age=459 idle=2 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112734 addr=MY_IP_ADDRESS:44271 fd=110 name= age=11 idle=4 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112735 addr=MY_IP_ADDRESS:42617 fd=111 name= age=11 idle=4 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112613 addr=MY_IP_ADDRESS:50777 fd=29 name= age=459 idle=6 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112594 addr=MY_IP_ADDRESS:50002 fd=17 name= age=524 idle=2 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112666 addr=MY_IP_ADDRESS:47654 fd=64 name= age=260 idle=5 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112667 addr=MY_IP_ADDRESS:55859 fd=65 name= age=260 idle=5 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112591 addr=MY_IP_ADDRESS:35318 fd=14 name= age=536 idle=1 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112592 addr=MY_IP_ADDRESS:34824 fd=15 name= age=536 idle=4 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112645 addr=MY_IP_ADDRESS:52131 fd=50 name= age=337 idle=5 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112646 addr=MY_IP_ADDRESS:38632 fd=51 name= age=337 idle=1 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112702 addr=MY_IP_ADDRESS:56411 fd=88 name= age=129 idle=2 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping
id=112703 addr=MY_IP_ADDRESS:43523 fd=89 name= age=129 idle=3 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112654 addr=MY_IP_ADDRESS:35762 fd=56 name= age=303 idle=3 flags=N db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=unsubscribe
id=112655 addr=MY_IP_ADDRESS:58294 fd=57 name= age=303 idle=2 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=info

Improve UI experiences

At this moment the UI show "Status" description and "OnStateFrom" and "LastExecution", read this information probably is not the good one. Showing information like "Status Up from 22 hours" like docker ps do is better to read.

If the BeatPulse work with detailed information the UI can show the information of all related checkers. When the service is degraded show what service is down.

Add possiblity of use trackers/logs as Application Insights for metrics and historic info

Add the possibility of using Application Insights or other APM to record liveness information events and metrics.

This would allow the possibility of having and history of liveness information, like which are unreliable services, as well as metrics for any pulse milliseconds ellapsed.

This should be added dynamically and support from zero to n trackers.

Consistency with EnableDetailedOutput

First of all, congratulations for this amazing library!

Reviewing the code I can see that, by design, in the first unhealthy liveness result, the library stops processing the next registered liveness and returns a 503 response. I can understand the motivation if you don´t have the options.EnableDetailedOutput configuration enabled. But if this options.EnableDetailedOutput configuration is enabled, I would expect a 200 response with the information of all registered liveness results (the ones that are ok and the ones that not).

Make sense this behavior?

Liveness packages separated versions

Separate packages versions in dependencies props so users don't update Liveness packages that contain same bytes when main library increases version and viceversa.

Protection level of BeatPulseFilter + BeatPulseMiddleware

I am building an application (for sake of getting into pointless detail) I cant use the UseBeatPulse() Webhost extension.

I was hoping to be able register the IStartupFilter / BeatPulseFilter myself but this is private/internal.

So I thought I would register the middleware BeatPulseMiddleware myself but this is also private/internal.

Is there a reason for this level of security on these classes? I am keen to use BeatPulse but this has de-railed any progress I can make currently :)

Improve log messages

Improve log messages on BeatPulse and UI, messages like "An error ocurrred while sending the request" is not friendly and with no value

Typo mistake

In the BeatPulseKeys.cs file rename the variable name BEATPULSE_SELFT_SEGMENT by BEATPULSE_SELF_SEGMENT

Improve BeatPulse UI experience

Improve UI experiences:

  • Added support to view checkers for reach liveness
  • Added support to show the liveness status change history
  • Import UX

.Net Framework support

Hi,

We were about to implement a health check solution very similar to BeatPulse. However, we're not ready to migrate to .Net Core unfortunately. Do you think it's doable to add support to .Net Framework?

BeatPulse 3.0 Roadmap

[continuosly edited with suggestions and approved tasks for 3.0]

Hi guys,

BeatPulse 3.0 is starting (vnext branch) with next features on the roadmap.

BeatPulse

  • Decouple BeatPulse from ASP.NET Core in order to support multiple hosts.

  • Create new host for traditional ASP.NET MVC and FullFx

  • Remove HttpContext dependency on liveness when not necessary.

  • DetailedOutput /Timeout opt-in can be override with query string parameters

  • Support different endpoints ( soap for legacy )

  • Create toogle action for MVC depending on liveness results

  • IsDevelopment option ( to get full exception messages from liveness results ) can be a opt-in, not only a Hosting Environment .

  • BeatPulseOptions can bind from configuration.

  • UseBeatPulse enable filter beatpulse request using the LocalPort on connection, ie, BeatPulse request should work only on configured port.

  • Improve show error details option. Now, results include Exception property, the content of this value depend on includeExceptionMessages opt-in.

UI

  • Integrate BeatPulse.UI with K8S API
  • Support more flow notifications (when liveness is back online etc)
  • Improve bookmarks for liveness failure notifications
  • [] Send full reports ( or only failure reports ) when send notifications.

Ideas?

Use MySqlConnector for async I/O

The MySqlLiveness code uses OpenAsync, etc.. It's a long-standing bug in MySql.Data (bug 70111) that async I/O is not implemented correctly; thus this method will actually run synchronously. (See also here and here on Stack Overflow.)

To fix this, you could switch to https://github.com/mysql-net/MySqlConnector, an OSS replacement for MySql.Data that supports true asynchronous I/O; it also has full support for .NET Core and .NET Standard (1.3 and later).

If you're interested in this, I'd be happy to open a PR.

Migrate to new aspnet core version.

Today i was make a plan to migrate to new version but a with out a authetication i cant do it. I Will stay using this version and making PR to implement new features to help me and others.. I Will work to make the Change in both projects.

My next steps :

  • a way to configure a internal DB connection string ( BeatPulse ui) using appsettings or other way

  • Plan a way to improve notification for each resource or group of then and keep a possibility to make one for all.

  • explore the down notification and liviness results to make a easy way to make a history.. Maybe create one resource at ui to this too ( Im learning react to do it..)

Thanks @CarlosLanderas to create a issue to Microsoft and @unaizorrilla

Add endpoint restrictions to the documentation

Hi there,

I was trying to publish beatpulse on IIS. Since I already gave it an application Url (/beatpulse-ui), I didn't need the host to also publish the app under /beatpulse-ui. I tried using string.empty but couldn't publish the app, so I looked into the code and I saw that a "/" was needed instead.

if (string.IsNullOrEmpty(path) || !path.StartsWith("/"))

How would you aproach this? Maybe be permissive and allow string.empty as well as "/"? Or just add a comment on the docs?

Thanks.

Can't register two SqlServer liveness

Trying to add two SqlServer liveness:

context.AddSqlServer("the-sql-server-connection-string");
context.AddSqlServer("the-sql-server-connection-string-2");

Generates an error complaining about the "sqlserver" path is already registered

Can't register two Redis Liveness

Trying to add two Redis liveness:

context.AddRedis("the-redis-options");
context.AddRedis("the-redis-options-2");

Throws an exception about the "redis" path is already registered

NuGet package BeatPulse.SqlServer (v1.4.0) breaks with package BeatPulse (v1.7.1)

I was following the BeatPulse documentation and when I ran the application, it throws an error on this line

Code
services.AddBeatPulse(setup => { //add sql server liveness setup.AddSqlServer("your-connection-string"); });

Exception
System.MissingMethodException HResult=0x80131513 Message=Method not found: 'BeatPulse.Core.BeatPulseContext BeatPulse.Core.BeatPulseContext.Add(BeatPulse.Core.IBeatPulseLiveness)'. Source=BeatPulse.SqlServer StackTrace: at BeatPulse.BeatPulseContextExtensions.AddSqlServer(BeatPulseContext context, String connectionString, String defaultPath) at BeatPulseDemo.Startup.<ConfigureServices>b__4_0(BeatPulseContext setup) in C:\Projects\Sandbox\BeatPulseDemo\BeatPulseDemo\Startup.cs:line 33 at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddBeatPulse(IServiceCollection services, Action1 setup)
at BeatPulseDemo.Startup.ConfigureServices(IServiceCollection services) in C:\Projects\Sandbox\BeatPulseDemo\BeatPulseDemo\Startup.cs:line 30
`
Experiments
I cloned the BeatPulse repository and directly added the projects BeatPulse and BeatPulse.SqlServer to my project and added the corresponding project references. When I ran the application this way I did not receive an error.

To attempt to reproduce I created a simple project with step by step commits to demonstrate the problem. The repo can be found here: https://github.com/eneunaber/BeatPulseDemo. I was able to fix the problem by downgrading to BeatPulse (v1.4.5).

Observation
This was the last day the two packages were deployed on the same day
BeatPulse (v1.4.5) : Thursday, May 10, 2018 (5/10/2018)
BeatPulse.SqlServer (v1.4.0) : Thursday, May 10, 2018 (5/10/2018)

Given that my experiment with cloning and adding the projects to my existing project fixed the problem. It maybe as simple as publishing new NuGet packages.

BeatPulse UI memory leak

After adding a BeatPulse.UI and valid configuration, ASP.NET Core application started to fail due to Out of memory exception.

I have also made a simple test using a sample project from this repository and the result is the same. Memory used by the process continuosly grows in time.

Endpoint for non-web applications to announce state

Hi there!

Question
What is your view on supporting non-web applications (console apps) with BeatPulse?

Situation
I'm currently working on a new platform that consists of multiple micro services. Some of them are web apis, others are console applications. They are all running in Docker, and on top there is an extra monitoring application that contains the BeatPulse UI and fetches information from all of the microservices that run in the same Docker network.

This works perfect with my web apis, because I've implemented BeatPulse and added an endpoint to make the information available for my monitoring container with BeatPulse UI. However, I now cannot monitor my console applications since they don't have an HTTP endpoint available.

Idea
It would be perfect if the BeatPulse API supported a POST request that can be called from the console applications, so without the use of an endpoint. Then, my console applications can announce their latest state to my monitoring container and I can see the feedback in my BeatPulse UI. If my console applications stop announcing their state for like 5 minutes (or some timeout parameter), it is automatically marked as unhealthy.

Please let me know if something like this is feasible :)

Custom response

Hello,

is it possible to customize end point response?

Currently I am registering sql server, redis and rabbitmq health checks. If all the health checks are OK, I would like to return something as following:

{
     "health" : "healthy"
}

If one of the health checks fails, I would like to return a different message etc.

How can I do this?

UI behind reverse proxy

I'm trying to publish the ui behind Nginx creating a specific subpath for the BeatPulse web application, but all the ui related resources cannot be loaded.
I'm trying to redirect from https://myserver.com/monitor to http://localhost:{app-specific-port}.

In the file BeatPulse/src/BeatPulse.UI/Assets/index.html I see some absolute paths:

  • /ui/resources/bootstrap-min.css
  • /ui/resources/beatpulse.css
  • /ui/resources/vendors-dll.js
  • /ui/resources/beatpulse-bundle.js

Are they somehow replaced if the UI is not placed at the root of the website? Maybe an option to be specified in the setup methods?

VSTS Deployment Gate based on BeatPulse Liveness results

VSTS has a mechanism on Release Management which allows to stop a Release until certain condition is met, these are Deployment Gates.

These conditions can be based on the results of the json from an API REST call, which is a little bit tedious to configure.

It would be interesting to create a VSTS Extension, to be able to set up gates based on the results (healthy or not at this moment) for a particular configured Pulse, something like this:
image

This will allow deployments to be stopped if any condition from previous environments is not met before deployment, based on dependencies tracked by BeatPulse.

Support company branding on BeatPulseUI

All the web content on BeatPulseUI comes from resource files on BeatPulseUI assembly. With this approach is not posible to change anything on the UI.
Some companies need to rebranding BeatPulseUI to specify logos, fonts and other typical assets.

¿Is rebranding a interesting feature on BeatPulseUI?

An error occurred starting the application

Hello,
I have this error when i run my web api :
System.AggregateException: One or more errors occurred. (The DbContextOptions passed to the LivenessDb constructor must be a DbContextOptions<LivenessDb>. When registering multiple DbContext types make sure that the constructor for each context type has a DbContextOptions<TContext> parameter rather than a non-generic DbContextOptions parameter.) ---> System.InvalidOperationException: The DbContextOptions passed to the LivenessDb constructor must be a DbContextOptions<LivenessDb>. When registering multiple DbContext types make sure that the constructor for each context type has a DbContextOptions<TContext> parameter rather than a non-generic DbContextOptions parameter.

This my how i put BeatPulse in my project :

.UseBeatPulse(options =>
               {
                   options.ConfigurePath("hc")
                        .ConfigureTimeout(1500)
                        .ConfigureDetailedOutput(true);
               })
       ```

services.AddBeatPulseUI();
services.AddBeatPulse(setup =>
{
//add sql server liveness
setup.AddSqlServer(connectionBuilder.ConnectionString);
});


{
"BeatPulse-UI": {
"Liveness": [
{
"Name": "SQL",
"Uri": "https://localhost:88/hc/sqlserver"
}
],
"Webhooks": [
{
"Name": "",
"Uri": "",
"Payload": ""
}
],
"EvaluationTimeOnSeconds": 60
}
}

Question: Can beatpulse be used with MVC 5 apps and full framework windows services?

I realize this is intended for Core, but we are trying to implement the health check pattern for all our internal applications. Most of these are written on full framework with MVC 5. Some are just TopShelf based windows services and don't have a web server at all.

I'm looking around for libraries to help with this effort. Would be be possible to use parts of this project such as the actual checkers (sql server, rabbitmq, etc) running outside of asp.net core?

Versioning, BeatPulse, UI and liveness Packages...

At this moment, each BeatPulse Liveness Package, BeatPulse, UI and trackers have specific version numbers for each package. As a matter of fact between BeatPulse, UI, liveness and trackers exist a strong relationship due the contract of LivenessResult.

The strategy we have now does not seem adequate because there is no way to know which version of UI is valid for a specific version of the BeatPulse, e.g.

I'd like to know if anyone has any idea how best to address this problem?

Add contributing guidelines md

Add guidelines doc file for this project in order to simplify contributing into BeatPulse. Some points:

  • Howto use dependencies.props in each project
  • Howto Add new content or modify build.ps1
  • Add documentation
  • Add Samples
  • etc

CORS

Hi,

i'm getting the following error from my angular frontend:
Failed to load http://localhost:5000/hc: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

Even if i allow any origin
app.UseCors(builder => builder.
AllowAnyOrigin().
AllowAnyMethod().
AllowAnyHeader().
AllowCredentials());

Other controllers are working.

Any idea why? Is there an option to enable/use cors for BeatPulse?

Custom status code acceptance

Hi there!

Currently in the process of implementing BeatPulse and using it for different kinds of external services. For one example we are using an API endpoint that isn't fully compliant with REST standards. Because of this it is either necessary to request using a custom header (which will return 200OK) and if the header is absent it will return another status code, not in 200-299 range.

Currently it is not possible to either send a custom header, or passing the expected status code using the AddUrlGroup methods. Is it possible to update the package and implement either of these functionalities?

Thanks in advance!

[BeatPulse-UI] Impossible to display data

The UI can't display the data: Could not retrieve liveness data
The /hc query returns a valid response (200 OK)

{
  "checks": [
    {
      "name": "self",
      "message": "OK",
      "exception": null,
      "elapsed": "00:00:00.0038054",
      "run": true,
      "path": "_self",
      "isHealthy": true
    },
    {
      "name": "SqlServerLiveness",
      "message": "OK",
      "exception": null,
      "elapsed": "00:00:00.0633807",
      "run": true,
      "path": "sqlserver",
      "isHealthy": true
    }
  ],
  "startedAtUtc": "2018-11-20T13:47:43.1583229Z",
  "endAtUtc": "2018-11-20T13:47:43.2454719Z",
  "code": 200,
  "reason": ""
}

But I have an error in the console: beatpulse-bundle.js TypeError: "A.filter is not a function"
It seems to refer to BeatPulse/src/BeatPulse.UI/Client/components/LivenessPage.tsx line 54.
Any idea ?

Create tracker for Prometheus Stack

Prometheus is a powerfull monitoring and alert OSS platform solution. Like Application Insights Prometheus can store metrics in the TSD and this can be usefull in order to monitoring any solution.

Create a Tracker for Prometheus using the push model ( with prometheus gateway ) and send all the information from liveness result to Prometheus TSD.

Stage "Degraded due to dependencies"

At this moment the global path return the state of all registered liveness and the _self liveness. If all liveness is ok the Stage is OK, if any liveness is down the Stage is "Service Unavailable". Can be a good idea to add a new stage "Degraded due to dependencies" if _self is ok and any othe liveness ( dependencies ) is down? If yes, what about the HTTP STATUS CODE is?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.