We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If name is not set in the target block of a policy the agent will panic.
name
target
agent
2020-04-01T13:16:02.456-0400 [INFO] agent: reading policies: policy_storage=policystorage.Nomad 2020-04-01T13:16:02.458-0400 [INFO] agent: found 1 policies: policy_storage=policystorage.Nomad panic: interface conversion: interface {} is nil, not string goroutine 131 [running]: github.com/hashicorp/nomad-autoscaler/policystorage.parseTarget(0x17000a0, 0xc0004626c0, 0x183ae3d) /Users/laoqui/go/src/github.com/hashicorp/nomad-autoscaler/policystorage/nomad.go:143 +0x3d8 github.com/hashicorp/nomad-autoscaler/policystorage.(*Nomad).Get(0xc00000e028, 0xc000375da0, 0x24, 0x2, 0x1, 0x13c4d00) /Users/laoqui/go/src/github.com/hashicorp/nomad-autoscaler/policystorage/nomad.go:53 +0x266 github.com/hashicorp/nomad-autoscaler/agent.(*Agent).Run.func1(0xc00014c040, 0x1984400, 0xc0001508c0, 0xc00000e028, 0x198ff60, 0xc0003c6a50, 0xc00021a2d0, 0xc000375da0, 0x24) /Users/laoqui/go/src/github.com/hashicorp/nomad-autoscaler/agent/agent.go:107 +0xc3 created by github.com/hashicorp/nomad-autoscaler/agent.(*Agent).Run /Users/laoqui/go/src/github.com/hashicorp/nomad-autoscaler/agent/agent.go:101 +0x60f
policy { source = "prometheus" query = "scalar(avg((haproxy_server_current_sessions{backend=\"http_back\"}) and (haproxy_server_up{backend=\"http_back\"} == 1)))" strategy = { name = "target-value" config = { target = 20 } } target { config { dry-run = "true" } } }
Target defaults to local Nomad cluster.
The text was updated successfully, but these errors were encountered:
jrasell
Successfully merging a pull request may close this issue.
If
name
is not set in thetarget
block of a policy theagent
will panic.Log output
Sample policy
Expected behaviour:
Target defaults to local Nomad cluster.
The text was updated successfully, but these errors were encountered: