Skip to content
New issue

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

consul-alerts doesnt start when using --watch-checks #76

Closed
scalp42 opened this issue Aug 25, 2015 · 3 comments
Closed

consul-alerts doesnt start when using --watch-checks #76

scalp42 opened this issue Aug 25, 2015 · 3 comments

Comments

@scalp42
Copy link

scalp42 commented Aug 25, 2015

Hi @darkcrux

Running the following:

/usr/local/bin/consul-alerts start --alert-addr=localhost:9500 --consul-addr=localhost:8500 --consul-dc=dc1 --watch-checks --watch-events
INFO[0000] Checking consul agent connection...
INFO[0000] Consul ACL Token: ""
INFO[0000] Consul Alerts daemon started
INFO[0000] Consul Alerts Host: gz-consul-scalp-vagrant-vbox-1
INFO[0000] Consul Agent: localhost:8500
INFO[0000] Consul Datacenter: vagrant
INFO[0000] Running for leader election...
INFO[0000] consul-alert daemon is not running.
Error executing handler: exit status 2
INFO[0000] Shutting down watcher --> Exit Code:  1
root@gz-consul-scalp-vagrant-vbox-1:/etc/consul# INFO[0000] consul-alert daemon is not running.
Error executing handler: exit status 2

root@gz-consul-scalp-vagrant-vbox-1:/etc/consul#

Any idea ? If I remove --watch-checks --watch-events it works fine:

INFO[0000] Checking consul agent connection...
INFO[0000] Consul ACL Token: ""
INFO[0000] Consul Alerts daemon started
INFO[0000] Consul Alerts Host: gz-consul-scalp-vagrant-vbox-1
INFO[0000] Consul Agent: localhost:8500
INFO[0000] Consul Datacenter: vagrant
INFO[0000] Running for leader election...

Thanks in advance!

@darkcrux
Copy link
Contributor

Hi @scalp42

The error your having means that the consul-alerts HTTP API is not responding and the watchers can't send any data of check/event changes for processing. It may be possible that either consul is down or that there's a bug when starting consul-alerts service.

without the --watch-checks and --watch-events args, consul-alerts will just stand by ready to process data passed by consul watch. The watcher needs to be manually ran and pointed to consul-alerts.

can you try binding --alert-addr to a different address? Try --alert-addr=0.0.0.0:9500 or --alert-addr=127.0.0.1:9500, maybe it's not working well with localhost.

@scalp42
Copy link
Author

scalp42 commented Aug 27, 2015

Unfortunately no dice @darkcrux

root@gz-consul-scalp-vagrant-vbox-1:/etc/consul# /usr/local/bin/consul-alerts start --alert-addr=33.33.33.11:9501 --consul-addr=127.0.0.1:8500 --consul-dc=vagrant --watch-checks --watch-events
INFO[0000] Checking consul agent connection...
INFO[0000] Consul ACL Token: ""
INFO[0000] Consul Alerts daemon started
INFO[0000] Consul Alerts Host: gz-consul-scalp-vagrant-vbox-1
INFO[0000] Consul Agent: 127.0.0.1:8500
INFO[0000] Consul Datacenter: vagrant
INFO[0000] Running for leader election...
INFO[0000] consul-alert daemon is not running.
Error executing handler: exit status 2
INFO[0000] Shutting down watcher --> Exit Code:  1
root@gz-consul-scalp-vagrant-vbox-1:/etc/consul# INFO[0000] consul-alert daemon is not running.
Error executing handler: exit status 2
^C
root@gz-consul-scalp-vagrant-vbox-1:/etc/consul#

@darkcrux
Copy link
Contributor

darkcrux commented Jan 4, 2016

sorry took a while to get back at this. Finally got time to work on this again, Turns out that the watchers are not using the --alert-addr parameter. Just fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants