{"id":28793026,"url":"https://github.com/cdapio/chaos-monkey","last_synced_at":"2025-10-17T02:02:43.855Z","repository":{"id":73026868,"uuid":"78163560","full_name":"cdapio/chaos-monkey","owner":"cdapio","description":"Chaos Monkey for CDAP","archived":false,"fork":false,"pushed_at":"2024-09-13T12:03:54.000Z","size":342,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":39,"default_branch":"develop","last_synced_at":"2024-09-14T01:46:46.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/cdapio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-01-06T01:45:07.000Z","updated_at":"2024-09-13T12:03:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"23749938-7a0a-4a63-881e-5fe86fd7ad96","html_url":"https://github.com/cdapio/chaos-monkey","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdapio/chaos-monkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fchaos-monkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fchaos-monkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fchaos-monkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fchaos-monkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdapio","download_url":"https://codeload.github.com/cdapio/chaos-monkey/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdapio%2Fchaos-monkey/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260465874,"owners_count":23013443,"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","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":[],"created_at":"2025-06-18T01:04:17.558Z","updated_at":"2025-10-17T02:02:43.843Z","avatar_url":"https://github.com/cdapio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chaos Monkey\n\nChaos Monkey provides a convenient way to disrupt CDAP and hadoop services on a cluster. \nDisruptions can be scheduled, randomized, or issued on command. \u003cbr/\u003e\n\n\n## Standalone Chaos Monkey \nTo start Chaos Monkey daemon and HTTP server, set configurations in chaos-monkey-site.xml and run ChaosMonkeyMain \u003cbr/\u003e\n\n### Configurations\n**Disruptions setup** \u003cbr/\u003e\n\u003eBy default, the following disruptions will be available to each service: \u003cbr/\u003e\n\u003e* start \u003cbr/\u003e\n\u003e* restart \u003cbr/\u003e\n\u003e* stop \u003cbr/\u003e\n\u003e* terminate \u003cbr/\u003e\n\u003e* kill \u003cbr/\u003e\n\u003e* rolling-restart \u003cbr/\u003e\n\u003e\n\u003eCustom disruptions can be added by extending the Disruption class and then associating them with a service.\n\u003eA custom disruption is started by calling ClusterDisruptor.disrupt(serviceName, disruptionName, actionArguments), \n\u003ewhere disruptionName is set by the Disruption.getName() method.\n\u003eDisruptions receive a collection of RemoteProcess based on the actionArguments, and can be used to execute commands \n\u003evia ssh. To add a custom disruption to a service:\n\u003e* {service}.disruptions - Class paths of custom disruptions, separated by commas\n\n**Initialize a service for Chaos Monkey** \u003cbr/\u003e\n\u003eAny configured service can be interacted with through ClusterDisruptor or REST endpoints. To configure a service for \nchaos Monkey, either provide custom disruptions or a pid file for the default disruptions: \u003cbr/\u003e\n\u003e* {service}.pidFile - Path to the .pid file of the service \u003cbr/\u003e\n\n**Configurations for scheduled disruptions** \u003cbr/\u003e\n\u003eThese additional properties can be set for a certain service to start a scheduled disruption: \u003cbr/\u003e\n\u003e* {service}.interval - Number of seconds between each disruption \u003cbr/\u003e\n\u003e* {service}.killProbability - Number between 0 to 1 representing chance of kill occurring each iteration. \u003cbr/\u003e\n\u003e* {service}.stopProbability - Number between 0 to 1 representing chance of stop occurring each iteration. \u003cbr/\u003e\n\u003e* {service}.restartProbability - Number between 0 to 1 representing chance of restart occurring each iteration. \u003cbr/\u003e\n\u003e* {service}.minNodesPerIteration - Minimum number of nodes affected each iteration. \u003cbr/\u003e\n\u003e* {service}.maxNodesPerIteration - Maximum number of nodes affected each iteration. \u003cbr/\u003e\n\n**Cluster information collector** \u003cbr/\u003e\n\u003eBy default, Chaos Monkey will retrieve cluster information from Coopr \u003cbr/\u003e\n\u003eTo get cluster information from Coopr, the following configurations need to be set:\u003cbr/\u003e\n\u003e* cluster.info.collector.coopr.clusterId \u003cbr/\u003e\n\u003e* cluster.info.collector.coopr.tenantId \u003cbr/\u003e\n\u003e* cluster.info.collector.coopr.server.uri \u003cbr/\u003e\n\u003e\n\u003eTo get cluster information from other sources, include a plugin to implement ClusterInfoCollector and set the \nfollowing configs: \u003cbr/\u003e\n\u003e* cluster.info.collector.class - classpath of the implementation of ClusterInfoCollector\n\u003e\n\u003eAdditional properties can be passed in to the ClusterInfoCollector implementation. Setting the property\ncluster.info.collector.{propertyName} in configurations will make {propertyName} available in the properties map, \npassed in via the initialize method\n\n**SSH configurations** \u003cbr/\u003e\n\u003eusername - username of SSH profile (if different from system user)\u003cbr/\u003e\n\u003ekeyPassphrase - passphrase for private key, if applicable \u003cbr/\u003e\n\u003eprivateKey - path to private key (will check default locations unless specified)\u003cbr/\u003e\n\n## HTTP endpoints\nHTTP server is hosted on port 11020, with the following endpoints: \u003cbr/\u003e\n\n\u003e**POST /v1/services/{service}/{action}** \u003cbr/\u003e\n\u003e{action} includes stop, kill, terminate, start, restart, and rolling-restart \u003cbr/\u003e\n\u003eThe action, by default, will be performed on all nodes configured with the service. To specify affected nodes, include\nne of the following request bodies:\n\u003e```\n\u003e{\n\u003e  nodes:[\u003cnodeAddress1\u003e,\u003cnodeAddress2\u003e...]\n\u003e}\n\u003e```\n\u003e```\n\u003e{\n\u003e  percentage:\u003cnumberFrom0To100\u003e\n\u003e}\n\u003e```\n\u003e```\n\u003e{\n\u003e  count:\u003cnumberOfNodes\u003e\n\u003e}\n\u003e```\n\u003eIn addition to the above request bodies, rolling restart can be also configured with:\n\u003e```\n\u003e{\n\u003e  restartTime:\u003crestartTimeSeconds\u003e\n\u003e  delay:\u003cdelaySeconds\u003e\n\u003e}\n\u003e```\n\n\u003e**GET /v1/nodes/{ip}/status** \u003cbr/\u003e\n\u003eGet the status of all configured service on a given address \u003cbr/\u003e\n\n\u003e**GET /v1/status** \u003cbr/\u003e\n\u003eGet the status of all configured service on every node of the cluster \u003cbr/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdapio%2Fchaos-monkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdapio%2Fchaos-monkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdapio%2Fchaos-monkey/lists"}