{"id":22204389,"url":"https://github.com/innogames/testtool","last_synced_at":"2025-07-27T05:32:59.736Z","repository":{"id":29946293,"uuid":"123278276","full_name":"innogames/testtool","owner":"innogames","description":"Load balancing service of InnoGames","archived":false,"fork":false,"pushed_at":"2025-03-03T11:26:55.000Z","size":439,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-03T20:12:54.666Z","etag":null,"topics":["bgp","c","dns","downtime","freebsd","health-check","http","https","libevent","load-balancer","pf","ping","postgres","postgresql","routing","tcp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/innogames.png","metadata":{"files":{"readme":"README.rst","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":"2018-02-28T11:54:53.000Z","updated_at":"2025-02-18T13:38:24.000Z","dependencies_parsed_at":"2025-02-06T13:39:28.029Z","dependency_job_id":"e7c447e9-0c27-4c76-a06b-46b98520382d","html_url":"https://github.com/innogames/testtool","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/innogames/testtool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innogames%2Ftesttool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innogames%2Ftesttool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innogames%2Ftesttool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innogames%2Ftesttool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innogames","download_url":"https://codeload.github.com/innogames/testtool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innogames%2Ftesttool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267306740,"owners_count":24067035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["bgp","c","dns","downtime","freebsd","health-check","http","https","libevent","load-balancer","pf","ping","postgres","postgresql","routing","tcp"],"created_at":"2024-12-02T17:17:10.124Z","updated_at":"2025-07-27T05:32:59.416Z","avatar_url":"https://github.com/innogames.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Testtool\n========\n\nTesttool is the load balancing service of InnoGames.  It performs health\nchecks and manages PF accordingly.\n\nDowntimes\n---------\n\nDowntimes are a feature useful in mass updates of servers.  They force\nTesttool to mark given node in given pool as hard down, thus killing\nall traffic to it and forbidding any new traffic to reach it.  When\na downtime for the given node ends, Testtool resumes health checks\nagainst this node and only if all health checks pass, the node is marked\nas up again and starts receiving traffic.\n\nHealth Checks\n-------------\n\nThe following attributes are available for health checks:\n\n* `hc_type`: Type of test to perform\n* `hc_interval`: Interval to perform the checks\n* `hc_max_failures`: Number of failed attempts to disable the LB node\n* `hc_timeout`: Timeout in ms for a health check to be considered failed\n\nAny other attributes are type-specific.\n\nHTTP and HTTPS\n--------------\n\nThe check sends the following HTTP request::\n\n  $hc_query HTTP/1.1\n  Host: $ip_addr\n  User-agent: testtool\n  Connection: close\n\nThe request is sent to the specified port, or port 80 for `http` or port\n443 for `https`.  Health check port number has nothing to do with forwarded\n(protocol_ports parameter) port!\n\nExpected: HTTP answer with HTTP code\n\nFails on:\n\n* Any answer other that is not real HTTP\n* HTTP answer with unexpected code\n* SSL connection issues (for https test)\n* Connection timeout\n\nType-specific attributes:\n\n* `hc_port`: Port number to connect to\n* `hc_query`: HTTP method and the URL (path) to test, like\n  \"HEAD /backend/lb_check.php?pool={POOL_NAME}\".\n  There are a few macros available which can be put into the query.\n  For expansion of a single IP address the address of the same address family\n  as the check is choosen. For expansion of multiple addresses both IPv4 and\n  IPv6 addresses will be sent.\n\n  - `{POOL_NAME}` - hostname of currently checked LB Pool\n  - `{POOL_ADDRESS}` - IP address of currently checked LB Pool\n  - `{NODE_NAME}` - hostname of currently checked LB Node\n  - `{NODE_ADDRESS}` - IP address of currently checked LB Node\n  - `{ACTIVE_NODES_NAMES}` - hostnames of LB Nodes of currently checked LB Pool\n    considered up by testtool\n  - `{ACTIVE_NODES_ADDRESSES}` - IP addresses of LB Nodes of currently checked\n    LB Pool considered up by testtool\n\n* `hc_ok_codes`: List of HTTP codes treated as \"OK\"\n* `hc_host`: Host header to be sent\n\nPing\n----\n\nICMP Echo Request packets with icmp_id = pid of Testtool process and\nincreasing icmp_seq.  The icmp_seq number increases for each sent\npacket and is stored for each tested node.  Received icmp_seq is used\nto check which node the Echo Request was sent to with reverse checking.\n\nExpected: ICMP Echo Reply with icmp_id as above\n\nFails on:\n\n* ICMP Echo Reply with wrong icmp_id\n* ICMP Echo Reply with proper icmp_id but icmp_seq not matching the last\n  packet sent to given host is ignored\n* Any other ICMP packet (so no DESTINATION_UNREACHABLE testing)\n\nDNS\n---\n\nDNS query for a configured hostname with increasing transaction_id.  It\ndoesn't verify the contents of answer.\n\nExpected: Any DNS reply with matching transaction_id and at least one answer\nsection\n\nFails on:\n\n* Answer smaller than sizeof(dns_header)\n* Answer bigger than DNS_BUFFER_SIZE\n* No answer sections in answer\n* DNS transaction_id different than one in the last sent query\n\nType-specific attributes:\n\n* `hc_port`: Port number to connect to\n* `hc_query`: Hostname to ask for\n\nTCP\n---\n\nThis check makes a TCP connection to the given port.\n\nExpected: Full TCP handshake with remote service\n\nFails on:\n\n* Remote port closed (reject)\n* Timeout for establishing connection (drop)\n\nType-specific attributes:\n\n* `hc_port`: Port to connect to on tested node\n\nPostgres\n--------\n\nThe check connects to Postgres database and executes a query.\n\nExpected: A single row with a single column that is \"true\"\n\nFails on:\n\n* Connection timeout\n* Connection failure\n* Authentication failure\n* Any failure to run the given query\n* Query returning no rows\n* Query returning more than one rows\n* Query return no columns\n* Query returning more than one columns\n* Anything else than \"true\" returned by the query\n\nType-specific attributes:\n\n* `hc_port`: Port number to connect to\n* `hc_user`: Username to connect the database server\n* `hc_dbname`: Database name to connect\n* `hc_query`: Query to execute on the database server\n\nLicense\n-------\n\nThe project is released under the MIT License.  The MIT License is registered\nwith and approved by the Open Source Initiative [1].\n\n[1] https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnogames%2Ftesttool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnogames%2Ftesttool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnogames%2Ftesttool/lists"}