consul-alerts icon indicating copy to clipboard operation
consul-alerts copied to clipboard

Configuration file FOR consul-alerts itself?

Open dsh1705 opened this issue 9 years ago • 7 comments

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.

dsh1705 avatar May 26 '16 12:05 dsh1705

A config file for startup flags specifically would probably be a benefit to several people.

fusiondog avatar Jun 10 '16 00:06 fusiondog

How do you think the configuration file should look like? YAML? JSON? INI?

aisrael avatar Jun 10 '16 03:06 aisrael

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

fusiondog avatar Jun 10 '16 03:06 fusiondog

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 avatar Jul 22 '16 20:07 vincentvu

@vincentvu maybe you can update the README.md and have a sample/default config file ? Thanks

tsaridas avatar Jul 27 '16 13:07 tsaridas

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"
}

vincentvu avatar Jul 27 '16 18:07 vincentvu

How about putting config params into the consul KV?

hokiegeek2 avatar Oct 27 '17 10:10 hokiegeek2