Skip to content

[BUG] Can not specify same config in both /etc/hunter/agent.json and CLI flag #5

@moooofly

Description

@moooofly

phenomenon

[#1073#root@ubuntu-1604 /go/src/github.com/moooofly/hunter-agent]$cat /etc/hunter/agent.json
{
    "debug": true,
    "pidfile": "/var/run/hunter-agent.pid",
    "data-root": "/var/lib/hunter",
    "shutdown-timeout": 15,
    "log-level": "",
    "raw-logs": false,
    "metrics-addr": "0.0.0.0:12346" . -- here
}
[#1074#root@ubuntu-1604 /go/src/github.com/moooofly/hunter-agent]$

and

[#1074#root@ubuntu-1604 /go/src/github.com/moooofly/hunter-agent]$./agent -H tcp://0.0.0.0:12345 -H unix:///var/run/hunter-agent.sock --metrics-addr 0.0.0.0:12346 --broker xx.xx.xx.xx:9092 --topic jaeger-spans-test-001
unable to configure the hunter-agent with file /etc/hunter/agent.json: the following directives are specified both as a flag and in the configuration file: metrics-addr: (from flag: 0.0.0.0:12346, from file: 0.0.0.0:12346)
[#1075#root@ubuntu-1604 /go/src/github.com/moooofly/hunter-agent]$

solution

Should remove one of them.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions