health-monitoring

Should Health Checks call other App Health Checks

大城市里の小女人 提交于 2019-12-04 00:52:23
问题 I have two API's A and B that I control and both have readiness and liveness health checks. A has a dependency on B. A /foo - This endpoint makes a call to /bar in B /status/live /status/ready B /bar /status/live /status/ready Should the readiness health check for A make a call to the readiness health check for API B because of the dependency? 回答1: Service A is ready if it can serve business requests. So if being able to reach B is part of what it needs to do (which it seems it is) then it

Simple Server Monitoring with Java [closed]

无人久伴 提交于 2019-12-03 12:11:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm trying to find a solution that allows me to monitor resource consumption of a server. Preferably, the metrics I'm wanting to obtain are network utilisation IO, and if possible CPU usage/load average and disk IO. The only other requirement I have is that this information be obtainable by Java so it can be

Restarting an unhealthy docker container based on healthcheck

不想你离开。 提交于 2019-12-03 03:01:57
问题 I am using Docker version 17.09.0-ce I see that containers are marked as unhealthy incase of health check failures. Is there an option to get the container restart instead of keeping the container as unhealthy. 回答1: Restarting of unhealty container feature was in the original PR (https://github.com/moby/moby/pull/22719), but was removed after a discussion and considered to be done later as enhancement of RestartPolicy. At this moment you can use this workaround to automatically restarting

Restarting an unhealthy docker container based on healthcheck

断了今生、忘了曾经 提交于 2019-12-02 17:28:32
I am using Docker version 17.09.0-ce I see that containers are marked as unhealthy incase of health check failures. Is there an option to get the container restart instead of keeping the container as unhealthy. Restarting of unhealty container feature was in the original PR ( https://github.com/moby/moby/pull/22719 ), but was removed after a discussion and considered to be done later as enhancement of RestartPolicy. At this moment you can use this workaround to automatically restarting unhealty containers: https://hub.docker.com/r/willfarrell/autoheal/ Here is a sample compose file: version:

Parsing data from hdp device for android (API 15)

大憨熊 提交于 2019-11-30 10:38:43
I am using the HDP Sample and I have a Blood pressure sensor (http://www.andonline.com/medical/products/details.php?catname=&product_num=UA-767PBT-C). I get the data from it, but I don't know how to parse it into something human readable. this is what I tried until now with something like: while(fis.read(data) > -1) { String value = null; BigInteger bi = new BigInteger(data); // for(byte b:data){ // value+=b; // } Log.d("read data binary", "the data "+bi.toString(2)); Log.d("read data decimal", "the data "+bi.toString()); Log.d("read data hexa", "the data "+bi.toString(16)); Log.d("read data

How do you log errors (Exceptions) in your ASP.NET apps?

假如想象 提交于 2019-11-30 10:22:36
问题 I'm looking for the best way to log errors in an ASP.NET application. I want to be able to receive emails when errors occurs in my application, with detailed information about the Exception and the current Request. In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok" but not very flexible nor configurable. We switched recently to NLog. It's much more configurable, we can define different targets for the errors, filter them,

How do you log errors (Exceptions) in your ASP.NET apps?

混江龙づ霸主 提交于 2019-11-29 20:11:11
I'm looking for the best way to log errors in an ASP.NET application. I want to be able to receive emails when errors occurs in my application, with detailed information about the Exception and the current Request. In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok" but not very flexible nor configurable. We switched recently to NLog. It's much more configurable, we can define different targets for the errors, filter them, buffer them (not tried yet). It's a very good improvement. But I discovered lately that there's a whole

Parsing data from hdp device for android (API 15)

会有一股神秘感。 提交于 2019-11-29 16:32:55
问题 I am using the HDP Sample and I have a Blood pressure sensor (http://www.andonline.com/medical/products/details.php?catname=&product_num=UA-767PBT-C). I get the data from it, but I don't know how to parse it into something human readable. this is what I tried until now with something like: while(fis.read(data) > -1) { String value = null; BigInteger bi = new BigInteger(data); // for(byte b:data){ // value+=b; // } Log.d("read data binary", "the data "+bi.toString(2)); Log.d("read data decimal

Can “EndResponse” increase performance of ASP.Net page

百般思念 提交于 2019-11-27 04:40:25
I have a Response.Redirect in my Employee page. It redirects to Salary page. Response.Redirect ("Salary.aspx"); It was working fine until I added exception handling as below. try { Response.Redirect ("Salary.aspx"); } catch(Exception ex) { //MyLog(); throw new Exception(); } //Remaining code in event handler This caused a new exception saying "Thread was being aborted”. I came to know that this can be avoided by setting endResponse as false for the redirect. Response.Redirect(url, false); Context.ApplicationInstance.CompleteRequest(); Explanation of new exception: It always throws the

How to monitor c3p0 connections

风流意气都作罢 提交于 2019-11-27 04:16:55
I am using Hibernate in my JBoss war, using c3p0 for connection pooling, both configured within a hibernate.cfg.xml config file in my classpath <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> I've seen server.log generates lines with interesting information about the connection pool: DEBUG [com.mchange.v2.resourcepool.BasicResourcePool] trace com.mchange.v2.resourcepool.BasicResourcePool@63f5e4b6 [managed: 10, unused: 9, excluded: 0] For my monitoring pool (I am using nagios) I'd like to provide a JSP telling how many connections are being