{"action":"created","issue":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/241","labels_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/241/comments","events_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/241/events","html_url":"https://github.com/brettwooldridge/HikariCP/issues/241","id":55510859,"number":241,"title":"Failure listener","user":{"login":"voidmain","id":377102,"avatar_url":"https://avatars.githubusercontent.com/u/377102?v=3","gravatar_id":"","url":"https://api.github.com/users/voidmain","html_url":"https://github.com/voidmain","followers_url":"https://api.github.com/users/voidmain/followers","following_url":"https://api.github.com/users/voidmain/following{/other_user}","gists_url":"https://api.github.com/users/voidmain/gists{/gist_id}","starred_url":"https://api.github.com/users/voidmain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voidmain/subscriptions","organizations_url":"https://api.github.com/users/voidmain/orgs","repos_url":"https://api.github.com/users/voidmain/repos","events_url":"https://api.github.com/users/voidmain/events{/privacy}","received_events_url":"https://api.github.com/users/voidmain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T17:24:04Z","updated_at":"2015-01-27T00:37:22Z","closed_at":null,"body":"We have been using BoneCP for a while and are looking to switch off it to Hikari. The last feature that we need to migrate over is the ability to get notifications from the CP when it fails to connect to the database.  We need this because we have an API that provides health check information about various services in our application. This includes the connection to the database.\r\n\r\nIn BoneCP, we implemented their ConnectionHook interface and captured the onAcquireFail messages. We would like something similar in HikariCP to keep this information in our status check API.\r\n\r\nI wanted to open this issue (feature request) to start the discussion. I'll also look at implementing this myself and sending in a pull request (today if I have time)."},"comment":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/comments/71568718","html_url":"https://github.com/brettwooldridge/HikariCP/issues/241#issuecomment-71568718","issue_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/241","id":71568718,"user":{"login":"brettwooldridge","id":1538661,"avatar_url":"https://avatars.githubusercontent.com/u/1538661?v=3","gravatar_id":"","url":"https://api.github.com/users/brettwooldridge","html_url":"https://github.com/brettwooldridge","followers_url":"https://api.github.com/users/brettwooldridge/followers","following_url":"https://api.github.com/users/brettwooldridge/following{/other_user}","gists_url":"https://api.github.com/users/brettwooldridge/gists{/gist_id}","starred_url":"https://api.github.com/users/brettwooldridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettwooldridge/subscriptions","organizations_url":"https://api.github.com/users/brettwooldridge/orgs","repos_url":"https://api.github.com/users/brettwooldridge/repos","events_url":"https://api.github.com/users/brettwooldridge/events{/privacy}","received_events_url":"https://api.github.com/users/brettwooldridge/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T00:37:22Z","updated_at":"2015-01-27T00:37:22Z","body":"@voidmain I understand your use-case.  We do try to keep the \"surface area\" of the HikariCP configuration to a minimum; [somewhat fanatically] minimizing the number of properties that are exposed.  As HikariCP already supports [Dropwizard Metrics](https://dropwizard.github.io/metrics/3.1.0/), which is fairly trivial to configure.  And Metrics already includes a [HealthCheck](https://dropwizard.github.io/metrics/3.1.0/manual/healthchecks/) ([another example](https://dropwizard.github.io/metrics/3.1.0/getting-started/#health-checks)), we propose exposing not only connection failures but other \"unhealthy\" conditions of the pool through their interface.  Of course you have programmatic access to these.\r\n\r\nAs an added benefit, Metrics also exposes all of its monitoring information through JMX (if desired), HTTP/JSON, and integrations exist for monitoring systems like [New Relic](http://newrelic.com/server-monitoring).\r\n"}}