Netflix/chaosmonkey · error

not terminating: could not determine if monkey is enabled

Error message

not terminating: could not determine if monkey is enabled

What it means

Returned by term.Terminate when MonkeyCfg.Enabled() fails (e.g. malformed enabled flag in the chaosmonkey config); termination is aborted because the tool cannot safely determine whether chaos termination is switched on.

Source

Thrown at term/term.go:55

	return nil
}

// UnleashedInTestEnv is an error returned by Terminate if running unleashed in
// the test environment, which is not allowed
type UnleashedInTestEnv struct{}

func (err UnleashedInTestEnv) Error() string {
	return "not terminating: Chaos Monkey may not run unleashed in the test environment"
}

// Terminate executes the "terminate" command. This selects an instance
// based on the app, account, region, stack, cluster passed
//
// region, stack, and cluster may be blank
func Terminate(d deps.Deps, app string, account string, region string, stack string, cluster string) error {
	enabled, err := d.MonkeyCfg.Enabled()
	if err != nil {
		return errors.Wrap(err, "not terminating: could not determine if monkey is enabled")
	}

	if !enabled {
		log.Println("not terminating: enabled=false")
		return nil
	}

	problem, err := d.Ou.Outage()

	// If the check for ongoing outage fails, we err on the safe side nd don't terminate an instance
	if err != nil {
		return errors.Wrapf(err, "not terminating: problem checking if there is an outage")
	}

	if problem {
		log.Println("not terminating: outage in progress")
		return nil
	}

View on GitHub (pinned to eaa28fb761)

Solutions

  1. Fix the invalid 'enabled' setting in the chaosmonkey config
  2. Ensure the config file parses correctly (see related parse errors)
  3. Run with a valid config or defaults before attempting termination
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at term/term.go:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Netflix/chaosmonkey@eaa28fb761 (2026-09-03). Data as JSON: /api/errors/dc87a246f9b2f05b. Report an issue: GitHub.