{"id":24830044,"url":"https://github.com/vacovsky/poolse","last_synced_at":"2026-07-07T00:31:35.694Z","repository":{"id":98864909,"uuid":"84354509","full_name":"vacovsky/poolse","owner":"vacovsky","description":"Control health checks and toggle upstream node status in load balancers with ease.","archived":false,"fork":false,"pushed_at":"2017-05-22T21:24:55.000Z","size":21110,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T02:43:07.934Z","etag":null,"topics":["application-monitoring","devops","devops-tools","f5-health-monitor","go","golang","health-check","healthcheck","load-balancer","nginx-proxy","proxy","site-reliability-engineering","sre"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vacovsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-08T18:44:41.000Z","updated_at":"2019-01-23T22:29:01.000Z","dependencies_parsed_at":"2023-07-20T18:00:45.458Z","dependency_job_id":null,"html_url":"https://github.com/vacovsky/poolse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vacovsky/poolse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vacovsky%2Fpoolse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vacovsky%2Fpoolse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vacovsky%2Fpoolse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vacovsky%2Fpoolse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vacovsky","download_url":"https://codeload.github.com/vacovsky/poolse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vacovsky%2Fpoolse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35210429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-monitoring","devops","devops-tools","f5-health-monitor","go","golang","health-check","healthcheck","load-balancer","nginx-proxy","proxy","site-reliability-engineering","sre"],"created_at":"2025-01-30T23:48:41.543Z","updated_at":"2026-07-07T00:31:35.683Z","avatar_url":"https://github.com/vacovsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Poolse\n\nDemo at \u003ca href=\"http://poolse.vacovsky.us\"\u003epoolse.vacovsky.us\u003c/a\u003e.\n\n## Features\n\n- Exposes a simple interface to \"up\" and \"down\" upstream nodes.\n\n- Monitoring of targets can be as simple or complex as needed.  HTTP Status code checking, reponse strings parsing, and fail/success thresholds are supported for determining health of upstream nodes.\n\n- Multiple status formats are provided, including: 503, no repsonse, as well as partial and full JSON blobs describing the state and parameters per target.\n\n- Reconfigure/reload of settings on the fly, without \"downing\" the node (this is handy when using automation platforms like Chef).\n\n- Provides a common format/interface for managing applications which are behind some form of reverse proxy or load balancer that checks at interval for server health status.\n\n## Building\n\n``` bash\ngo get -u github.com/davecgh/go-spew/spew\ngit clone https://github.com/vacoj/poolse.git\ncd poolse/src/poolse\ngo build\n```\n\n## Configuration file\n\n- To start with a specific configuration file, just execute like this\n\n``` bash\n./poolse /path/to/config.json\n```\n\n``` javascript\n{\n    \"state\": {\n        \"startup_state\": true, // if true, when server starts, if first check passes server state is marked OK\n        \"administrative_state\": \"AdminOff\",  // If persistent state isn't on, this is the default statup state for the STATUS.  If will only be OK if all Targets are also OK on first check\n        \"persist_state\": true  // indicates whether or not STATUS.State.AdministrativeState should be sticky between settings/application restarts and reloads.\n    },\n    \"targets\": [\n        {\n            \"endpoint\": \"http://localhost:5704/fakehealth\",  // url to your application's health endpoint\n            \"polling_interval\": 15,  // polling interval for target endpoint, in seconds\n            \"expected_status_code\": 200,  // *required* HTTP status code to look for.  If this isn't returned when the check happens, we mark OK as false.\n            \"up_count_threshold\": 10, // this many failed checks will mark target as online\n            \"down_count_threshold\": 10 // this many failed checks will mark target as offline\n        },\n        {\n            \"name\": \"Expected Example\",\n            \"endpoint\": \"http://localhost:5704/fakeexpected\",  // url to your application's health endpoint\n            \"polling_interval\": 20,  // polling interval for target endpoint, in seconds\n            \"expected_status_code\": 200,  // HTTP status code to look for.  If this isn't returned when the check happens, we mark OK as false.\n            \"expected_response_strings\": [\"{\\\"is_working\\\": true}\"],\n            \"up_count_threshold\": 10, // this many failed checks will mark target as online\n            \"down_count_threshold\": 10 // this many failed checks will mark target as offline\n        },\n        {\n            \"name\": \"Unexpected Example\",\n            \"endpoint\": \"http://localhost:5704/fakeexpected\",  // url to your application's health endpoint\n            \"polling_interval\": 10,  // polling interval for target endpoint, in seconds\n            \"expected_status_code\": 200,  // HTTP status code to look for.  If this isn't returned when the check happens, we mark OK as false.\n            \"unexpected_response_strings\": [\"{\\\"is_working\\\": false}\"], // response is parsed for this string.  If unexpected_response_string is blank, check is ignored.  If found, OK is false  (an example would be searching repsonse text for {\"thisthing\": false}, and if found, causes OK to be set to false)\n            \"up_count_threshold\": 10, // this many failed checks will mark target as online\n            \"down_count_threshold\": 10 // this many failed checks will mark target as offline\n        },\n        {\n            \"name\": \"Fake Smoke\"  // Arbitrary - use for your own reasons, or leave it blank.\n            \"endpoint\": \"http://localhost:5704/fakesmoke\",  // url to your application's health endpoint\n            \"polling_interval\": 300,  // polling interval for target endpoint, in seconds\n            \"expected_status_code\": 200,  // *required* HTTP status code to look for.  If this isn't returned when the check happens, we mark OK as false.\n        }\n    ],\n    \"service\": {\n        \"http_port\": \"5704\",  // *string not int; port to listen on for incoming web requests\n        \"debug\": false, // displays certain pieces of data in console if true\n        \"show_http_log\": true, // shows log in console of calls being made if true\n        \"state_file_name\": \"state.dat\",  // name of state file.  defaults to state.dat if not preset\n        \"follow_redirects\": false  // whether or not to follow redirects when querying targets\n    }\n}\n```\n\n## Application Controls / API\n\n### Dashboard\n\n#### \"/\"\n\n- Displays simple dashboard of targets and status to caller.\n- Requires some setup:\n\n```bash\ncd poolse/src/poolse/static\nbower install\n```\n\n### Status Endpoints\n\n#### \"/status\"\n\n- Shows long-form status to the caller\n- All requests to endpoints stemming from \"/status\" will accept a query string param of ```id``` (example: ```/status/simple?id=1```) to get just the target object at that index; id should correspond to index of target in config file.\n\n``` javascript\n{\n    \"State\": {\n        \"ok\": true,\n        \"startup_state\": true,\n        \"persist_state\": true,\n        \"administrative_state\": \"\"\n    },\n    \"Targets\": [\n        {\n            \"id\": 0,\n            \"name\": \"\",\n            \"endpoint\": \"http://localhost\",\n            \"polling_interval\": 5,\n            \"expected_status_code\": 200,\n            \"expected_response_strings\": null,\n            \"unexpected_response_strings\": null,\n            \"last_ok\": \"2017-03-23T08:30:51.1019184-07:00\",\n            \"last_checked\": \"2017-03-23T08:30:51.1019184-07:00\",\n            \"ok\": true,\n            \"up_count\": 6987,\n            \"up_count_threshold\": 10,\n            \"down_count\": 0,\n            \"down_count_threshold\": 1\n        }\n    ],\n    \"Version\": \"0.3.10\"\n}\n```\n\n#### \"/status/simple\"\n\n- Returns 200 if they all return true.\n- Returns *NO RESPONSE* error if any of the Targets (targets[i].ok) are false, or if State is false.  This is for F5's health monitor.\n\n#### \"/status/simple2\"\n\n- Returns 200 status when \"State\", and all of the Targets (targets[i].ok) are true.\n- Returns *NO RESPONSE* error if any of the Targets (targets[i].ok) are false, or if State is false.  This is for F5's health monitor.\n\n### Toggle Endpoints\n\n#### \"/toggle\"\n\n- If \"HealthStatus.OK\" and \"SmokeStatus.OK\" are true, sets \"State\" to true if \"!State\".\n- If \"State\" is true, then sets \"State\" to false.\n\n#### \"/toggle/on\"\n\n- If \"HealthStatus.OK\" and \"SmokeStatus.OK\" are true, sets \"State\" to true.\n\n#### \"/toggle/off\"\n\n- Sets \"State\" to false\n\n#### \"/toggle/adminoff\"\n\n- Prevents happy status no matter what else is \"OK\"\n\n#### \"/toggle/adminon\"\n\n- Prevents unsuccessful response no matter what else is not \"OK\"\n\n#### \"/toggle/adminreset\"\n\n- Clears state.dat and resets AdministrativeState to empty\n\n### Settings Endpoints\n\n#### \"/settings\"\n\n- Displays currently loaded Settings struct, as populated from the config file.\n\n#### \"/settings/reload\"\n\n- Reloads configuration file into memory and restarts all target monitors contained within.  A configuration reload generally takes as much time as the longest polling interval present in the targets list, plus 5 seconds.\n\n### Testing Endpoints\n\n#### \"/fakesmoke\", \"fakeexpected\", and \"/fakehealth\"\n\n- Fake endpoints that return 200, maybe some context, and are the defaults in the config file.  This is just for POC and testing, but if you don't have a smoke endpoint and do have a health endpoint, leave it to what it's already set to in the config file, or delete the targets from the config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvacovsky%2Fpoolse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvacovsky%2Fpoolse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvacovsky%2Fpoolse/lists"}