Configuration file FOR consul-alerts itself?
Rather than start consul-alerts with various options, what about using a config file in the same way consul does? This would make it easier for starting with systemd, and for distributing to different datacenters.
A config file for startup flags specifically would probably be a benefit to several people.
How do you think the configuration file should look like? YAML? JSON? INI?
JSON is my preference amongst the 3 and with the json marshal it should be easy. It may be good to try to use the hashicorp configuration language since this is a related project and it is JSON compatible. https://github.com/hashicorp/hcl
I am planing to make some changes in code to have this feature. If everything is on command line, when users do "ps -ef" command, they can see all conf parameter including acl-token.
@vincentvu maybe you can update the README.md and have a sample/default config file ? Thanks
Sure, I will update README.md file. The config is similar to this:
{
"consul-acl-token": "d75ea443-b8d2-45ef-8a16-59b92523c0ae",
"consul-dc": "dc1",
"watch-checks": true,
"watch-events": true,
"log-level": "info"
}
How about putting config params into the consul KV?