<div dir="ltr"><div>Hi,<br></div><div><br></div><div>we have a /health endpoint:</div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/util/HealthCheck.java#L54-L69">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/util/HealthCheck.java#L54-L69</a></div><div><br></div><div>that gives indication if the DB and the supported push-networks are reachable.</div><div><br></div><div>If all goes well, it returns '200' and a response like:</div><div>{"status":"ok","details":[{"description":"Database connection","result":"connected","runtime":191,"test_status":"ok"},{"description":"Google Cloud Messaging","result":"online","runtime":143,"test_status":"ok"},{"description":"Apple Push Network Sandbox","result":"online","runtime":260,"test_status":"ok"},{"description":"Apple Push Network Production","result":"online","runtime":263,"test_status":"ok"},{"description":"Windows Push Network","result":"online","runtime":351,"test_status":"ok"}],"summary":"Everything is ok"}</div><div><br></div><div><br></div><div><br></div><div>If something, like DB, is not reachable, it also returns '200', and describes the problems in the JSON response:</div><div>{"status":"crit","details":[{"description":"Database connection","result":"org.hibernate.exception.JDBCConnectionException: could not extract ResultSet","runtime":26,"test_status":"crit"},{"description":"Google Cloud Messaging","result":"online","runtime":14,"test_status":"ok"},{"description":"Apple Push Network Sandbox","result":"online","runtime":32,"test_status":"ok"},{"description":"Apple Push Network Production","result":"online","runtime":211,"test_status":"ok"},{"description":"Windows Push Network","result":"online","runtime":149,"test_status":"ok"}],"summary":"There is 1 error found"}</div><div><br></div><div><br></div><div>Questions:</div><div>* do we continue to return '200' in the later case?</div><div>* Or should we give a 500 if there is at least one problem ? </div><div><br></div><div>Please report your desire :-)</div><div><br></div><div><br></div><div>-Matthias</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div></div></div>
</div>